IEEE Access (Jan 2024)

SMC-YOLO: Surface Defect Detection of PCB Based on Multi-Scale Features and Dual Loss Functions

  • Wei-Bin Kong,
  • Zhi-Fei Zhang,
  • Ting-Lin Zhang,
  • Lei Wang,
  • Zi-Yao Cheng,
  • Mo Zhou

DOI
https://doi.org/10.1109/ACCESS.2024.3434559
Journal volume & issue
Vol. 12
pp. 137667 – 137682

Abstract

Read online

The detection of surface defects on printed circuit board (PCB) plays a vital role. However, current defect detection methods face significant challenges, such as frequently misidentifying non-defective areas as defects, low defect recognition capability, and diminished accuracy in identifying minor defects. To address these challenges, a novel defect detection network based on the YOLOv7-tiny network framework is proposed (SMC-YOLO). In this paper, we have improved the (Spatial Pyramid Pooling, Cross Stage Partial Channel) SPPCSPC module by adding three additional convolutional layers and introducing an extra feature channel below the max-pooling layer. These enhancements help in capturing fine-grained features and preserving crucial information, which is essential for detecting tiny defects on PCB. Additionally, we have modified the connection method between the max-pooling layers, changing from a parallel to a serial connection to reduce information loss. On this basis, incorporating the multi-head self-attention (MHSA) mechanism at the SPPCSPC module output enhances the network’s ability to focus on critical features across various scales, effectively capturing and utilizing detailed information, thereby improving the detection performance for small defects. Furthermore, the introduction of the content-aware reassembly of features (CARAFE) lightweight upsampling operator restores fine-grained details like defect edges and textures. It also preserves contextual information such as spatial relationships and background consistency, resulting in improved upsampling outcomes. Finally, The effective integration of the normalized wasserstein distance (NWD) loss function and the efficient IoU (EIoU) loss function further enhances the positioning accuracy and convergence efficiency of the SMC-YOLO defect detection algorithm. In comparison to the original YOLOv7-tiny network, the proposed network showcases notable advancements in detection performance. The experimental results demonstrate that the proposed network achieves a detection speed of 114.94 FPS while maintaining the mAP value of 97.4%. It is evident that the SMC-YOLO network effectively detects surface defects in PCB manufacturing and holds promising potential for implementation on embedded systems.

Keywords