DOI: 10.3390/electronics13234626 ISSN: 2079-9292

Research on Deep Learning Model Enhancements for PCB Surface Defect Detection

Hao Yan, Hong Zhang, Fengyu Gao, Huaqin Wu, Shun Tang

With the miniaturization and increasing complexity of electronic devices, the accuracy and efficiency of printed circuit board (PCB) defect detection are crucial to ensuring product quality. To address the issues of small defect sizes and high missed detection rates in PCB surface inspection, this paper proposes an enhanced YOLOv8s model which not only improves detection performance but also achieves a lightweight design. Firstly, the Nexus Attention module is introduced, which organically integrates multiple attention mechanisms to further enhance feature extraction and fusion capabilities, improving the model’s learning and generalization performance. Secondly, an improved CGFPN network is designed to optimize multi-scale feature fusion, significantly boosting the detection of small objects. Additionally, the WaveletUnPool module is incorporated, leveraging wavelet transform technology to refine the upsampling process, accurately restoring detailed information and improving small-object detection in complex backgrounds. Lastly, the C2f-GDConv module replaces the traditional C2f module, reducing the number of model parameters and computational complexity while maintaining feature extraction efficiency. Comparative experiments on a public PCB dataset demonstrate that the enhanced model achieved a mean average precision (mAP) of 97.3% in PCB defect detection tasks, representing a 3.0% improvement over the original model, while reducing Giga Floating Point Operations (GFLOPs) by 26.8%. These enhancements make the model more practical and adaptable for industrial applications, providing a solid foundation for future research.

More from our Archive