Printed Circuit Board Defect Detection Algorithm Based on yolov5s Structure Improvement

Rui-Qiang Guo,Ya-Pin Zhang,Jing-Qi Hu,Pei-Yong Ji,Min Li
DOI: https://doi.org/10.1166/jno.2024.3584
2024-04-01
Journal of Nanoelectronics and Optoelectronics
Abstract:In terms of the existing PCB defect detection algorithm in complicated model structure with huge numbers of parameters slow speed, low detection accuracy and other problems, an improved PCB defect detection algorithm which is based upon yolov5s is proposed. Taking the yolov5s model as the main framework, the Omni-Dimensional Dynamic Convolution (OdConv) structure is used to replace the backbone of the original model, and the Convolutional Block Attention Module (CBAM) attention mechanism is introduced after the Conv layer of the Neck network. CBAM attention mechanism is brought in after the Conv layer of the Neck network (Neck), and the Focal-EIoU Loss function is modified by the Complete Intersection and Merger Ratio Loss (CIoU Loss) function, and different weights are assigned to high-quality samples and low-quality samples respectively, which solves sample imbalance existing in the target detection problem, and the results show that this algorithm is comparable to the original model. Experiments are conducted and the results show that this paper’s algorithm improves the mAP by 1.9%, speeds up by 47.75Fps, decrease the model size by 13.26 M, and reduces the computation volume by 12.3 G compared to yolov5s at IoU = 0.5.
engineering, electrical & electronic,nanoscience & nanotechnology,physics, applied
What problem does this paper attempt to address?