What does it doesn't work properly mean in this context?
Just because the model is making predictions with a low confidence value doesn’t mean the model is performing poorly. If your False Positive Rate and False Negative Rate are zero, then a prediction with 0.01 confidence on a True Positive is perfectly fine.
What are your False Positive Rate and False Negative Rate values?
Thank you MMarcial!
The issue I have it is not the confidence it is the False Positives.
When I use the mobile phone it detects the colors perfectly (very near to 100% of true positives) but when I use the ESP-32 it clasifies allmost all the photos as GREEN. I would say that it classifies the 75% of RED photos as GREEN.
I don’t think the resolution of the camera matters in your use case of classifying different colored cylinders. If the Edge Impulse Studio Feature Explorer chart is showing good separation of classes, then the model should work well when deployed to the ESP hardware.
So at this point I cannot offer any further advice
Hello @louis and @MMarcial ,
I took 50 green pictures and 50 red pictures using the ESP32-CAM (different angles, different distances…) and I started from the beginning again. The truth is that there is not a big improvement and the ESP32-CAM classifies as Green a lot of the Red pictures. When I deploy it in the moblie the classification is almost perfect.
The pictures taken for the training and the ones used for the classification are as similar as I can (same light, similar distances, similar position…). Looking to the pictures taken by the ESP32-CAM when the picture is taken very near the color quality is not very good, but the classification of the ESP32-CAM it is bad regardless the distance.
When they are delivered to me I will use a OV5640 and a OV5640AF cameras to see if there is any improvement.
Thanks I just had a look at your project and indeed nothing seems wrong. You might want to add some more data over time to improve the accuracy but it’s not a big deal for now.
I believe the issue comes from the embedded part. How did you deployed the firmware?
Did you use the binary that you recompiled using ESP-IDF?
Did you use the Arduino Library?
Did you use something custom?
Are you able to share your code so I can have a quick look?
After a time I could return to this project and these are my comments:
I used that Github because I want to start the inference when I push a button and it has an output. Those characteristics are very useful for me. Right now I don’t have time/knowledge to use another one.
I tried these cameras: OV5640 and a OV5640AF and the quality of the initial picture is better, but the classification remains as bad as before.
There was a really big improvement in the classification when in the “EON Tuner” at “View” I changed the selection from “Validation” to “Test”. After I select the model that has the best score with the “Test” samples. I guess that could mean it is overfitted.