关键词:
YOLO
缺陷检测
多头混合自注意力机制(MMSA)
小目标检测
摘要:
PCB缺陷检测是电子制造业质量控制的重要组成部分。PCB板在生产过程中可能遭遇各种环境与工艺因素的影响缺陷类型复杂多样,准确检测这些缺陷是提高生产效率和电子产品质量的关键。针对PCB缺陷特点,本文提出了一种结合多头混合自注意力机制改进YOLOv11n模型的PCB缺陷检测方法,以提高检测精度和鲁棒性。通过将MMSA嵌入YOLOv11n框架的Backbone和Neck部分,增加的小目标检测层,增强对PCB缺陷特征的提取与融合能力,提升了对PCB微小缺陷的识别能力。实验结果表明,该方法在PKU-Market-PCB数据集上实现了94.8%的mAP@0.5,相较于YOLOv11n提升了1.6%,且优于其他主流检测算法,显示了其在PCB缺陷检测中的显著优势。PCB defect detection is a crucial component of quality control in the electronics manufacturing industry. During production, PCBs may encounter a variety of environmental and process factors, leading to complex and diverse types of defects. Accurately detecting these defects is key to improving production efficiency and the quality of electronic products. In response to the characteristics of PCB defects, this study proposes a PCB defect detection method that improves the YOLOv11n model by integrating a multi-head mixed self-attention mechanism (MMSA) to enhance detection accuracy and robustness. By embedding MMSA into the Backbone and Neck sections of the YOLOv11n framework, and adding a small target detection layer, this approach enhances the capability to extract and merge features of PCB defects, thus improving the recognition of minute PCB flaws. Experimental results demonstrate that this method achieves an mAP@0.5 of 94.8% on the PKU-Market-PCB dataset, which is a 1.6% improvement over the YOLOv11n baseline and surpasses other mainstream detection algorithms, highlighting its significant advantages in PCB defect detection.