A Lightweight PCB Defect Detection Algorithm Based on Improved YOLOv8-PCB
作者:Jianan Wang, Xin Xie, Guoying Liu, Liang Wu · 发表于:Symmetry · 年份:2025 · DOI:10.3390/sym17020309 · 被引用次数:33 · 研究领域:Industrial Vision Systems and Defect Detection、Image Processing Techniques and Applications
Tackling the widespread problems of inaccuracies, slow detection speed, and poor adaptability in small object defect detection on PCB circuits, this study suggests a lightweight printed circuit board surface defect identification algorithm, building upon an improved YOLOv8-PCB. This algorithm first introduces the C2f_SHSA attention mechanism in the backbone network, which unites the merits of channel attention and spatial attention, facilitating an efficient fusion of local and global features in a lightweight manner, thereby enhancing the model’s identification preciseness for small defects. Subsequently, in the neck network, the C2f_IdentityFormer structure, which combines the C2f structure with the IdentityFormer structure, supplants the initial C2f structure. This enhancement improves the model’s sensitivity to subtle features and further optimizes the effect of feature fusion. Eventually, the PIoU is presented to enhance the model’s adaptability to small, complex PCB defects with varying sizes and shapes, while also accelerating the mode’s convergence speed. Experimental outcomes reveal that the improved YOLOv8-PCB algorithm displays remarkable performance in the PCB dataset, with a Recall rate of 94.0%, a mean Average Precision (mAP) of 96.1%, and an F1 score of 94.35%. Moreover, the model’s weight size is only 5.2 MB. Compared to the YOLOv8n baseline model, the Recall rate has a 3.6% improvement, the mAP is raised by 1.8%, and the F1 score is enhanced by 1.9%, while th...