Classification gives very different results when running live classification in edge impulse versus on the STM32. I generate the Cube-MX pack as in the instructions provided in the cube-mx cmsis pack deployment documentation.
I tried both the regular and continuous classification function, and both the float32 and int8 optimization. In all cases the classification gives a different result compared to the live classification. The particular example here is with float32 and continous classification.
Live classification left, stm32 result on the right
The impulse consists of an MFE processing block and a 1D conv classifier. The processed features are already different on device, so the problem seems to be MFE related.
We tried the classifier block separate from the MFE processing block (with the run_inference function) and that works as expected. Putting in the processed features as produced by the live classification in edgeimpulse yields the expected classification results.
This seems to indicate that the issue lies withing the MFE block, as I suspected already.
This was tested with a new project, ID 245077, since we also noticed an error in the samplerate of the previous project.
Checking out the latest project now, can you try setting the high frequency to 1000hz, it seems to be left blank. Not sure if this is something we do intentionally, will check with the DSP team.
Then see how on device performs compared to studio? If there are similar results we can file a bug with the DSP team. Iām trying to test here too but with a different device.
Thanks for having a look at it. For me, the high frequency was already at 1000Hz. To be sure I regenerated the CMSIS pack and tried again but the results are still wrong.
An additional comment that might interest you, the processed features that are generated during run_classifier are (very) different from the features generated during run_classifier_continuous.
We also tried replacing the MFE block with a spectral analysis block to see if the same issue occurs there, but that seems to work fine. The MFE performs much better on our problem though.
Thank you for getting back to us quickly. Any idea on the lead time on this?
Do you have any indication that the spectrogram block has this bug as well as this block could be a potential backup for us in the mean time. I already made a project with the spectrogram block (ID 245847). Thanks!