DECNet: an efficient improved model for printed circuit board surface defect detection
摘要
Printed Circuit Boards (PCBs) are core components in electronic products, and defect detection is crucial for ensuring production quality. However, PCB defects are typically characterized by small sizes and high susceptibility to background interference. To address this issue, this study proposes an improved model based on YOLOv8, named DECNet. Firstly, a novel feature extraction module, C2fDMA, is designed to replace the original C2f module, enhancing the model’s ability to perceive defects of different sizes and shapes. Secondly, an Efficient Adaptive Downsampling (EADS) module is introduced to replace the original downsampling method, reducing computational complexity while maintaining detection accuracy. Additionally, a neck structure, namely the Concentrating Diffusion Pyramid Network (CDPN), is proposed to effectively alleviate the loss of semantic feature information and better fuse multi-scale features. Finally, the NWIoU loss function is adopted, which improves the model’s detection performance for small targets. Experimental results on the PKU-Market-PCB dataset demonstrate that, driven by the synergy of the aforementioned improvements, the proposed DECNet model achieves a mean Average Precision (mAP) of 96.5%–a 2.3% enhancement compared with the baseline model. Meanwhile, the model’s parameter count is reduced by 15.0% and the model size is decreased by 13.6%. To further verify the generalization ability, additional experiments are conducted on the DeepPCB dataset, and the results confirm the effectiveness of the proposed method.