My app displays inference results even if there is no object to be detected

Hi,
I am having a minor issue with my model, which is running on the Arduino Nano 33 BLE Sense with TinyML Shield and employs the OV7675 camera module for object detection. This model was created in Edge Impulse and deployed as an Arduino library to work on Egg analysis, with three classes: Fertile, Infertile, and Dead. I have noticed that the model continues to display inference results even when there is no object (egg) in front of the camera. Instead of showing 00.00% values for all classes, it only shows one class inference result until I point the camera at the object (egg). The amusing thing is that even if I cover the camera, it still displays the class “infertility” and a value greater than zero. When I remove a finger, the results increase to 90 or higher.

Kindly refer to the attached figures below:

Inferences on the Arduino Nano 33 BLE Sense with OV7675 Camera

Model Training Results:

Model Testing Results:

Try adding a fourth class, e.g. ‘No eggs’ where no eggs are visible. For this class you should add random pictures without eggs.
Without this new background class the model will always try to classify your pictures into one of the three classes, exactly as you’ve experienced.
Let us know if this helped

1 Like

Well, thank you very much,
Let me work on that and update you with the results as soon as possible."

1 Like

@ThomasVikstrom Thank you very much for providing such precise, detailed instructions. I solved it quickly and have attached a screenshot of the inferences I obtained.

1 Like

Great!
Just out of curiousity, what type of eggs are you classifying?

1 Like

@ThomasVikstrom The eggs I am categorizing are chicken eggs. The goal is to develop a TinyML-based application that will assist poultry farmers in real-time monitoring of eggs in incubators as well as other parameters for egg development such as temperature and humidity.

1 Like

Ok, thx for clarifying the use case! Good luck!

1 Like

Thank you very much.

1 Like