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

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

• Graphics and Images • Previous Articles     Next Articles

A PCB defect detection algorithm based on improved ESP-YOLO

WANG Haiqun,WANG Bingnan,GE Chao   

  1. (College of Electrical Engineering,North China University of Science and Technology,Tangshan 063210,China)
  • Received:2023-11-07 Revised:2024-03-19 Online:2025-02-25 Published:2025-02-24

Abstract: Defect detection of PCB boards is a crucial means to ensure their quality. To avoid missed and false detections and to enhance the speed of PCB defect detection, an improved ESP-YOLO algorithm for PCB defect detection is proposed. This algorithm incorporates the ESP network structure, utilizing ESP blocks for downsampling, and improves the feature extraction module by adopting a lighter network structure for feature extraction, thereby solving the problem of large PCB defect detection models being difficult to deploy. Additionally,  a parameter-free attention mechanism SimAM  is introduced to increase the algorithm’s focus on targets in complex environments without increasing the number of network parameters, addressing the issue of missed PCB defect detections due to complex backgrounds. Furthermore, the RFB multi-scale feature extraction module is introduced to expand the model’s receptive field and improve its multi-scale feature extraction capability, solving the problem of missed detections due to varying defect sizes. A learnable parametric feature fusion module, BiFPN, is also introduced to enhance the feature representation ability of the fused feature map. Experimental results show that the ESP-YOLO algorithm has a parameter count of 5.32×106 and a GFLOPs of 11.2, representing a reduction of 23.8% and 29.1% respectively compared to the original YOLOv5s algorithm. The average accuracy is 97.8%, representing an improvement of 3.2% compared to the original algorithm.

Key words: PCB defect detection, efficient spatial pyramid network(ESPNet), simple and parameter-free attention module(SimAM), receptive field block(RFB), bi-directional feature pyramid network_add(Bi-FPN), YOLOv5s