PCB defect detection algorithm based on CDI-YOLO

Gaoshang Xiao,Shuling Hou,Huiying Zhou
DOI: https://doi.org/10.1038/s41598-024-57491-3
IF: 4.6
2024-03-30
Scientific Reports
Abstract:During the manufacturing process of printed circuit boards (PCBs), quality defects can occur, which can affect the performance and reliability of PCBs. Existing deep learning-based PCB defect detection methods are difficult to simultaneously achieve the goals of high detection accuracy, fast detection speed, and small number of parameters. Therefore, this paper proposes a PCB defect detection algorithm based on CDI-YOLO. Firstly, the coordinate attention mechanism (CA) is introduced to improve the backbone and neck network of YOLOv7-tiny, enhance the feature extraction capability of the model, and thus improve the accuracy of model detection. Secondly, DSConv is used to replace part of the common convolution in YOLOv7-tiny to achieve lower computing costs and faster detection speed. Finally, Inner-CIoU is used as the bounding box regression loss function of CDI-YOLO to speed up the bounding box regression process. The experimental results show that the method achieves 98.3% mAP on the PCB defect dataset, the detection speed is 128 frames per second (FPS), the parameters is 5.8 M, and the giga floating-point operations per second (GFLOPs) is 12.6 G. Compared with the existing methods, the comprehensive performance of this method has advantages.
multidisciplinary sciences
What problem does this paper attempt to address?
The paper mainly addresses the issue of quality defects in the manufacturing process of printed circuit boards (PCBs) and proposes a PCB defect detection algorithm based on CDI-YOLO. Existing deep learning-based PCB defect detection methods find it difficult to achieve high detection accuracy, fast detection, and fewer parameters simultaneously. Therefore, the paper proposes the following improvements: 1. **Introduction of Coordinate Attention Mechanism (CA)**: To enhance the model's feature extraction capability and improve detection accuracy, the paper introduces the coordinate attention mechanism into the base network of YOLOv7-tiny. The CA mechanism allows the model to consider both the relationships between feature channels and the positional information in the feature space during training, helping the model to focus more on PCB defect features. 2. **Use of Depthwise Separable Convolution Variant (DSConv)**: By replacing some of the standard convolution layers in YOLOv7-tiny with DSConv, the computational cost is reduced and the detection speed is increased. 3. **Adoption of Inner-CIoU Loss Function**: The paper uses Inner-CIoU as the loss function for bounding box regression. Compared to the CIoU loss function, it can perform bounding box regression faster and improve regression efficiency. Experimental results show that the proposed CDI-YOLO method achieves an average precision of 98.3% on the PCB defect dataset, with a detection speed of 128 frames per second, a parameter count of 5.8M, and 12.6G floating-point operations. Compared to existing methods, this method has advantages in terms of overall performance. In summary, this study aims to develop a new PCB defect detection algorithm that can maintain high detection accuracy while improving detection speed and reducing model parameters to meet the needs of practical applications.