Improved YOLOv5s combining enhanced backbone network and optimized self-attention for PCB defect detection
Yongfa Zhang,Ming Xu,Qing Zhu,Shuo Liu,Guojin Chen
DOI: https://doi.org/10.1007/s11227-024-06223-5
IF: 3.3
2024-05-27
The Journal of Supercomputing
Abstract:As the foundation of circuits and electronic systems, the quality of printed circuit boards (PCBs) is directly related to the reliability of the whole system. At present, deep learning-based target detection technology has a broad application prospect in PCB defect detection. However, there are still some shortcomings in the process of detection. For example, the detection speed is slow, and the detection accuracy is not ideal for defects with small size. Therefore, this paper proposes an improved algorithm based on the YOLOv5s model to improve the detection of PCB defects. The algorithm enhances the connection between the shallow and high layers of the network by improving the backbone network structure. Meanwhile, a self-attention mechanism is introduced into YoloHead to enhance the feature extraction and the ability to focus on the global information of the feature map, and the self-attention mechanism is optimized by combining the computational characteristics of the SENet, the CBAM and the residual unit. While improving the accuracy of PCB defect detection, better computational efficiency is ensured. In subsequent experiments, this paper trains and tests the improved YOLOv5s algorithm using publicly available PCB defect datasets. The results show that the algorithm achieves a detection rate of 39.7 frames per second and a maximum average precision of 96.14%, which is a 4.68% improvement over the original YOLOv5s.
computer science, theory & methods,engineering, electrical & electronic, hardware & architecture