SME-YOLO: A Real-Time Detector for Tiny Defect Detection on PCB Surfaces
Meng Han
TL;DR
This work tackles the challenge of real-time detection of extremely tiny PCB surface defects by extending YOLOv11n into SME-YOLO, a lightweight detector that integrates three targeted innovations: NWDLoss, which models bounding boxes as 2D Gaussians and uses Normalized Wasserstein Distance to stabilize localization of small objects; MSFA, a scale-focused attention module that concentrates on the dominant defect scales with an implicit ensemble design; and EUCB, an efficient upsampling block that preserves edge and texture details during feature map reconstruction. The approach yields state-of-the-art results on the PKU-Market-PCB dataset, notably improving mAP and precision over baselines while maintaining low computational overhead. The combination of robust tiny-object localization, focused multi-scale feature extraction, and efficient upsampling enables reliable real-time PCB defect detection, with implications for manufacturing quality control. Future work includes evaluating on larger, more diverse datasets and exploring robustness under challenging imaging conditions.
Abstract
Surface defects on Printed Circuit Boards (PCBs) directly compromise product reliability and safety. However, achieving high-precision detection is challenging because PCB defects are typically characterized by tiny sizes, high texture similarity, and uneven scale distributions. To address these challenges, this paper proposes a novel framework based on YOLOv11n, named SME-YOLO (Small-target Multi-scale Enhanced YOLO). First, we employ the Normalized Wasserstein Distance Loss (NWDLoss). This metric effectively mitigates the sensitivity of Intersection over Union (IoU) to positional deviations in tiny objects. Second, the original upsampling module is replaced by the Efficient Upsampling Convolution Block (EUCB). By utilizing multi-scale convolutions, the EUCB gradually recovers spatial resolution and enhances the preservation of edge and texture details for tiny defects. Finally, this paper proposes the Multi-Scale Focused Attention (MSFA) module. Tailored to the specific spatial distribution of PCB defects, this module adaptively strengthens perception within key scale intervals, achieving efficient fusion of local fine-grained features and global context information. Experimental results on the PKU-PCB dataset demonstrate that SME-YOLO achieves state-of-the-art performance. Specifically, compared to the baseline YOLOv11n, SME-YOLO improves mAP by 2.2% and Precision by 4%, validating the effectiveness of the proposed method.
