Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
GreenWizard2015 committed Sep 19, 2024
1 parent 159c4fb commit 5620d06
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/preprocess-remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,9 @@ def processFolder(folder, timeDelta, testRatio, framesPerChunk, testPadding, ski

if dropZeroDeltas: # drop frames with zero time deltas
deltas = np.diff(dataset['time'])
idx = np.where(0 == deltas)[0]
idx = np.where(0 < deltas)[0]
print('Dropping {} frames with zero time deltas'.format(len(idx)))
dataset = {k: np.delete(v, idx) for k, v in dataset.items()}
dataset = {k: v[idx] for k, v in dataset.items()}

N = len(dataset['time'])
# print total deltas statistics
Expand Down Expand Up @@ -202,6 +202,8 @@ def saveSubset(filename, idx):
saveSubset('train.npz', training)
saveSubset('test.npz', testing)

print(', '.join(['%s: %s' % (k, v.shape) for k, v in dataset.items()]))

print('Processing ', folder, 'done')
return len(testing), len(training), False

Expand Down

0 comments on commit 5620d06

Please sign in to comment.