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.
翻译:印刷电路板(PCB)的表面缺陷直接影响产品的可靠性与安全性。然而,由于PCB缺陷通常具有尺寸微小、纹理相似度高以及尺度分布不均等特点,实现高精度检测具有挑战性。为解决这些问题,本文提出了一种基于YOLOv11n的新型框架,命名为SME-YOLO(小目标多尺度增强YOLO)。首先,我们采用归一化瓦瑟斯坦距离损失函数。该度量有效缓解了交并比对微小目标位置偏差的敏感性。其次,将原始上采样模块替换为高效上采样卷积块。通过利用多尺度卷积,该模块逐步恢复空间分辨率,并增强对微小缺陷边缘及纹理细节的保留能力。最后,本文提出了多尺度聚焦注意力模块。该模块针对PCB缺陷特定的空间分布进行设计,自适应地增强关键尺度区间内的感知能力,实现局部细粒度特征与全局上下文信息的高效融合。在PKU-PCB数据集上的实验结果表明,SME-YOLO达到了最先进的性能。具体而言,相较于基线模型YOLOv11n,SME-YOLO将mAP提升了2.2%,精确率提升了4%,验证了所提方法的有效性。