Related Experiment Videos
A Lightweight PCB Defect Detection Method Based on Heterogeneous Feature Enhancement and Discrepancy-Guided Fusion
Yujie Pei1, Xuehong Gao1, Shenyuan Gao1
1Research Institute of Macro-Safety Science, University of Science and Technology Beijing, Beijing 100083, China.
Abstract:
Accurate detection of small and weak defects is essential for ensuring the manufacturing quality and operational reliability of printed circuit boards (PCBs). Existing detectors, however, remain constrained by insufficient fine-grained feature representation, interference from repetitive conductive backgrounds, localization instability, and excessive computational complexity. To address these limitations, a lightweight defect detection model, termed Compact Recalibration and Fusion YOLO (CRF-YOLO), is developed based on YOLO11n. C3k2-Lite integrates partial-channel spatial modeling with cross-stage feature aggregation, reducing redundant computation while retaining essential defect information. The Residual Feature Fusion Attention module (RFFA) performs heterogeneous defect-evidence decomposition by jointly encoding positional, boundary, connectivity, and texture cues. Independently gated evidence aggregation and dual-dimensional feature recalibration strengthen weak contour interruptions, abnormal conductive connections, and subtle texture disturbances embedded in complex circuit backgrounds. The Residual Cross-Fusion module (RCF) establishes discrepancy-guided dual-stream feature reconciliation between the original and attention-enhanced representations. Location-adaptive feature selection and structure-aware detail reconstruction preserve low-amplitude defect cues while selectively incorporating discriminative information. Shape-NWD is adopted to improve the localization stability of small, elongated, and geometrically irregular defects. Experimental results show that CRF-YOLO achieves a Precision of 95.53%, a Recall of 91.26%, an mAP@0.5 of 94.46%, and an mAP@0.5:0.95 of 51.74%, with 2.175 M parameters and 6.0 GFLOPs. Compared with representative mainstream object detectors, the proposed model delivers superior overall detection performance while maintaining more favorable lightweight characteristics. A browser-based inspection interface is also implemented to support image uploading, automated defect detection, and result visualization, demonstrating the practical deployment potential of the proposed approach.