• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

Computer Engineering & Science ›› 2025, Vol. 47 ›› Issue (2): 276-287.

• Graphics and Images • Previous Articles     Next Articles

PCB surface defect dataset and detection based on YOLOv5s-P6SE

LIANG Tairan1,JIANG Shixin2,3,LI Quanzhou2,3,OUYANG Bin1,Lv Shengping1   

  1. (1.College of Engineering,South China Agricultural University,Guangzhou 510642;
    2.CEPREI,Guangzhou 511370;
    3.Key Laboratory of Industrial Equipment Quality Big Data,Guangzhou 511370,China)
  • Received:2023-10-07 Revised:2023-12-27 Online:2025-02-25 Published:2025-02-24

Abstract: To address the demand for surface defect detection in PCB production, a defect classification standard encompassing 11 categories was established based on actual workshop conditions, images of real PCB surface defects were collected, and finally a dataset named Dataset_PCBSD was constructed, containing 3 239 images with 4 672 defective objects. A new PCB surface defect detection model, YOLOv5s-P6SE, was developed based on improvements to YOLOv5s. To enhance detection accuracy, a P6 detection layer for detecting extremely large objects was added to YOLOv5s, along with the introduction of the SE attention module and soft non-maximum suppression post-processing. Experimental results show that YOLOv5s-P6SE achieves a 5.5% improvement in mean average precision (mAP) compared to the baseline model YOLOv5s. Additionally, YOLOv5s-P6SE outperforms Faster R-CNN, SSD, the PCB defect detection model YOLOv4-MN3, and the DETR model RT-DETR-L in terms of both mAP and model size. It also excels in balancing mAP and model size compared to YOLOv8s. 

Key words: printed circuit board, surface defect detection, YOLOv5s-P6SE, SE attention module, soft non-maximum suppression