Defect Detection For Plastic Assembled Parts

Using A CNN To Identify Faults In Products

Dawson Camilleri
Geek Culture
2 min readApr 1, 2022

--

I was tasked in creating a defect detection AI for my master’s in which I used a Convolutional Neural Network (CNN) that successfully detects these defects. Images to train the AI were scarce so images had to be increased by using a technique called data augmentation in which images are artificially created by using techniques such as: Zooming, brightness, rotating, and shifting.

This project had two aims which were to increase the data set so the system caters for having limited amount of images and to create a defect detection system that works in a fast way. The project used the following technologies: Python, TensorFlow, and Google Collab.

Diagram For The CNN

The images below are examples of how the data augmentation worked:

Abertax provided a data set of 4 products which 2 are valid and 2 are defective, which totals to around 321 images. Images were reduced for the following reasons: Image reduction reduces execution time, and it prevents potential ram crashes due to limited space allocated.

The result of the AI was as follows:

All the products were guessed correctly and that is why they appeared in green. Inside the brackets contained what the image prediction was supposed to be while outside the brackets contains the prediction. If the prediction was incorrect, the text would be red and the text inside and outside the brackets would not match(i.e., nondefective and defective).

--

--

Dawson Camilleri
Geek Culture

I am a master’s student of artificial intelligence at the university of Malta. I also work as a technology consultant with EY Malta.