欢迎访问《图学学报》 分享到:

图学学报 ›› 2024, Vol. 45 ›› Issue (1): 47-55.DOI: 10.11996/JG.j.2095-302X.2024010047

• 图像处理与计算机视觉 • 上一篇    下一篇

基于融合MBAM与YOLOv5的PCB缺陷检测方法

胡欣1(), 胡帅1, 马丽军2, 司利云1(), 肖剑3, 袁晔4   

  1. 1.长安大学能源与电气工程学院,陕西 西安 710064
    2.国网甘肃省电力公司天水电力公司,甘肃 天水 741000
    3.长安大学电子与控制工程学院,陕西 西安 710064
    4.西安交通大学电子与信息学部,陕西 西安 710049
  • 收稿日期:2023-08-26 接受日期:2023-11-03 出版日期:2024-02-29 发布日期:2024-02-29
  • 通讯作者:司利云(1975-),女,讲师,博士。主要研究方向为电力系统大数据分析、智能算法等。E-mail:siliyun@chd.edu.cn
  • 第一作者:胡欣(1975-),女,教授,博士。主要研究方向为能源管理、计算机视觉和机器学习等。E-mail:huxin@chd.deu.cn
  • 基金资助:
    陕西省秦创原“科学家+工程师”队伍建设项目(2024QGY-KXJ-161);西安市重点产业链项目(23ZDCYJSGG0013-2023);宁夏回族自治区重点研发计划(2022BEG03072)

PCB defect detection method based on fusion of MBAM and YOLOv5

HU Xin1(), HU Shuai1, MA Lijun2, SI Liyun1(), XIAO Jian3, YUAN Ye4   

  1. 1. School of Energy and Electrical Engineering, Chang’an University, Xi’an Shaanxi 710064, China
    2. State Grid Gansu Electric Power Company TianShui Power Supply Company, Tianshui Gansu 741000, China
    3. School of Electronics and Control Engineering, Chang’an University, Xi’an Shaanxi 710064, China
    4. Faculty of Electronic and Information Engineering, Xi’an Jiaotong University, Xi’an Shaanxi 710049, China
  • Received:2023-08-26 Accepted:2023-11-03 Published:2024-02-29 Online:2024-02-29
  • Contact: SI Liyun (1975-), lecturer, Ph.D. Her main research interests cover power system big data analysis, intelligent algorithms, etc. <break/>E-mail:<email>siliyun@chd.edu.cn</email>
  • First author:HU Xin (1975-), associate professor, Ph.D. Her main research interests cover energy management, computer vision and machine learning, etc. E-mail:huxin@chd.deu.cn
  • Supported by:
    Shaanxi Province Qin Chuangyuan “Scientist+Engineer” Team Construction Project(2024QGY-KXJ-161);Key Industrial Chain(23ZDCYJSGG0013-2023);Key R&D Projects of Ningxia Hui Autonomous Region(2022BEG03072)

摘要:

随着电子信息产业迅速发展,PCB行业作为电子信息产业的基础,其产品质量对后续生产的电子产品有着决定性影响。针对PCB缺陷目标较小,缺陷类型多,特征不明显,在实际生产过程中易产生误检、漏检等问题,提出了一种多分支注意力MBAM模块方法,在3个不同维度对特征图进行关注,以增强特征提取的能力,对缺陷区域给予更多的注意力表示。通过改进YOLOv5结构,将MBAM与YOLOv5网络结合,有效的提升了对PCB中小目标的检测性能。最后通过在网络不同位置添加MBAM模块进行对比实验,选取了最佳的添加位置。通过在PCB缺陷数据集上的实验结果表明,改进后的PCB缺陷检测算法具有良好的检测性能,优于其他对比算法,最终的AP达到了96.7%,对比标准YOLOv5的94.7%提高了2个百分点,其他项指标均有涨点,在保持检测速度基本不变的情况下,精准地识别PCB缺陷类型。

长安大学胡欣副教授及其学生胡帅等针对PCB缺陷目标较小、缺陷类型多、特征不明显,在生产过程中易产生误检、漏检等问题,提出了一种基于YOLOv5融合多分支注意力模块的方法,在三个维度对特征图进行关注,增强了特征提取能力,对缺陷区域给予了更多的注意力表示,并通过实验选取了最佳的添加位置,提高了算法的检测精度。

关键词: 目标检测, PCB缺陷, 小目标缺陷, YOLOv5, 多分支注意力模块

Abstract:

With the rapid development of the electronic information industry, the printed circuit board (PCB) industry, serving as its foundation, plays a crucial role in determining the quality of electronic products produced subsequently. Addressing the challenges of small defect target in PCBs, numerous defect types, and indistinct features, which often lead to false detection and missed detection in the actual production process, a multi-branch attention multi-branch attention module (MBAM) module method was proposed. This method focused on the feature map in three different dimensions to enhance feature extraction capabilities and allocate more attention to defect areas. By enhancing the YOLOv5 structure and integrating MBAM with YOLOv5 network, the detection performance for small and medium-sized targets in PCBs was effectively improved. Finally, by comparing the MBAM modules at different locations of the network, the best location was selected. The experimental results on the PCB defect dataset demonstrated that the improved PCB defect detection algorithm exhibited superior detection performance compared to other algorithms. The final AP reached 96.7%, a 2 percentage points increase over 94.7% of the standard YOLOv5. Other indicators all showed an upward trend, and the algorithm could accurately identify PCB defect types while maintaining the detection speed.

Key words: target detection, PCB defects, small target defects, YOLOv5, multi-branch attention module

中图分类号: