| Abstract [eng] |
In this master’s final project, the detection of surface-mounted electronic components on printed circuit boards is investigated using automated optical inspection and YOLO-family neural networks. The aim of the work is to develop and investigate an AOI system for PCB component detection by evaluating the influence of RGBW lighting and PCB orientation on detection quality. The literature analysis discusses classical image processing, machine learning, deep learning, AOI, and YOLO-based methods, while AXI, ICT, and other testing methods are considered as part of the broader context of electronics quality control. The experimental AOI system was implemented using a Raspberry Pi 5, a Raspberry Pi AI HAT+ 26 TOPS module, a Raspberry Pi AI Camera with a Sony IMX500 sensor, RGBW lighting, and a Shelly RGBW controller. The system is designed to capture PCB images, control lighting modes, perform YOLO model inference in the HAILORT / HAILO8 environment, and record detection results in a CSV file. For model training, a dataset consisting of 54,534 annotated images and 475,067 annotations was used. The dataset was divided into training, validation, and testing subsets in an 80 / 10 / 10 % ratio. Four YOLO-family models were trained and compared in the study: YOLOv5mu, YOLOv8m, YOLOv11m, and YOLOv26m. The best training results were achieved by the YOLOv11M model: mAP0.5 = 94.8 %, mAP0.5:0.95 = 80.8 %, precision = 89.7 %, and recall = 90.2 %. Tests in the AOI stand were performed using 4 YOLO models, 9 PCB boards, 4 PCB orientations, and 4 RGBW lighting modes. In total, 576 experimental PCB images were obtained. Under the AOI stand conditions, the highest number of components was detected by the YOLOv8m model – 949 detections, of which 146 had a confidence value of at least 50 %. The YOLOv5mu model detected 888 components and operated the fastest, with an average inference time of 210.15 ms per image; however, this model produced 88 false markings. The inference time of YOLOv8m was 233.77 ms, and the number of false markings was 58. The lighting study showed that white RGBW lighting was the most effective, producing 1,353 detections. Green lighting produced 579 detections, red lighting 234, and blue lighting 45. The effect of PCB orientation was smaller: the difference between the highest and lowest number of detections was 24 detections, or about 4.3 %. The results showed that the best training metrics do not always correspond to the best results in the real AOI stand. Although YOLOv11M achieved the best mAP values during training, YOLOv8M demonstrated the best balance between component detection and practical applicability under real optical inspection conditions. For practical application of the developed AOI system, the YOLOv8M model, white RGBW lighting, and a 1,280 × 1,280 pixel input image are recommended. |