Question/Issue:
My dataset built from 149 images, for testing. I’m using ESP32-EYE (4MB/8MB).
I Deployed my project with both “float32” and “int8”.
In both, while trying to detect directly from the device (edge-impulse-run-impulse), i’m getting randomly(or depends on the image content?!):
"Taking photo…
E (1060049) CameraDriver: Camera Capture Failed
ERR: Failed to take a snapshot!
Thanks for reviewing my question.
I changed to alpha 0.1/64x64, and still getting that error a lot.
It’s indeed, looks like a memory issue but i’m not sure on how to solve that.
What I learned from more few tests is that it depends on the amount of objects that in the image.
My model trained to detect two classes. It looks like when the device detect 2-3 objects it works fine, but when there are more objects, it cause to that error.
Okay, I deployed your project and was able to reproduce the issue. In a nutshell it was a few issues piled on top on another actually, but the root cause was that ESP was not able to process the images fast enough for complex scenes. Read some discussion here
I’ll place the fixes to the upcoming PR for ESP32, which should be merged next week. If it is urgent I can tell you where you need to make changes (it is quite a few places though).
I tested with camera detecting up to 7 objects - not sure how further it can be pushed, since we don’t have a test for that.
Predictions (DSP: 7 ms., Classification: 519 ms., Anomaly: 0 ms.):
xxx (0.878906) [ x: 32, y: 48, width: 16, height: 8 ]
xxx (0.566406) [ x: 56, y: 48, width: 8, height: 8 ]
xxx (0.917969) [ x: 72, y: 48, width: 16, height: 8 ]
xxx (0.652344) [ x: 16, y: 56, width: 8, height: 8 ]
xxx (0.894531) [ x: 40, y: 64, width: 8, height: 16 ]
xxx (0.511719) [ x: 56, y: 72, width: 8, height: 8 ]
xxx (0.503906) [ x: 64, y: 88, width: 8, height: 8 ]
Thanks so much Dmitry @AIWintermuteAI for testing this issue and even reproduced it.
That’s good to know that it’s confirmed and not something that is only on my setup.
I reviewed the case that you mentioned and indeed, it looks like the same memory issue when more objects are detected in an image.
This is not urgent and I can wait for the PR to be merged, but just for curiosity and for the knowledge sharing with the community, it will be good to add some notes about what can solve that.
If you can share the PR itself, I will be able to review the changes and also follow it, when it’s ready. Thank you!!
I really appreciate your help and support!