Question/Issue:
Trying out gesture detection with the built-in IMU in Nano RP2040. I actually got it successful for one time (meaning i can do data acquisition, training, build the arduino library and deploy it to the static_buffer example with raw feature value). Then I decided to tweak the training parameter and re-build, and redeploy, but after compile and upload to board, the serial reported message below.
Edge Impulse standalone inferencing (Arduino)
The size of your 'features' array is not correct. Expected 375 items, but had 750
I’d had tried different ways to investigate this issue, such as
Retrain > rebuilt > re-install the library → Same issue
Clear the temp cache of arduino → Same issue
Uninstall and reinstall Arduino IDE 2.0 → Same issue
I was suspecting the cache of compilation which might/possibly retain the old model parameter (which result from the 1st time compilation), but i have uninstalled the entire IDE.
So I really no idea whether this is Arduino IDE issue or the library from Edge Impulse? Hope someone can point me where should I look at.
If you have changed the DSP parameters, can you delete/recreate the Classification block in your impulse? There can be a mismatch when number of output features from the DSP block changes.
Really strange, I have tried recreating the impulse (in same project) and deploy the library to the board. It’s still the same mismatch…
My next attempt will be deleting this project and try and see.
I think i finally understood where the problem is. Follow the steps in https://docs.edgeimpulse.com/docs/deployment/running-your-impulse-arduino, I need to copy the raw feature from the test data and paste it to the feature{} in the static_buffer example. My problem is my project only train with AccXYZ eventhough the IMU read both Acc & Gyr. And when I perform live classification with the nano rp2040, it reads both Acc & Gyr data, that’s why the actual data count is twice more than the expected feature count.
I have used DataForwarder to collect data from Acc & Gyr , which is worked fine, but I have problem with deploying too for nano rp2040. Did you copy all raw features from the test data into feature{}?
If you are referring to the static_buffer.ino example, not all of the test datasets, select one of the dataset, and copy the features (as explained in the doc). If you are using both Acc & Gyr in your training, most likely you will run get the expected result in the static_buffer.ino example.