Abstract:To address the issues of heavy computational burden and difficulty in meeting real-time lightweight requirements of existing PCB defect detection methods, this study designs a lightweight printed circuit board defect detection model named PMAC-YOLO. To achieve an efficient balance between accuracy and lightweight requirements, the model is designed with three core optimized modules: first, a lightweight C3k2_PMLCA module is constructed by fusing partial convolution with the mixed local channel attention mechanism, enhancing the model′s ability to extract and perceive small-target features in complex backgrounds. Second, an ADSdown adaptive depthwise separable downsampling module is proposed to achieve lightweight downsampling while dynamically adjusting the degree of information retention. Additionally, a cross-scale feature fusion module is introduced to fuse multi-scale features, thereby improving the model’s adaptability to scale variations and the detection accuracy of small-target defects. Experiments are conducted on the DeepPCB dataset and the HRIPCB enhanced dataset. The results demonstrate that PMAC-YOLO achieves mAP@05 of 98.8% and 99.1% respectively, representing an improvement of 0.3% and 0.4% compared to the baseline model YOLOv11. Meanwhile, the number of parameters is reduced to 1.22×10-6, the computational complexity is decreased to 3.4 GFLOPs, and the model weight file size is only 2.8 MB, which are 52.64%, 46.03%, and 49.09% lower than those of the baseline, respectively. These results indicate that PMAC-YOLO significantly reduces model complexity and resource consumption while maintaining excellent or even superior detection accuracy, successfully achieving an effective balance between accuracy and lightweight performance. This study provides a feasible lightweight solution for real-time PCB defect detection.