YOLOv5: an improved algorithm for real-time detection of industrial defective pieces
Abstract
The rapid advancement of communication technologies and the growing demand for artificial intelligence are transforming traditional manufacturing into smart industries. Robotic arms and smart vision cameras are widely adopted to support industrial internet of things (IIoT) applications. Beyond enhancing production efficiency and quality, these technologies play a crucial role in cost reduction, energy savings, and improving operator safety. In this article, we propose an intelligent industrial system using an improved version of the you only look once (YOLO) algorithm for defect detection on production lines. The system integrates robots and cameras to automate defect inspection and classification of manufactured pieces. An updated YOLOv5 model is designed as an end-to-end solution for detecting surface defects in three specific regions. We trained and evaluated the model using custom data tailored to the inspected pieces. The system achieved a 99% mean average precision (mAP) and an 80% recall rate. Additionally, it delivers a 99% detection rate at high speed, enabling real-time surface defect detection. This method not only accurately predicts defective locations but also provides size information, which is critical for assessing the quality of newly produced pieces.
Keywords
Artificial intelligence; Defect detection; Industrial internet of things; Smart vision; YOLOv5
Full Text:
PDFDOI: http://doi.org/10.11591/ijai.v15.i1.pp744-755
Refbacks
- There are currently no refbacks.
Copyright (c) 2026 Abdelaziz Elbaghdadi, Yassine Yazid1, Ahmed El Oualkadi, Antonio Guerrero-González, Soufiane Mezroui

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
IAES International Journal of Artificial Intelligence (IJ-AI)
ISSN/e-ISSN 2089-4872/2252-8938
This journal is published by the Institute of Advanced Engineering and Science (IAES).