基于注意力机制与多尺度融合的PCB缺陷检测
Defect Detection of PCB Based on Attention Mechanism and Multi-scale Fusion
陆维宽 1周志立 1阮秀凯 1聂赛赛1
作者信息
- 1. 温州大学电气与电子工程学院,浙江温州 325035;温州大学智能锁具研究院,浙江温州 325036
- 折叠
摘要
针对印制电路板(PCB)缺陷区域受背景干扰过多以及缺陷目标尺度较小导致缺陷检测精度低的问题,提出了一种基于注意力机制与多尺度融合的 PCB缺陷检测方法.在 YOLOv5 模型的特征提取网络中,引入一种三维注意力模块,以增强缺陷目标特征的显著度,使模型更加注重目标特征;为充分利用微小缺陷目标的多尺度特征,在特征融合网络中引入加权双向特征金字塔网络(Bi-directional Feature Pyramid Network,BiFPN),减少缺陷目标特征信息的丢失,提高模型对微小缺陷目标的检测精度.实验结果表明,该方法能够准确检测出 PCB图像中的缺陷目标,在保证实时性的同时,较原方法的平均检测精度提高了 3.9%,表明了该方法的有效性.
Abstract
Considering the low detection accuracy caused by defect areas of PCB due to excessive background interference and the small scale of defective objects,a defect detection method of PCB based on attention mechanism and multi-scale fusion is proposed.Firstly,to enhance the saliency of defective object features and make the model focus more on object features,a 3D attention module is introduced in the feature extraction network based on YOLOv5.Secondly,to make full use of the multi-scale features of tiny defective object,a weighted Bi-directional Feature Pyramid Network(BiFPN)is introduced in the feature fusion network to reduce the loss of feature information of the defective object and improve the detection accuracy of the model for small defective object.Finally,the experimental results show that the method can accurately detect the defective objects in PCB images,and the average detection accuracy is improved by 3.9%compared with the original method while the real-time performance is ensured,which shows the effectiveness of the method.
关键词
印制电路板/缺陷检测/YOLOv5/注意力机制/多尺度融合Key words
PCB/defect detection/YOLOv5/attention mechanism/multi-scale fusion引用本文复制引用
出版年
2024