Abstract:Electronic products are developing toward miniaturization, complexity, and high performance. As a core functional carrier, the design density and manufacturing precision requirements of printed circuit boards (PCB) continue to increase, resulting in defects that are smaller and more similar to background features. Achieving high-precision, real-time defect detection while controlling costs is currently a critical technical challenge that needs to be addressed. To this end, this paper proposes a lightweight, high-precision detection framework based on an improved YOLOv11—global semantic exchange YOLO (GSE-YOLO). First, a deformable feature fusion (DFF) module is designed to dynamically adjust the receptive field and deformable convolution sampling positions, enhancing feature extraction and information interaction to provide rich feature representation. Next, a multi-layer exchange feature pyramid network (MRFPN) is constructed to retain shallow edge details guided by multi-layer semantics while reinforcing deep semantic representation. At the same time, a high-level semantic space is built to enable cross-scale and cross-location feature interaction, improving defect detection and perception capabilities in complex backgrounds. In addition, considering the characteristics of PCB defects, which are often tiny and appear in complex backgrounds, the YOLOv11 detection head (DH) is optimized to focus on small target regions, balancing accuracy and efficiency. On the HRIPCB public dataset, the model achieves 98.2% mAP@0.5 with 5.87×106 parameters and 13.4 GFLOPs computational cost, demonstrating its effectiveness and deployment potential for industrial PCB defect detection.