Synergistic Re-parameterizable Attention and Context-Aware Fusion for PCB Defect Detection
摘要
The automated detection of defects on Printed Circuit Boards (PCBs) is a critical task where existing deep learning methods face bottlenecks in feature extraction for from-scratch training and feature fusion. To overcome these issues, this paper proposes RCF-Net, a novel lightweight detection architecture. Its core innovations are twofold: a Re-parameterizable Attention Block (Rep-Att Block) is designed for the backbone to achieve superior feature representation at zero extra inference cost; and a Context-Aware Detail Injection Block (CADI-Block) is introduced in the neck for guided detail refinement. The entire framework is supervised by a composite loss function to ensure robust optimization. Experiments on the public PKU-PCB dataset demonstrate three significant advantages of the proposed method. First, in terms of comprehensive precision, the Rep-Att Block variant achieves a mAP@.5:.95 of 57.5%, which is 1.2 percentage points higher than the fine-tuned YOLOv11 baseline, showcasing its superior feature learning capability. Second, the final RCF-Net model reaches a mAP@.5 of 98.3%, outperforming competitive methods like YOLO-DFA (96.4%). Third, and most importantly, while achieving the same top-tier accuracy as CDI-YOLO (98.3%), RCF-Net’s parameter count is only 2.29 M, which represents a 59.9% reduction in model size. This result establishes a new state-of-the-art benchmark for the accuracy-efficiency trade-off in PCB defect detection.