Arduino library issue

We’ve encountered a strange problem when trying to run the inference with the downloaded model. No matter the input feature values, the inference results get stuck on the same value. We’ve tested this both on a Gigadevice board and on an ESP32 Dev Kit, to rule out the possibility that it’s an issue related to the board, and the result is the same. Could there be a problem with the actual Edge Impulse Arduino library version? We’ve tested the exported Arduino library for an ESP32 in the past in another project and it worked around 6 months ago.

The project link is this Dashboard - Air Quality Monitoring - SIPEED LONGAN NANO - Edge Impulse
What extra information should we provide to further debug this?

Best regards,
Constantin

Hello @constantin,

Which example sketch are you using for your test?

Regards,

Louis

Hello @louis,

We’re using the Classification sketch from the library, the code is here: https://github.com/Zalmotek/EdgeImpulse_air_quality_monitoring_with_SIPEED_LONGAN_[…]n/LonganML_LiveClassification/src/LiveClassification_Longan.cpp

We’ve tested this code both on the Sipeed Longan Nano board and on an ESP32 Dev Board.

Thank you,
Alexandra

Hello @alexandra.covor,

:thinking: interesting… Can you make sure your sensors are calibrated the same way as during your data collection?
You can use the debug flag to output the features values by setting the last parameter to true:

EI_IMPULSE_ERROR res = run_classifier(&signal, &result, true);

Also, can you copy paste one raw features from one of your sample present in Edge Impulse and place it in your feature_ix buffer to see if you have the same results on your board and on EI studio?

You could also add on top of your model an anomaly detection block to see if the predicted value is actually “close” to what it should be.

If it does not give any interesting results, I’ll dig further.

Regards,

Louis

Hello @louis,

We have actually tried copying the raw features from one of our samples in the Edge Impulse project and pasting it in the feature_ix buffer and we got the same strange incorrect value (as in the case when the real-time classification got stuck).

We have also created another project to eliminate the possibility of the sensors resetting their calibration (gas sensors sometimes do that as their hotplate must get warm before use) and deployed it back on the device (immediately, without changing the setup or cutting off the power) and it displayed a different inference value compared to the previous ML model, but it was also stuck on one value.

Regards,
Alexandra