改进YOLOv8n的电路板缺陷检测算法
DOI:
CSTR:
作者:
作者单位:

长春理工大学电子信息工程学院长春130022

作者简介:

通讯作者:

中图分类号:

TM93;TP391.4

基金项目:

吉林省科技发展计划项目(20210201021GX)、国家重点研发计划项目(2018YFB1107600)资助


Improved YOLOv8n algorithm for PCB flaws detection
Author:
Affiliation:

School of Electronic and Information Engineering, Changchun University of Science and Technology, Changchun 130022, China

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    针对工业印制电路板(PCB)缺陷面积小、背景干扰导致误检漏检率高、缺陷定位难等问题,提出一种改进YOLOv8n的电路板缺陷检测算法。首先,通过调整骨干网络(backbone)中特征金字塔网络(feature pyramid networks,FPN)的特征融合层级,引入160×160微小目标特征层及检测头(head)替代原20×20大目标特征层及检测头,增强网络对小目标的特征提取能力。其次,在Backbone与颈部网络(neck)间引入并行补丁感知注意模块(parallelized patch-aware,PPA),通过多分支特征提取部分捕获目标不同尺度、不同级别的特征,加强模型局部和全局信息提取及融合能力,避免复杂背景特征干扰的同时提升了目标特征信息的利用效率。再者,在Neck端引入高效的多尺度注意模块(efficient multi-scale attention,EMA),避免更多顺序处理及模型深度的同时,增强了网络的跨空间学习能力。最后,采用NWD-EIoU(normalized wasserstein distance-efficient intersection over union)作为边界框回归损失函数,通过归一化Wasserstein距离构建几何感知的相似性度量,缓解检测框微小偏移导致的定位误差累积,提升模型对PCB微小缺陷的定位精度,并加速收敛。在公开电路板缺陷数据集PKU-Market-PCB上的实验结果表明,改进方法的平均精度均值(mAP)mAP@0.5相较于原始算法提升了4.2%,精度和召回率指标分别提升了7.7%、4.3%。与同类型单阶段目标检测方法相比,改进方法满足高精度电路板缺陷检测需求。

    Abstract:

    In order to solve the problems of small defect area of industrial printed circuit boards (PCB), high false detection and missed detection rate caused by background interference, and difficult defect location, an improved circuit board defect detection algorithm based on YOLOv8n was proposed. First, by adjusting the feature fusion levels of the feature pyramid networks (FPN) in the backbone network, introduce a 160×160 tiny-target feature layer and detection head to replace the original 20×20 large-target feature layer and detection head., which enhances the network’s ability to extract features of small targets. Secondly, a parallelized patch-aware (PPA) attention module is introduced between the backbone and the neck. Through the multi-branch feature extraction part, it captures features of different scales and levels of the target, strengthening the model’s ability to extract and fuse local and global information. While avoiding the interference of complex background features, it also improves the utilization efficiency of the target feature information. Furthermore, the efficient multi-scale attention module (EMA) is introduced at the neck end to avoid more sequential processing and model depth, and at the same time, the cross-space learning ability of the network is enhanced. Finally, normalized wasserstein distance-efficient intersection over union) is employed as the bounding box regression loss function (NWD-EIoU). By introducing the normalized Wasserstein distance (NWD) to construct a geometrically-aware similarity metric, it alleviates the cumulative localization errors caused by minor offsets of detection boxes, improves the model’s positioning accuracy for micro-defects on PCBs, and accelerates convergence. The experimental results on the publicly available PCB defect dataset PKU-Market-PCB show that the mAP@0.5 of the improved method has increased by 4.2% compared with the original algorithm. The Precision and Recall metrics have increased by 7.7% and 4.3% respectively. Compared with the same type of single-stage object detection methods, the improved method meets the requirements of high-precision PCB defect detection.

    参考文献
    相似文献
    引证文献
引用本文

王彩霞,郭鑫鹏,刘鹏.改进YOLOv8n的电路板缺陷检测算法[J].电子测量与仪器学报,2025,39(8):65-78

复制
分享
相关视频

文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:
  • 最后修改日期:
  • 录用日期:
  • 在线发布日期: 2025-11-20
  • 出版日期:
文章二维码
×
《电子测量与仪器学报》
关于防范虚假编辑部邮件的郑重公告