An Efficient Machine Learning-Enhanced YOLOv11 Network for Small-Scale Defect Recognition in PCB Inspection
Abstract
Accurate detection of small and low-contrast printed circuit board (PCB) defects remains challenging. To address this problem, we propose SDL-YOLO, a YOLO11n-based detector designed to improve small-defect representation while controlling computational cost. A Detection-Optimized Sparse Mixture-of-Experts (DS-MOE) module is embedded in the backbone to enable input-adaptive feature extraction through heterogeneous experts and sparse routing. At the P2–P3 fusion node, a Small Object Enhanced Module (SOEM) integrates local texture details with multi-scale and global contextual information, thereby strengthening the representation of small and low-contrast defects. In addition, a Lightweight Shared Convolutional Detection (LSCD) head reduces parameter redundancy through cross-level weight sharing, group normalization, and level-specific scale calibration while preserving scale-specific prediction capability. Experiments on the PKU PCB and DeepPCB datasets validate the effectiveness of the proposed method. On PKU PCB, SDL-YOLO achieves an mAP@0.5 of 96.4% and an mAP@0.5:0.95 of 51.4%, outperforming YOLO11n by 2.70 and 2.90 percentage points, respectively. On DeepPCB, it achieves an mAP@0.5 of 98.87% and an mAP@0.5:0.95 of 79.46%, corresponding to improvements of 0.47 and 4.66 percentage points, respectively. Under TensorRT FP16 engine-only benchmarking on an RTX 4090, SDL-YOLO achieves a mean latency of 0.984 ms and a throughput of 1013.95 inferences/s. Overall, SDL-YOLO provides an effective balance between small-defect detection accuracy and deployment efficiency for GPU-based PCB inspection.