Inconsistent results between Live Classification and on-device deployment

I’m a beginner in AI and I’m currently working on a project to build a gesture recognition model using data from an AMG8833 sensor.

I’ve successfully trained a model that performs reasonably well in the Edge Impulse studio. It also works as expected during “Live classification” with real-time data.

My next step was to deploy it. I generated an int8 quantized library using the EON Compiler and chose the CubeMX CMSIS-PACK option. I followed the official guide (Run Cube.MX CMSIS-Pack - Edge Impulse Documentation) to deploy the model to my STM32F407 board.

To test the deployed model, I copied a raw data sample from my test set (specifically, one with the label “PutIn”) and pasted it into the features[] array in the code, as instructed.

However, the serial output consistently shows the “idle” class with a confidence of over 0.9. I have also tested this with samples from other classes, and the result is always the same—it classifies everything as “idle” with high confidence.


My project ID is #705203
Any help or guidance would be greatly appreciated.

Hi @86thauspiciousverse

Sorry to hear this, can you try unoptimized float 32 and see how it works?

Let me log this with our embedded team,

Best

Eoin

Hi @86thauspiciousverse

which toolchain are you using ? which version ?

regards,
fv

@86thauspiciousverse

see this post: Assistance Needed with Edge Impulse Inference on STMicroelectronics B-L475E-IOT01A Board - #17 by ei_francesco

This looks quite similar to my issue here: https://forum.edgeimpulse.com/t/numpy-log-implementation-in-numpy-hpp-fails-on-portenta-h7-cortex-m7/16927

You could do a quick test to check that:

#include "edge-impulse-sdk/dsp/numpy.hpp"
printf(“log(2.7)=%f\r\n”, numpy::log(2.7));

This should return log(2.7)=0.993252