Thursday, March 23, 2023

DIY: Factory Assembly Inspection Using AI-based Quality Control Camera

Ashwini Kumar Sinha

- Advertisement -

Inspecting and controlling the quality of a product is a tedious task when done manually. It requires proper hand-eye coordination, which can get tiring after long durations, leading to serious errors and thus affecting the accuracy of the process.

So to solve this issue and make the process more reliable, today you will learn to make an AI-based Quality Control Camera with which you can create an ML model to detect the fault in parts/product manufacturing defects in a factory assembly line. The camera uses an SBC board that runs the pre-trained model for monitoring purposes.

Author's Prototype for Factory Assembly Inspection Using AI-based Quality Control Camera
Fig 1 Author’s Prototype for Factory Assembly Inspection Using AI-based Quality Control Camera
Fig 2.

Bill of Materials 

Begin with shopping of the following components. 

- Advertisement -

Feeding Datasets 

To create the ML model, you can use various platforms like TensorFlow, Google’s Teachable Machine, Lobe, Edge Impulse etc. Because Edge Impulse is used here, below are the commands for installing it:

curl -sL | sudo bash -
sudo apt install -y gcc g++ make build-essential nodejs sox gstreamer1.0-tools gstreamer1.0-plugins-good gstreamer1.0-plugins-base gstreamer1.0-plugins-base-apps
npm config set user root && sudo npm install edge-impulse-linux -g – unsafe-perm

After installation, run the Edge Impulse using the following command in the terminal: 


You will then see a login screen to start Edge Impulse from the web GUI. Upon login, you will be asked to select the project to connect with. The project name and its URL is then given so that you can start feeding the dataset for training and testing the ML model. 

If you have connected the RPi camera to the Raspberry Pi board, then you can view the camera video output upon opening the link. Now assemble the correct objects or parts in front of the camera and label them. Make sure to feed the dataset. 

Repeat the same process and feed the images of parts with manufacturing defects. Here I have used Lego parts to train and test. 




What's New @

Truly Innovative Tech

MOst Popular Videos

Electronics Components

Tech Contests