A Lightweight PCB Defect Detection Method Based on Heterogeneous Feature Enhancement and Discrepancy-Guided Fusion
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 [email protected] of 94.46%, and an [email protected]: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.
Authors
- Yongchang Zhang (ORCID: https://orcid.org/0000-0001-8480-2948)
- Yujie Pei
- Xuehong Gao (ORCID: https://orcid.org/0000-0002-3840-0275)
- Guozhong Huang (ORCID: https://orcid.org/0000-0002-0012-368X)
- Shenyuan Gao (ORCID: https://orcid.org/0000-0002-4797-2240)
- Lili Lei
- Ying Liu
Institutions
- University of Science and Technology Beijing (CN)
- Tsinghua University (CN)
Publication Details
- Journal
- Sensors
- Published
- 2026-09-21
- DOI
- https://doi.org/10.3390/s26185984
- Primary Topic
- Industrial Vision Systems and Defect Detection
- Type
- article
- Field-Weighted Citation Impact
- 0.00