YOLOv5: an improved algorithm for real-time detection of industrial defective pieces - Abdelaziz Elbaghdadi; Yassine Yazid; Ahmed El Oualkadi; Antonio Guerrero-González; Soufiane Mezroui (Institute of Advanced Engineering and Science, 2026)
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.