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 ZinnBee Blog#06: Arduino Nicla Vision Module Lego Lab
  • 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: flyingbean
  • Date Created: 26 Apr 2023 4:59 PM Date Created
  • Views 405 views
  • Likes 7 likes
  • Comments 0 comments
  • save the bees
  • nicla vision
  • arduino
Related
Recommended

ZinnBee Blog#06: Arduino Nicla Vision Module Lego Lab

flyingbean
flyingbean
26 Apr 2023

As mentioned in ZinnBee Blog#04, I did a LEGO lab via Nicla Vision. I found that the performance of ML from Edge Impulse classification was limited and the results were not quite good enough for ZinnBee project. I paused the LEGO lab until now.  I still cannot find Bees in my neighborhood this week. Even Cellophane bees are very hard to find due to delayed Spring at MN, US in 2023, so the LEGO lab would be my placeholder for Bees in the design challenge in April 2023. 

  1. Initial bench testing report on LEGO lab

Edge Impulse® is a fun platform to work with, however, it is also a big black box for me to learn. It is my first time to work with Edge Impulse®. The learning curve is deeper than I anticipated. I even trained myself to work with Edge Impulse® on Rasperry Pi Pico platform before I received Arduino Nicla Vision module from Element 14 community. Long story short, Edge Impulse® is complicated if a project plans to pursue a good reliable ML model.

I decided to use pre-process images to do image classification for LEGO lab because this way can save me time from preparing data sets. The flow of Edge Impulse® from the beginning of 2013 until the first week of April in 2023 were same as what I presented in my ZinnBee Blog#04, however, the flow from Edge Impulse® was updated this week. I do not know when the update happened this month. Hopefully, it will not make the performance different between now and my previous LEGO lab testing.

Updated step at Edge Impulse®: Welcome to your new Edge Impulse project as Fig 1.

image

Fig 1. Welcome to your new Edge Impulse project at Edge Impulse® before April 15th, 2023

Which is disappeared at Edge Impulse® under my account now.

Fig 2 shows the configuration of how to create impulse.

image

Fig 2. Create Impulse on Edge Impulse®

I did more than 5 iterations on LEGO lab last month. The last iteration is reported in this blog since it was the best among all initial tests.

The data sets I used at initial LEGO lab tests were shot from a Sony camera under nature light on my coffee table, where there was some wood fixture background as Fig 3 in grayscale for ML of Edge Impulse® . Here are my 4 LEGO objects from left to right in Fig 3: bigDinosaur, boy, mice and tinyDinosaur.

image

Fig 3. LEGO Lab Data Set Samples for Edge Impulse®

I tried color type as Fig 4 shew which there was a parameter setting in Edge Impulse®. Color type setting did make the ML model worse.

image

Fig 4. LEGO Lab Data Set Samples for Edge Impulse® in Color Type

Here is the video of the initial LEGO lab iteration #5 testing results. LEGO lab 1stRound testing report

The deployed ML on Arduino Nicla Vision module had a lot of fault detection about LEGO objects. The estimated fault rate was almost over 50%.

           2. Updated bench testing report on LEGO lab

How can I improve ML performance on Arduino Nicla Vision module from previous lab? I think there were probably a few factors needed to be considered.

  • Background of the data sets

My bench testing lab is set up at Fig 5.

image

Fig 5. LEGO Lab Bench Testing Setup

I did not use wooden surface of my lab bench because it did not improve the initial LEGO lab testing performance. So I used a solid color as the background to increase the contrast between LEGO objects and the background. Then I think the wooden fixture of the background in the data sets could be noisy signals for Edge Impulse® ML model training process. I changed all the data sets with the same background as Fig 5. The number of data sets are still same as previous labs.

  • Object size ration among all objects

The big dinosaur is bigger and the small dinosaur is smaller. But my initial data sets did not honestly present that for Edge Impulse® ML model training process, which could be another misleading input.

  • Edge Impulse® parameter tuning

I learned how to tune parameters at Edge Impulse®  in my ZinnBee Blog#05.  More number of training cycles could make ML model more accurate.

I finally got pretty reliable LEGO lab testing results after I implemented above 3 factors into Edge Impulse® under the same fundamental ML process:  pre-process images for image classification.

 Here are the updated data set samples in Fig 6.

image

Fig 6. Updated Data Set Samples for Edge Impulse®  

More detailed parameters setting at Edge Impulse®

  1. Color depth: RGB
  2. Training cycle: 40 (initial LEGO lab used 20)

Here is the video for the improved LEGO lab testing. LEGO lab iteration10 testing report

I can tell the performance of ML model is much more reliable now with more than 80% accuracy.

I am going to assemble all the modules and building blocks together and finish my final blog tomorrow.

ZinnBee Blogs as below:

ZinnBee Blog#01: Introduction of the project to Save the Bees

ZinnBee Blog#02: Initial Project Structure

ZinnBee Blog#03: LoRa WAN Communication Framework

ZinnBee Blog#04: First Impression of Arduino Nicla Vision Machine Learning Process

ZinnBee Blog#05: I2C Bus Between Arduino Nicla Vision Module and MKR1310

  • Sign in to reply
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