From 5620d0628d7a585f51d500a475b577f0f3f0d972 Mon Sep 17 00:00:00 2001 From: Green Wizard Date: Thu, 19 Sep 2024 22:05:57 +0200 Subject: [PATCH] fix --- scripts/preprocess-remote.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/preprocess-remote.py b/scripts/preprocess-remote.py index 5e78e01..425d1f0 100644 --- a/scripts/preprocess-remote.py +++ b/scripts/preprocess-remote.py @@ -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 @@ -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