Home / Current Issue / Paper 1725488
ML-Based Next-Generation Vision System for Bare PCB Defect Detection
Subject area: Science,Engineering and Technology · Area of research: Machine Learning
Abstract
Surface defects on bare printed circuit boards (PCBs), such as scratches, solder-mask misalignment over pads and mask peeling, affect board reliability, yet manual inspection is slow and varies from one inspector to another. This paper presents a machine-learning-based vision system that combines classical image preprocessing with deep-learning object detection to localise selected surface defects on bare PCBs. A dataset of 344 mobile-phone images covering three PCB layouts was annotated in Label Studio with three classes: Scratch, Mask on Pad (MP) and Mask Peel-Off (MF). Every captured image is first processed with OpenCV through BGR-to-HSV conversion, HSV-based segmentation, erosion and dilation, boundary detection, cropping, perspective correction and resizing to a standard resolution. The standardised board image is then passed to a YOLO26n detector trained for 100 epochs on a laptop CPU at an image size of 1280 × 1280 pixels. A Flask-based web application, PCB Vision, ties the workflow together and reports bounding boxes, class labels, confidence scores, severity labels, geometric measurements, Pareto analysis, process-feedback suggestions, annotated images and PDF inspection reports. In a demonstration inspection the system displayed 98 defect regions (65 MP, 21 MF and 12 Scratch) with a recorded end-to-end processing time of 2.1403 s. The work shows how preprocessing, defect localisation and reporting can be integrated into a single prototype; a quantitative evaluation on the held-out test subset is left for future work.
Keywords
bare printed circuit board, automated optical inspection, computer vision, image preprocessing, HSV segmentation, YOLO26n, deep learning, object detection, PCB defect detection
References
[1] Ling Q, Mat Isa NA. Printed circuit board defect detection methods based on image processing, machine learning and deep learning: a survey. IEEE Access. 2023;11:15921–15944.
[2] Zhou L. Research on PCB defect detection method based on principal component analysis. In: Proceedings of the IEEE 8th Information Technology and Mechatronics Engineering Conference (ITOEC); 2025. p. 1070–1074.
[3] Ghorpade DD, Patil SR. A hybrid system for PCB defect detection using YOLOv8 and graph-based alternate path analysis. In: Proceedings of the 5th Asian Conference on Innovation in Technology (ASIANCON); 2025.
[4] Nitish K, Koduru UCR, Gurucharan GJ, Selvam P, Jayabal R. Printed circuit board (PCB) defect detection using YOLOv5. In: Proceedings of the 3rd International Conference on Emerging Applications of Material Science and Technology (ICEAMST); 2025.
[5] Zhu S, Luo S, Liu J. PCB defect detection based on YOLOv8 model. In: Proceedings of the IEEE 7th Advanced Information Management, Communicates, Electronic and Automation Control Conference (IMCEC); 2025. p. 392–396.
[6] Li J, et al. An improved feature extraction and fusion model for PCB surface defect detection. In: Proceedings of the 6th International Conference on Internet of Things, Artificial Intelligence and Mechanical Automation (IoTAIMA); 2025.
[7] Yu J, Gao Y. Defect detection on PCB bare boards based on improved YOLOv8 algorithm. In: Proceedings of the 3rd International Conference on Cloud Computing, Big Data Application and Software Engineering (CBASE); 2024.
[8] Ai Y, Ye T. Surface defect detection algorithm for PCB based on improved YOLOv8. In: Proceedings of the 8th International Conference on Electrical, Mechanical and Computer Engineering (ICEMCE); 2024. p. 1421–1425.
[9] Hu T, Lu Y, Liu C, Zhuang D. Research on PCB defect detection method based on deep learning. In: Proceedings of the 5th International Conference on Computer Engineering and Intelligent Control (ICCEIC); 2024. p. 303–307.
[10] Zhu H, Luo R, Lan H, Ren Q, Chen C. PCB defect detection algorithm of improved YOLOv8. In: Proceedings of the 8th International Conference on Image, Vision and Computing (ICIVC); 2023.
[11] Ji X, Zhao S. Research on visual detection and classification technology for surface defects of printed circuit boards. In: Proceedings of the 3rd International Conference on Electronic Information Engineering and Computer Science (EIECS); 2023. p. 313–316.
How to cite this paper
@article{1725488,
author = {Harshitha R, Keerthana L, N D Pannaga, Prajna H U},
title = {ML-Based Next-Generation Vision System for Bare PCB Defect Detection},
journal = {Iconic Research And Engineering Journals},
year = {2026},
volume = {10},
number = {5},
pages = {4767-4790},
issn = {2456-8880},
url = {https://www.irejournals.com/formatedpaper/1725488.pdf},
abstract = {Surface defects on bare printed circuit boards (PCBs), such as scratches, solder-mask misalignment over pads and mask peeling, affect board reliability, yet manual inspection is slow and varies from one inspector to another. This paper presents a machine-learning-based vision system that combines classical image preprocessing with deep-learning object detection to localise selected surface defects on bare PCBs. A dataset of 344 mobile-phone images covering three PCB layouts was annotated in Label Studio with three classes: Scratch, Mask on Pad (MP) and Mask Peel-Off (MF). Every captured image is first processed with OpenCV through BGR-to-HSV conversion, HSV-based segmentation, erosion and dilation, boundary detection, cropping, perspective correction and resizing to a standard resolution. The standardised board image is then passed to a YOLO26n detector trained for 100 epochs on a laptop CPU at an image size of 1280 × 1280 pixels. A Flask-based web application, PCB Vision, ties the workflow together and reports bounding boxes, class labels, confidence scores, severity labels, geometric measurements, Pareto analysis, process-feedback suggestions, annotated images and PDF inspection reports. In a demonstration inspection the system displayed 98 defect regions (65 MP, 21 MF and 12 Scratch) with a recorded end-to-end processing time of 2.1403 s. The work shows how preprocessing, defect localisation and reporting can be integrated into a single prototype; a quantitative evaluation on the held-out test subset is left for future work.},
keywords = {bare printed circuit board, automated optical inspection, computer vision, image preprocessing, HSV segmentation, YOLO26n, deep learning, object detection, PCB defect detection},
month = {November},
}