Scientific Reports (Aug 2024)

Defect detection of printed circuit board assembly based on YOLOv5

  • Minghui Shen,
  • Yujie Liu,
  • Jing Chen,
  • Kangqi Ye,
  • Heyuan Gao,
  • Jie Che,
  • Qingyang Wang,
  • Hao He,
  • Jian Liu,
  • Yan Wang,
  • Ye Jiang

DOI
https://doi.org/10.1038/s41598-024-70176-1
Journal volume & issue
Vol. 14, no. 1
pp. 1 – 16

Abstract

Read online

Abstract Detection of printed circuit board assembly (PCBA) defects is crucial for improving the efficiency of PCBA manufacturing. This paper proposes PCBA-YOLO, a YOLOv5-based method that can effectively increase the accuracy of PCBA defect detection. First, the spatial pyramid pooling module with cross-stage partial structure is replaced in the neck network of YOLOv5 to capture the resolution features at multiple scales. Second, large kernel convolution is introduced in the backbone network to obtain larger effective receptive fields while reducing computational overhead. Finally, an SIoU loss function that considers the angular cost is utilized to enhance the convergence speed of the model. In addition, an assembled PCBA defect detection dataset named PCBA-DET is created in this paper, containing the corresponding defect categories and annotations of defect locations. The experimental results on the PCB defect dataset demonstrate that the improved method has lower loss values and higher accuracy. Evaluated on the PCBA-DET dataset, the mean average precision reaches 97.3 $$\%$$ % , achieving a real-time detection performance of 322.6 frames per second, which considers both the detection accuracy and the model size compared to the YOLO series of detection networks. The source code and PCBA-DET dataset can be accessed at https://github.com/ismh16/PCBA-Dataset .