Skip to content

Commit

Permalink
separate process for getting file size
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Zotti authored and Ryan Zotti committed Sep 10, 2016
1 parent f7df51c commit 9ab9339
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions frame_count.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import numpy as np
import argparse
from util import shell_command, remove_file_if_exists

'''
python frame_count.py \
-i /Users/ryanzotti/Documents/repos/Self_Driving_RC_Car/final_processed_data_3_channels.npz \
-o /Users/ryanzotti/Documents/repos/Self_Driving_RC_Car/
'''

ap = argparse.ArgumentParser()
ap.add_argument("-i", "--input", required = True, help = "path to input numpy dataset")
ap.add_argument("-o", "--output", required = True, help = "path to shape output")
args = vars(ap.parse_args())
input_path = args["input"]
output_path = args["output"]
npzfile = np.load(input_path)
train_predictors = npzfile['train_predictors']
train_targets = npzfile['train_targets']

shape = train_predictors.shape
shape = shape[0]
remove_file_if_exists(output_path+'/shape')
shell_command('echo "{shape}" >> {output}/shape'.format(shape=str(shape),output=output_path))

0 comments on commit 9ab9339

Please sign in to comment.