I am new to Edge Impulse and I am certainly doing something wrong but have no idea what it is. What I have is 20 files with sensor data like this to train my model:
timestamp,exercise,sample,ACC X,ACC Y,ACC Z,GYR X,GYR Y,GYR Z,MAG X,MAG Y,MAG Z
-26045, 1, 20, -162, 203, 994, 0, -31, -4, -111, -411, -211
-26039, 1, 20, -144, 197, 961, -7, -27, 0, -109, -412, -222
Each file has the records for one sample and has (roughly) between 90 and 120 lines. These are the readings for a patient moving her leg up and down. I want to train a model for anomaly detection.
This is what I have done so far:
Create new project selecting “Something else”.
In “Data acquisition”, I uploaded 18 files using the “Upload data” option. My files are in csv format. (It took me a lot of time to figure out how to pass the timestamp. It would be great to have more detailed specifications about the data format required by the system).
“Upload data” screen, I have tried both “Automatically split between training and testing” and “Training”, having similar issues. For label, I wrote “Ex_1”.
I click "Begin Upload and it works fine.
Go to “Create impulse” and this is where all my problems start. The default values on screen are: Axes: 1000ms, Window increase: 1000ms, Frequency (Hz): 166.66666666666666, Zero-pad data: Selected.
Add “Spectral Analysis” as processing block. (Tried with Flatten and Spectogram and got the same issues).
Add “Anomaly Detection (K-means)” as learning block.
Click on “Save Impulse.”
Go to “Spectral Features”. These are the parameters I found:
Click on “Save parameters”.
In “Generate features”, I get this:
Data in training set: 12s
Classes: 1 (Ex_1)
Window length: 1000 ms.
Window Increase: 1000 ms.
Training windows: 0
12.Click on “Generate features” and I get this error:
Creating job... OK (ID: 1821099) Scheduling job in cluster... Job started Creating windows from 18 files... [ 0/18] Creating windows from files... [ 1/18] Creating windows from files... [18/18] Creating windows from files... [ 1/18] Resampling windows... Traceback (most recent call last): File "/app/input-block-preprocessing/downsample.py", line 86, in <module> window = sn.resample_poly(window, target_freq, sample_freq, axis=ds_axis) File "/usr/local/lib/python3.7/dist-packages/scipy/signal/signaltools.py", line 3089, in resample_poly h = firwin(2 * half_len + 1, f_c, window=window) File "/usr/local/lib/python3.7/dist-packages/scipy/signal/fir_filter_design.py", line 457, in firwin m = np.arange(0, numtaps) - alpha MemoryError: Unable to allocate array with shape (166666666666666656,) and data type int64 Error windowing Downsample error code was not 0, but was 1 Downsample error code was not 0, but was 1 Application exited with code 1 (Error) Job failed (see above)
What am I doing wrong?
Thanks for your help.