2024 №04 (06) DOI of Article
2024 №04 (01)

The Paton Welding Journal 2024 #04
The Paton Welding Journal, 2024, #4, 46-52 pages

Automated defect detection in printed circuit boards based on the YOLOv5 neural network

A. Momot, V. Kretsul, O. Muraviov, R. Galagan

National Technical University of Ukraine “Igor Sikorsky Kyiv Polytechnic Institute” 37 Prospect Beresteiskyi (former Peremohy), 03056, Kyiv, Ukraine

In this paper, we consider the possibilities of applying the YOLOv5s deep learning model to the task of automating the process of detecting surface defects on printed circuit boards. Modern printed circuit boards are manufactured in large volumes and contain a significant number of elements. The manufacturing process of printed circuit boards is complex, which increases the likelihood of board wiring defects, such as short, open circuits, mouse bites, etc. These defects are superficial and can be detected by visual and optical inspection. Compared to other methods, this type of visual-optical inspection is easier to automate. It is proven that it is promising to use deep learning models to automate the process of detecting objects in images. Modern neural networks can automatically detect surface defects in printed circuit board images with high reliability. The paper considers the class of YOLO models. It is established that the YOLOv5 model has better performance and recognition accuracy than previous modifications. In this study, the YOLOv5s model was implemented and trained to test the effectiveness of this network in the task of automated detection of surface defects on printed circuit boards. The open dataset “PCB Defects” was used for training. A qualitative and quantitative analysis of the performance of the trained network on the test dataset was carried out. It was found that the network can detect surface defects of printed circuit boards with 92.5% reliability in terms of mAP50. Additionally, the results of the recognition of different classes of defects are analyzed and recommendations for further improvement of the system are given. In particular, it is promising to apply augmentation of training data and use a more complex architecture of the deep learning model.
Keywords: PCB defects, object detection, deep learning, YOLOv5

Received: 14.03.2024
Received in revised form: 15.04.2024
Accepted: 13.05.2024


1. Steshenko, Y., Momot A., Protasov A., Muraviov O. (2023) Automation of the process of segmentation of images of metal surface defects using the neural network U-Net. Tekh. Diahnost. ta Neruiniv. Kontrol, 2, 34-40 [in Ukrainian].
2. Ling, Q., Isa, N.A. (2023) Printed circuit board defect detection methods based on image processing, machine learning and deep learning: A survey. IEEE Access, 11, 15921-15944 [in English].
3. Khandpur, R.S. (2006) Printed circuit boards: Design, fabrication, assembly and testing. New York, McGraw-Hill.
4. Zhou, Y., Yuan M., Zhang, J. et al. (2023) Review of vision- based defect detection research and its perspectives for printed circuit board. J. of Manufacturing Systems, 70, 557- 578.
5. Akhatova, A. (2021) PCB defects, Kaggle. https://www.kaggle. com/datasets/akhatova/pcb-defects
6. Cao, X. (2023) A real-time automated visual inspection system for printed circuit boards missing footprints detection. Int. J. of Advanced Computer Sci. and Applications, 14(5).
7. Zhang, C., Shi W., Li X. et al. (2018) Improved bare PCB defect detection approach based on Deep Feature Learning. The J. of Eng., 16, 1415-1420.
8. Chen, X., Wu Y., He X., Ming W. (2023) A comprehensive review of deep learning-based PCB defect detection. IEEE Access, 11, 139017-139038.
9. Adibhatla, V.A., Chih H., Hsu C. et al. (2020) Defect detection in printed circuit boards using you-only-look-once convolutional neural networks. Electronics, 9(9), 1547.
10. Xin, H., Chen, Z., Wang, B. (2021) PCB electronic component defect detection method based on improved Yolov4 algorithm. J. of Physics: Conf. Series, 1827(1), 012167.
11. Redmon, J., Divvala S., Girshick R., Farhadi A. (2015) You only look once: Unified, real-time object detection. Computer Vision and Pattern Recognition.
12. Zaidi, S.S., Ansari, M., Aslam, A. et al. (2022) A survey of modern deep learning based object detection models. Digital Signal Processing, 126, 103514.
13. Xu, R., Lin, H., Lu, K. et al. (2021) A forest fire detection system based on Ensemble Learning, Forests, 12(2), 217.
14. Jiang, P., Ergu, D., Liu, F. et al. (2022) A review of YOLO algorithm developments. Procedia Computer Sci., 199, 1066- 1073.
15. Skladchykov, I., Momot, A., Galagan, R. et al. (2022) Application of YOLOX deep learning model for automated object detection on thermograms. Information Extraction and Proc., 50, 69-77.