LogoLogo
HomeDocsAPI & SDKsProjectsForumStudio
  • Welcome
    • Featured Machine Learning Projects
      • Getting Started with the Edge Impulse Nvidia TAO Pipeline - Renesas EK-RA8D1
      • Smart City Traffic Analysis - NVIDIA TAO + Jetson Orin Nano
      • ROS 2 Pick and Place System - Arduino Braccio++ Robotic Arm and Luxonis OAK-D
      • Optimize a cloud-based Visual Anomaly Detection Model for Edge Deployments
      • Rooftop Ice Detection with Things Network Visualization - Nvidia Omniverse Replicator
      • Surgery Inventory Object Detection - Synthetic Data - Nvidia Omniverse Replicator
      • NVIDIA Omniverse - Synthetic Data Generation For Edge Impulse Projects
      • Community Guide – Using Edge Impulse with Nvidia DeepStream
      • Computer Vision Object Counting - Avnet RZBoard V2L
      • Gesture Appliances Control with Pose Detection - BrainChip AKD1000
      • Counting for Inspection and Quality Control - Nvidia Jetson Nano (TensorRT)
      • High-resolution, High-speed Object Counting - Nvidia Jetson Nano (TensorRT)
    • Prototype and Concept Projects
      • Renesas CK-RA6M5 Cloud Kit - Getting Started with Machine Learning
      • TI CC1352P Launchpad - Getting Started with Machine Learning
      • OpenMV Cam RT1062 - Getting Started with Machine Learning
      • Getting Started with Edge Impulse Experiments
  • Computer Vision Projects
    • Workplace Organizer - Nvidia Jetson Nano
    • Recyclable Materials Sorter - Nvidia Jetson Nano
    • Analog Meter Reading - Arduino Nicla Vision
    • Creating Synthetic Data with Nvidia Omniverse Replicator
    • SonicSight AR - Sound Classification with Feedback on an Augmented Reality Display
    • Traffic Monitoring - Brainchip Akida
    • Multi-camera Video Stream Inference - Brainchip Akida
    • Industrial Inspection Line - Brainchip Akida
    • X-Ray Classification and Analysis - Brainchip Akida
    • Inventory Stock Tracker - FOMO - BrainChip Akida
    • Container Counting - Arduino Nicla Vision
    • Smart Smoke Alarm - Arduino Nano 33
    • Shield Bot Autonomous Security Robot
    • Cyclist Blind Spot Detection - Himax WE-I Plus
    • IV Drip Fluid-Level Monitoring - Arduino Portenta H7
    • Worker PPE Safety Monitoring - Nvidia Jetson Nano
    • Delivered Package Detection - ESP-EYE
    • Bean Leaf Disease Classification - Sony Spresense
    • Oil Tank Measurement Using Computer Vision - Sony Spresense
    • Object Counting for Smart Industries - Raspberry Pi
    • Smart Cashier with FOMO - Raspberry Pi
    • PCB Defect Detection with Computer Vision - Raspberry Pi
    • Bicycle Counting - Sony Spresense
    • Counting Eggs with Computer Vision - OpenMV Cam H7
    • Elevator Passenger Counting - Arduino Nicla Vision
    • ESD Protection using Computer Vision - Seeed ReComputer
    • Solar Panel Defect Detection - Arduino Portenta H7
    • Label Defect Detection - Raspberry Pi
    • Dials and Knob Monitoring with Computer Vision - Raspberry Pi
    • Digital Character Recognition on Electric Meter System - OpenMV Cam H7
    • Corrosion Detection with Computer Vision - Seeed reTerminal
    • Inventory Management with Computer Vision - Raspberry Pi
    • Monitoring Retail Checkout Lines with Computer Vision - Renesas RZ/V2L
    • Counting Retail Inventory with Computer Vision - Renesas RZ/V2L
    • Pose Detection - Renesas RZ/V2L
    • Product Quality Inspection - Renesas RZ/V2L
    • Smart Grocery Cart Using Computer Vision - OpenMV Cam H7
    • Driver Drowsiness Detection With FOMO - Arduino Nicla Vision
    • Gastroscopic Image Processing - OpenMV Cam H7
    • Pharmaceutical Pill Quality Control and Defect Detection
    • Deter Shoplifting with Computer Vision - Texas Instruments TDA4VM
    • Smart Factory Prototype - Texas Instruments TDA4VM
    • Correct Posture Detection and Enforcement - Texas Instruments TDA4VM
    • Visual Anomaly Detection with FOMO-AD - Texas Instruments TDA4VM
    • Surface Crack Detection and Localization - Texas Instruments TDA4VM
    • Surface Crack Detection - Seeed reTerminal
    • Retail Image Classification - Nvidia Jetson Nano
    • SiLabs xG24 Plus Arducam - Sorting Objects with Computer Vision and Robotics - Part 1
    • SiLabs xG24 Plus Arducam - Sorting Objects with Computer Vision and Robotics - Part 2
    • Object Detection and Visualization - Seeed Grove Vision AI Module
    • Bike Rearview Radar - Raspberry Pi
    • Build a Self-Driving RC Vehicle - Arduino Portenta H7 and Computer Vision
    • "Bring Your Own Model" Image Classifier for Wound Identification
    • Acute Lymphoblastic Leukemia Classifier - Nvidia Jetson Nano
    • Hardhat Detection in Industrial Settings - Alif Ensemble E7
    • Motorcycle Helmet Identification and Traffic Light Control - Texas Instruments AM62A
    • Import a Pretrained Model with "Bring Your Own Model" - Texas Instruments AM62A
    • Product Inspection with Visual Anomaly Detection - FOMO-AD - Sony Spresense
    • Visual Anomaly Detection in Fabric using FOMO-AD - Raspberry Pi 5
    • Car Detection and Tracking System for Toll Plazas - Raspberry Pi AI Kit
    • Visual Anomaly Detection - Seeed Grove Vision AI Module V2
    • Object Counting with FOMO - OpenMV Cam RT1062
    • Visitor Heatmap with FOMO Object Detection - Jetson Orin Nano
    • Vehicle Security Camera - Arduino Portenta H7
  • Audio Projects
    • Occupancy Sensing - SiLabs xG24
    • Smart Appliance Control Using Voice Commands - Nordic Thingy:53
    • Glass Window Break Detection - Nordic Thingy:53
    • Illegal Logging Detection - Nordic Thingy:53
    • Illegal Logging Detection - Syntiant TinyML
    • Wearable Cough Sensor and Monitoring - Arduino Nano 33 BLE Sense
    • Collect Data for Keyword Spotting - Raspberry Pi Pico
    • Voice-Activated LED Strip - Raspberry Pi Pico
    • Snoring Detection on a Smart Phone
    • Gunshot Audio Classification - Arduino Nano 33 + Portenta H7
    • AI-Powered Patient Assistance - Arduino Nano 33 BLE Sense
    • Acoustic Pipe Leakage Detection - Arduino Portenta H7
    • Location Identification using Sound - Syntiant TinyML
    • Environmental Noise Classification - Nordic Thingy:53
    • Running Faucet Detection - Seeed XIAO Sense + Blues Cellular
    • Vandalism Detection via Audio Classification - Arduino Nano 33 BLE Sense
    • Predictive Maintenance Using Audio Classification - Arduino Nano 33 BLE Sense
    • Porting an Audio Project from the SiLabs Thunderboard Sense 2 to xG24
    • Environmental Audio Monitoring Wearable - Syntiant TinyML - Part 1
    • Environmental Audio Monitoring Wearable - Syntiant TinyML - Part 2
    • Keyword Spotting - Nordic Thingy:53
    • Detecting Worker Accidents with Audio Classification - Syntiant TinyML
    • Snoring Detection with Syntiant NDP120 Neural Decision Processor - Arduino Nicla Voice
    • Recognize Voice Commands with the Particle Photon 2
    • Voice Controlled Power Plug with Syntiant NDP120 (Nicla Voice)
    • Determining Compressor State with Audio Classification - Avnet RaSynBoard
    • Developing a Voice-Activated Product with Edge Impulse's Synthetic Data Pipeline
    • Enhancing Worker Safety using Synthetic Audio to Create a Dog Bark Classifier
  • Predictive Maintenance and Defect Detection Projects
    • Predictive Maintenance - Nordic Thingy:91
    • Brushless DC Motor Anomaly Detection
    • Industrial Compressor Predictive Maintenance - Nordic Thingy:53
    • Anticipate Power Outages with Machine Learning - Arduino Nano 33 BLE Sense
    • Faulty Lithium-Ion Cell Identification in Battery Packs - Seeed Wio Terminal
    • Weight Scale Predictive Maintenance - Arduino Nano 33 BLE Sense
    • Fluid Leak Detection With a Flowmeter and AI - Seeed Wio Terminal
    • Pipeline Clog Detection with a Flowmeter and AI - Seeed Wio Terminal
    • Refrigerator Predictive Maintenance - Arduino Nano 33 BLE Sense
    • Motor Pump Predictive Maintenance - Infineon PSoC 6 WiFi-BT Pioneer Kit + CN0549
    • BrickML Demo Project - 3D Printer Anomaly Detection
    • Condition Monitoring - Syntiant TinyML Board
    • Predictive Maintenance - Commercial Printer - Sony Spresense + CommonSense
    • Vibration Classification with BrainChip's Akida
    • AI-driven Audio and Thermal HVAC Monitoring - SeeedStudio XIAO ESP32
  • Accelerometer and Activity Projects
    • Arduino x K-Way - Outdoor Activity Tracker
    • Arduino x K-Way - Gesture Recognition for Hiking
    • Arduino x K-Way - TinyML Fall Detection
    • Posture Detection for Worker Safety - SiLabs Thunderboard Sense 2
    • Hand Gesture Recognition - OpenMV Cam H7
    • Arduin-Row, a TinyML Rowing Machine Coach - Arduino Nicla Sense ME
    • Fall Detection using a Transformer Model – Arduino Giga R1 WiFi
    • Bluetooth Fall Detection - Arduino Nano 33 BLE Sense
    • Monitor Packages During Transit with AI - Arduino Nano 33 BLE Sense
    • Smart Baby Swing - Arduino Portenta H7
    • Warehouse Shipment Monitoring - SiLabs Thunderboard Sense 2
    • Gesture Recognition - Bangle.js Smartwatch
    • Gesture Recognition for Patient Communication - SiLabs Thunderboard Sense 2
    • Hospital Bed Occupancy Detection - Arduino Nano 33 BLE Sense
    • Porting a Posture Detection Project from the SiLabs Thunderboard Sense 2 to xG24
    • Porting a Gesture Recognition Project from the SiLabs Thunderboard Sense 2 to xG24
    • Continuous Gait Monitor (Anomaly Detection) - Nordic Thingy:53
    • Classifying Exercise Activities on a BangleJS Smartwatch
  • Air Quality and Environmental Projects
    • Arduino x K-Way - Environmental Asthma Risk Assessment
    • Gas Detection in the Oil and Gas Industry - Nordic Thingy:91
    • Smart HVAC System with a Sony Spresense
    • Smart HVAC System with an Arduino Nicla Vision
    • Indoor CO2 Level Estimation - Arduino Portenta H7
    • Harmful Gases Detection - Arduino Nano 33 BLE Sense
    • Fire Detection Using Sensor Fusion and TinyML - Arduino Nano 33 BLE Sense
    • AI-Assisted Monitoring of Dairy Manufacturing Conditions - Seeed XIAO ESP32C3
    • AI-Assisted Air Quality Monitoring - DFRobot Firebeetle ESP32
    • Air Quality Monitoring with Sipeed Longan Nano - RISC-V Gigadevice
    • Methane Monitoring in Mines - Silabs xG24 Dev Kit
    • Smart Building Ventilation with Environmental Sensor Fusion
    • Sensor Data Fusion with Spresense and CommonSense
    • Water Pollution Detection - Arduino Nano ESP32 + Ultrasonic Scan
    • Fire Detection Using Sensor Fusion - Arduino Nano 33 BLE Sense
  • Novel Sensor Projects
    • 8x8 ToF Gesture Classification - Arduino RP2040 Connect
    • Food Irradiation Dose Detection - DFRobot Beetle ESP32C3
    • Applying EEG Data to Machine Learning, Part 1
    • Applying EEG Data to Machine Learning, Part 2
    • Applying EEG Data to Machine Learning, Part 3
    • Liquid Classification with TinyML - Seeed Wio Terminal + TDS Sensor
    • AI-Assisted Pipeline Diagnostics and Inspection with mmWave Radar
    • Soil Quality Detection Using AI and LoRaWAN - Seeed Sensecap A1101
    • Smart Diaper Prototype - Arduino Nicla Sense ME
    • DIY Smart Glove with Flex Sensors
    • EdgeML Energy Monitoring - Particle Photon 2
    • Wearable for Monitoring Worker Stress using HR/HRV DSP Block - Arduino Portenta
  • Software Integration Demos
    • Azure Machine Learning with Kubernetes Compute and Edge Impulse
    • ROS2 + Edge Impulse, Part 1: Pub/Sub Node in Python
    • ROS2 + Edge Impulse, Part 2: MicroROS
    • Using Hugging Face Datasets in Edge Impulse
    • Using Hugging Face Image Classification Datasets with Edge Impulse
    • Edge Impulse API Usage Sample Application - Jetson Nano Trainer
    • MLOps with Edge Impulse and Azure IoT Edge
    • A Federated Approach to Train and Deploy Machine Learning Models
    • DIY Model Weight Update for Continuous AI Deployments
    • Automate the CI/CD Pipeline of your Models with Edge Impulse and GitHub Actions
    • Deploying Edge Impulse Models on ZEDEDA Cloud Devices
Powered by GitBook
On this page
  • Introduction
  • Prerequisites
  • Data Acquisition
  • Impulse Design
  • Firmware Deployment
  • Model Testing
  • Application and Dashboard
  • Summary

Was this helpful?

Edit on GitHub
Export as PDF
  1. Computer Vision Projects

Object Detection and Visualization - Seeed Grove Vision AI Module

Use the Seeed Studio Grove Vision AI Module to build a computer vision model and perform inferencing, with the results captured and sent to a cloud dashboard.

PreviousSiLabs xG24 Plus Arducam - Sorting Objects with Computer Vision and Robotics - Part 2NextBike Rearview Radar - Raspberry Pi

Last updated 2 years ago

Was this helpful?

Created By: David Tischler

Public Project Link:

Introduction

The is a small TinyML-capable board equipped with a Himax HX6537-A processor and an OV2640 camera, capable of running computer vision models directly on the board. There is also a microphone, accelerometer, and gyroscope, and Arduino library support for simple programming. The board is also fully supported by Edge Impulse, so you can build and deploy machine learning models with ease.

In this project, we’ll build a machine learning model that can identify Batman versus Superman, deploy the model to a Grove Vision AI, capture the inference results from the board, and send the results to a Ubidots cloud dashboard for visualization.

Prerequisites

Data Acquisition

Machine learning projects typically begin with building a dataset. Capturing and collecting data can be time consuming, but better data will result in a better model, so this is a crucial step. To get started, attach the Grove Vision AI to your development machine via USB (make sure you have completed Prerequisite #3 above), and click on Data Acquisition on the left side of the Edge Impulse Studio. Next, over towards the right side of the page that is loaded, click on the USB icon, which will allow the Studio to directly connect to the Grove Vision AI board and access it’s camera.

You can now take pictures of your target objects, which in this project, will be Superman and Batman, though any object could be used, and the functionality will remain the same. Click on the “Start Sampling” to capture images, and add them to your dataset.

Next, you will need to draw Bounding Boxes around the object of interest in the captured images. Click on “Labeling Queue” near the top, and draw a box around your object, then provide a Label. Click the “Save labels” button to proceed to the next image in the queue. This goes fairly quickly, as the Edge Impulse Studio will attempt to follow the object from image to image; only on occasion will you need to move or resize a box.

To ensure a robust model that generalizes well gets created, it helps to vary lighting conditions, backgrounds, orientation, and distance from camera to object. Ideally, several hundred pictures of each object should be captured, but you can likely still achieve acceptable results with fewer.

Impulse Design

Once you have a few hundred images captured and labeled, it is time to build an Impulse, which is the machine learning model that will ultimately run on the Grove Vision AI Module. An Impulse consists of a Processing Block and a Learning Block. These can vary depending upon the type of project you are building, but as this is an object detection project, we’ll add an Image Block and Object Detection Block, make sure the Image Width and Height are set to 160 pixels in the Image Data block, and then click the “Save Impulse” button towards the right.

Next, we’ll configure the Image Block. The Studio will generate Raw Features for the images, and you can select from color (RGB) or grayscale. You can save memory if necessary by choosing grayscale, but leave it on RGB for now and click “Save Parameters”

The following page allows you to build a visual representation of your data. Click on the “Generate Features” then wait a few moments while the Feature Explorer is built and populated, providing you insight into how your data is represented.

Once complete, click on “Object Detection” on the left navigation menu, to configure the Object Detection Block.

In the Neural Network Settings, you can set the number of training cycles (epochs) to iterate through, and the Learning rate, which will determine how fast the neural network learns. You can also select from a variety of architectures and sizes, such as MobileNet, YOLO, FOMO, or even custom models. To be able to fit within the memory constraints of the Grove Vision AI, I’ve selected FOMO based on MobileNetV2 0.35. Once you are ready, click on the green “Start Training” button.

It will take a few minutes for the model to build, but after it has finished you will be presented with a Confusion Matrix for the validation set, showing the accuracy achieved. You’ll also be presented with approximate RAM and Flash usage for the model.

Firmware Deployment

With the computer vision model created and promising results shown in the Confusion Matrix, we can now build firmware and load it onto the Grove Vision AI Module. Click on “Deployment” on the left navigation, then scroll down and click “Build” (the Grove Vision AI Module should already be selected. If not, simply choose it.) and wait a moment for the process to complete.

A .zip file will be generated and downloaded. Unzip it, and you will find a file named firmware.uf2. To transfer it to the Grove Vision AI, double click the “boot” button on the board, to place the device into storage mode. A new storage location should show up on your computer, essentially like a USB drive. Then, you can simply drag-and-drop the firmware file into the storage device. The file will copy over, and once it’s complete, the device will reset and the drive will unmount itself.

Model Testing

With the new firmware flashed to the board, we can now use the Edge Impulse CLI to start inferencing on the Grove Vision AI. Make sure the Grove Vision AI Module is still attached via USB, and open up a terminal on your development computer, and run edge-impulse-run-impulse --debug to start inferencing (make sure you installed the CLI tooling as outlined in Prerequisite #2 above). Aim the Grove Vision AI at your object, Superman in this case, and you should see the Label and x-y coordinates of the detection in the image if identification is successful.

The console will continue to print out inference results while the object is detected in the camera frame.

Application and Dashboard

This console output of the inference results is a nice start, but it’s also useful to visualize the results and quantify the data over time. For this, a dashboard that collects and aggregates the inference data is helpful. There are many options for gathering and storing data, including options from AWS and Azure, but for this project we’ll use Ubidots, which has a user-friendly implementation and is built with IoT and Edge devices in mind.

As the edge-impulse-run-impulse command is already outputting the data we are interested in, a small python application that captures the results and sends them to Ubidots is all we need. The following python snippet will dump the results into a file, parse the file for our objects of interest, and then send only the data (not the actual image) to Ubidots. You’ll need to modify the code to parse for your Labels, and, to provide your Ubidots API Auth Token. Save the file locally on your development machine as grove-ai.py.

import subprocess
import time
# Replace the path with the actual path to edge-impulse-run-impulse executable
path_to_executable = 'edge-impulse-run-impulse'

# Replace output.txt with the desired name and path for your output file
output_file = open('output.txt', 'w')

# Launch the executable using subprocess and pipe the output to the output file
subprocess.Popen([path_to_executable], stdout=output_file)

# Continuously parse the output file for prediction results
        
import requests
import json

def send_to_ubidots(name, confidence):
    url = "https://industrial.api.ubidots.com/api/v1.6/devices/groveai"
    payload = {
        name: {
            "value": confidence,
        }
    }
    headers = {
        "Content-Type": "application/json",
        "X-Auth-Token": “ABCD-abcdefghijklmnopqrstuvwxyz”
    }
    response = requests.post(url, headers=headers, data=json.dumps(payload))
    return response.status_code

with open("output.txt", "r") as f:
    lines_seen = set()
    while True:
        line = f.readline()
        if not line:
            time.sleep(1)
            continue
        if ("Batman" in line or "Superman" in line) and line not in lines_seen:
            print(line)
            parts = line.split()
            name = parts[0]
            confidence = float(parts[1][1:-1])
            status_code = send_to_ubidots(name, confidence)
            if status_code != 200:
                print("Error sending data to Ubidots: status code {}".format(status_code))
            lines_seen.add(line)

I have added widgets that collect the Confidence value for each Label, and, a Total Count that simply increases by one each time an inference is performed. This value increases quickly, so you might want to implement a small delay within the python snippet if necessary for your use-case.

With the API Key added to the “X-Auth-Token” line, and appropriate Labels in place, you can run the python code quite simply in a terminal with python3 grove-ai.py. Once the script has begun running, aim the Grove Vision AI Module at the objects of interest once again, and if all goes well the Dashboard you create will begin updating in real-time.

Summary

This proof of concept demonstrates how to collect data, build a computer vision model, and deploy it to the Seeed Studio Grove Vision AI Module. Once the model is flashed to the device, we then use a small bit of python to capture the results and render the inferencing data on a cloud Dashboard with Ubidots, for easier visualization.

Create an .

Install the .

Flash the latest Edge Impulse Firmware to the Grove Vision AI, as described here:

Create a and add a Device (a “Blank Device” will work fine).

In the Ubidots website, you can easily create a quick dashboard that reads the incoming values from the device. Click on the Data drop-down menu, click on Dashboards, then click the “+” sign over on the right. More information on Dashboard creation is available in their documentation, located here: https://help.ubidots.com/en/articles/2400308-create-dashboards-and-widgets

Edge Impulse Project
Edge Impulse CLI
https://docs.edgeimpulse.com/docs/development-platforms/officially-supported-mcu-targets/seeed-grove-vision-ai#1.-update-bl702-chip-firmware
Ubidots account
https://help.ubidots.com/en/articles/2400308-create-dashboards-and-widgets
https://studio.edgeimpulse.com/public/223085/latest
Seeed Studio Grove Vision AI Module