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
  • Intro
  • Our Solution
  • Hardware requirements
  • Software requirements
  • Hardware Setup
  • Software Setup
  • Creating an Edge Impulse Project
  • Connecting the device
  • Collecting and preparing the dataset
  • Processing the data - Creating bounding boxes
  • Creating the impulse
  • Generate Features
  • Training the model
  • Validating the model
  • Deploying the model on the edge
  • Conclusion

Was this helpful?

Edit on GitHub
Export as PDF
  1. Computer Vision Projects

Workplace Organizer - Nvidia Jetson Nano

A Workplace Organizer project that uses computer vision for detecting missing tools in their placeholder.

PreviousComputer Vision ProjectsNextRecyclable Materials Sorter - Nvidia Jetson Nano

Last updated 4 months ago

Was this helpful?

Created By:

Public Project Link:

Intro

Having an organized workplace allows the workers to have greater efficiency in their activities, directly impacting their productivity.

When you are in an environment where people work multiple shifts and must share the same set of tools, there are a number of challenges that arise. By interviewing a few facility managers, we have found out that the most prominent problem is that employees do not return the tools in their designated space at the end of a shift, causing increased anxiety and delays in the activity of the following shift, since they must find the missing tools or replacements for them.

Our Solution

We believe the computer vision approach is the best in overcoming this obstacle and Edge Impulse offers the right tools for it.

There are a few possible routes in creating an algorithm for detecting missing tools in their placeholder:

  1. Train a model to recognize the different tools, define the number of each tool it must recognize at all times, and run an alert if any is missing;

  2. Run an anomaly detection algorithm to detect if something is “missing” from the photo. - Non-specific (the algorithm won’t be able to exactly tell how many tools are missing);

  3. Place stickers/tokens of a strident color under tools and run an object classification/detection algorithm to detect the number of tokens present in the image - Resource effective, Increased Specificity, Repeatable, Implies 3D printing (but small stickers can be used as well if you do not have access to a 3D printer).

The winner in our opinion is number 3 so let’s get on with it and show you how it works.

Hardware requirements

  • Jetson Nano 2GB Developer Kit

  • microSD card (64GB UHS-1 recommended)

  • Display

  • USB keyboard and mouse

  • USB camera (or a CSI camera like the Raspberry Pi Camera V2)

  • USB cable or CSI for rPi camera

  • Skadis pegboard or a toolbox

  • Stickers or 3D printed marker

Software requirements

  • Edge Impulse account

Hardware Setup

Software Setup

wget -q -O - https://cdn.edgeimpulse.com/firmware/linux/jetson.sh | bash

Creating an Edge Impulse Project

The first step towards building your TinyML Model is creating a new Edge Impulse Project.

Once logged in to your Edge Impulse account, you will be greeted by the Project Creation screen.

Click on Create new project, give it a meaningful name, select Developer as your desired project type and press Create new project.

Afterward, select Images as the type of data you wish to use.

Due to the possibility of having to detect more than 1 marker in the image, we will pick Classify multiple objects when asked what you want to detect.

Connecting the device

To connect the Jetson Nano to the Edge Impulse project, run the following command in the terminal:

edge-impulse-linux -disable-microphone

If you have previously used your device in the past for other edge impulse projects, run the following command to reassign the device to a new project:

edge-impulse-linux -disable-microphone -clean

If you have only one active project, the device will be automatically assigned to it. If you have multiple Edge Impulse projects, select in the terminal the one you wish to attach your device to.

Give a recognizable name to your board and press enter.

Your board is now connected to the Edge Impulse project and you can see it in the connected devices panel.

Collecting and preparing the dataset

There are multiple ways to go about gathering your dataset:

  1. Manually taking a bunch of photos, aka data points, using an application like “Cheese!” or “guvcview”.

  2. Recording a Video and extracting the frames every 1 second, using a Python script.

  3. Take photos using the Data Acquisition panel in Edge Impulse Studio.

For this tutorial, we will be using the first option. A thing to keep in mind when gathering photos is that they will be resized to fit in a 320x320px box, required by the MobileNetV2 SSD FPN-Lite 320x320 architecture so try your best to keep the subject in the middle of the frame. Moreover, to avoid overfitting your network, move the camera a little when gathering your dataset, change the light a bit, change the angles etc.

sudo apt install guvcview

And afterward run guvcview to launch the application and start gathering photos.

Once we have plenty of photos (we have collected around 115 pictures for our use case), it’s time to upload them to Edge Impulse and label them. Click on the upload button, select choose files, select all your photos and then begin uploading.

After that, you will see them in the Data acquisition panel.

Processing the data - Creating bounding boxes

Next, navigate to the Labeling queue and start drawing bounding boxes around the 3D printed markers. Even if it might feel cumbersome at first, Edge Impulse will start auto-labeling the object it recognizes, greatly speeding up the process.

Creating the impulse

After all the labeling is done, click on Create Impulse, under the Impulse design panel. For the input block, select Images as input, select image as processing block, and Object detection as learning block.

Generate Features

Next step, click on Save Impulse and move over to the Image field under the Impulse design panel. Wait for the parameters to be generated and click on Save parameters to move on to the Generate features tab, where you will click on the Generate features button. After the job is done, you can visualize your dataset in 3D, in the feature explorer tab. This is one of the most useful tools to use from the Edge Impulse platform as it can let you quickly validate whether your data is well clustered.

Training the model

Moving on to the model training, we recommend leaving the default settings on, and just beginning the training.

Validating the model

This is another great feature that allows you to run the inference on the Test data pool of images, that were kept apart from the training data. After clicking on Classify all, you will be prompted with the model testing results, which represents the percentage of all samples with precision score over 80%.

Deploying the model on the edge

To run the inference on the target, issue the following command and select the project containing the model you wish to deploy:

edge-impulse-linux-runner --clean

Once the model downloads, access the URL provided in your serial monitor to watch the live video feed and see the model in action in a browser:

If you get to this point and the outcome is the desired one, good job! If not, you might want to revisit training the model and labeling more pictures to improve the detection rate.

Now for this system to run unattended in a real-world use case, we imagine the Jetson would run the inference on boot automatically at the end of each shift to check the presence/absence of tools and send a notification if something is not right. Now, this can be done in a number of ways depending on the current infrastructure and desired outcome. For this use case, we have decided to create a service to start the model on boot without a monitor or a keyboard and execute it after each working shift.

Now, to use the system we have just created in an unattended mode we have to employ the Edge Impulse Python SDK and a few other Linux tools. When we are using Python we like to work in a virtual environment. Yes, we like to keep our software workplace in the same tidy manner as our hardware workbench :)

Create a directory in which you will store all the components needed to run the model on the edge. We have created a folder in our home directory called EdgeImpulse.

mkdir EdgeImpulse
cd EdgeImpulse
sudo apt-get install python3-pip libatlas-base-dev libportaudio2 libportaudiocpp0 portaudio19-dev
sudo apt-get install python3 -m pip install --upgrade pip
pip3 install virtualenv six
python3 -m virtualenv -p python3 env
source env/bin/activate
python3 -m pip install edge_impulse_linux

Next up, we must download a local version of the model we have just created using the Edge Impulse platform.

edge-impulse-linux-runner --download modelfile.eim

Replace modelfile.eim with the name of your project, in our case, the command would look like this:

edge-impulse-linux-runner --download WORKPLACEORGANIZER.eim

You can find the model name under the Deployment tab, written in parentheses at the top of the page.

Let’s run the inference using Python by issuing the following command:

python3 classify-image.py path-to-modelfile.eim

In our case, the command looks like this:

python3 classify.py WORKPLACEORGANIZER.eim

Things should be looking something like this.

All that remains would be a Linux service that starts on boot, calls this script at a predefined hour, when a shift ends. Let’s say, every weekday at 17:00 pm.

As you can see below the script file and the timer file and their location on disk (it’s important to use sudo and place it at the respective locations so it can be used as a systemd service).

Run this command to create the service file:

sudo nano /etc/systemd/system/classify.service

And here is the content:

[Unit]
Description=Classify Service
After=multi-user.target

[Service]
Type=simple
WorkingDirectory=/home/zalmotek1/EdgeImpulse
Environment=PYTHONPATH=/home/zalmotek1/EdgeImpulse
ExecStart=/home/zalmotek1/EdgeImpulse/env/bin/python3 /home/zalmotek1/EdgeImpulse/classify.py /home/zalmotek1/EdgeImpulse/WORKPLACEORGANIZER.eim

[Install]
WantedBy=multi-user.target

Run this command to create the timer file: sudo nano /etc/systemd/system/classify_countdown.timer

And here is content:

[Unit]
Description=Schedule running the classify on a time basis

[Timer]
OnCalendar=Mon,Tue,Wed,Thu,Fri *-*-* 17:00:00
Unit=classify.service

[Install]
WantedBy=timers.target
WantedBy=multi-user.target

To enable this services you must run the following commands:

sudo systemctl daemon-reload
sudo systemctl enable classify.service
sudo systemctl enable classify_countdown.service
sudo systemctl start classify_countdown.timer
sudo systemctl start classify.service

To check on the services you can run: sudo systemctl status classify.service and sudo systemctl status classify_countdown.timer

Conclusion

Computer vision technologies hold tremendous potential for both practical and theoretical applications. The simple fact that machines are now able to "see" in some capacity allows us to explore new frontiers in computer science, robotics, artificial intelligence, and more.

Using the above methodology you can quickly adapt to other tool setups or things you want to keep an eye on by training models on Edge Impulse and NVIDIA Jetson. Keep your workplace clean and your workflow lean!

NVIDIA Jetson Nano 2GB DevKit has a quick get-started guide that, based on your operating system, will help you write the OS on an SD card and start the system. We also recommend having an enclosure for the Jetson to protect it from all sorts of nefarious events. In this tutorial, we have found the case to be a good fit.

Usually, tools in the industrial environment are stored either horizontally, in drawers, or vertical, on panels, in designated spots. We will use the vertical panel setup from our workshop to develop the solution (IKEA Skadis pegboard and custom-made 3D printed supports - you can find the link if you like them), the difference, if you have a horizontal setup, would be the camera placement position.

We initially designed and 3D printed some tokens that perfectly fit in the pegboard slots. They print very quickly and are reusable. We did quite a bit of experimentation to find out what shape and color yield the best results. Firstly, we have tried using red and blue oval pegs. Unsurprisingly, this yielded poor results because they blended too well with the patterned background. Next up, we have decided to use colored geometric shapes. The best results, by far, were obtained with blue triangles, and to top it all off, a great jump in the model’s accuracy was gained by slightly scaling and rotating the triangles (without modifying their aspect ratio). You can find the 3D files that were most successful .

Register for a free account on the Edge Impulse platform , then power up the Jetson and either run a display with a keyboard setup or login via ssh to run the following commands to install the Linux runner. Start a terminal and run the setup script:

For more in-depth details about the Jetson setup, you can check link, although the above command is enough for going to the next step.

To install , run the following command in the terminal:

Next up, navigate to and download classify.py and device_patches.py and store them in the same folder with the other components.

If you need assistance in deploying your own solutions or more information about the tutorial above please !

here
reComputer
here
here
here
this
guvcview
https://github.com/edgeimpulse/linux-sdk-python/tree/master/examples/image
reach out to us
Zalmotek
https://studio.edgeimpulse.com/public/89360/latest