element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Save The Bees Design Challenge
  • Challenges & Projects
  • Design Challenges
  • Save The Bees Design Challenge
  • More
  • Cancel
Save The Bees Design Challenge
Blog Honey Bee Safe: Nicla Vision Again
  • Blog
  • Forum
  • Documents
  • Leaderboard
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Save The Bees Design Challenge to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: ntewinkel
  • Date Created: 21 Mar 2023 1:18 AM Date Created
  • Views 609 views
  • Likes 8 likes
  • Comments 3 comments
  • duck
  • save the bees
  • savethebeesch
  • Honey Bee Safe
  • nicla vision
  • edge impulse
  • arduino
Related
Recommended

Honey Bee Safe: Nicla Vision Again

ntewinkel
ntewinkel
21 Mar 2023
Honey Bee Safe: Nicla Vision Again

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.

ducks photo shoot

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 Thinking

edge impulse results

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.

edge impulse target board

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!!

duck spotted seriala duckanother duckyet another duck

And no ducks when there was no duck!

no duck!

So by now I was feeling pretty good about myself and how things were working well this time. until...

iPhone is a duck

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. Anguished

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!

  • Sign in to reply
  • ntewinkel
    ntewinkel over 2 years ago in reply to shabaz

    I think I figured it out last night - the model I was using, which was what they show in the Arduino example, is to classify objects, not really to identify or count them.

    By that I mean, similar to what you said, it is only expecting a known set of objects to show up - like on an assembly line.

    By using a "bounding boxes" model I was able to detect a duck, a few ducks at once, as well as stuff that's not a duck.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz over 2 years ago in reply to shabaz

    (Can't edit). By "the training data" I also mean the test data too.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz over 2 years ago

    If it walks like a duck.. : ) 

    I've not used Edge Impulse much (I gave it a quick shot when they went live), but I think there is a  problem in the training if it only found ducks in that chart in that app. The training data (if all you're interested in is ducks) should be "ducks" and "not ducks", i.e. the latter would include the background and everything else. In other words, the training data would include things like mobile phones and other random objects in there, all with the "not ducks" label. I'm guessing (I'm not an expert) that the particular model has incorrectly learned that anything that is not a background is a duck, which to be fair, is what it was trained with so it's working as expected.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube