I thought I'd give machine vision and identification on the Nicla Vision another try, as last time things went terribly wrong, with unicorns everywhere!
This time I focused on just identifying rubber duckies, without confusing the model with the added unicorns. I also added a “background” class for when there is nothing to be seen. I’m not sure if it also needs a class for unknown things.
I took 100 pictures of the 3 rubber duckies I have, from various angles and with different lighting, distances, and shadows thrown in.
I also took 30 pictures of the background with various lighting angles, reflections, and shadows, with some pictures showing the edge of the desk as well.
Then I erased all of the data in my Edge Impulse project and exported the new dataset from OpenMV again to restart the training process.
The model said it was getting 86.4% accuracy, and it had a bunch of green dots for correctly identified ducks.. but none for correctly identified backgrounds
Then I noticed at the top it said something about “Target: Arduino Portenta” hmm… I should switch that to the Nicla Vision board. They appear to have similar chip and speed though.
Then, as before, in the Deployment section, I built the firmware again for OpenMV and downloaded it to my computer.
As per my previous blog post, I then uploaded the firmware and ran the example script to test out the new Duck Detector.
This time things went much more smoothly!
Ducks were spotted successfully!!
And no ducks when there was no duck!
So by now I was feeling pretty good about myself and how things were working well this time. until...
The iPhone is a duck!
Well dang. ok there are pictures of ducks on my iPhone, but that doesn't count!
A little more testing confirmed my sad suspicions - that anything... ANYTHING... in the field of view is identified as a duck.
Is there some way to have an "unknown" class where everything else is dumped that doesn't match?
If anyone has ideas on how to overcome the "anything is a duck" issues, I'd love to hear your suggestions!