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

图学学报 ›› 2022, Vol. 43 ›› Issue (1): 21-27.DOI: 10.11996/JG.j.2095-302X.2022010021

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

基于卷积神经网络的 PCB 缺陷检测

  

  1. 云南大学软件学院,云南 昆明 650504
  • 出版日期:2022-02-28 发布日期:2022-02-16

PCB defect detection based on convolutional neural network 

  1. School of Software, Yunnan University, Kunming Yunnan 650504, China
  • Online:2022-02-28 Published:2022-02-16

摘要: 印刷电路板(PCB)在生产制造中由于生产工序等问题易导致电路板存在瑕疵缺陷,为提高对电 路板缺陷的检测效率,提出了一种基于卷积神经网络(CNN)的电路板缺陷检测网络。该检测网络基于 YOLO v4 网络进行优化改造,针对于 PCB 制作精密、复杂,各类缺陷不易检测的难点,在优化后的网络中加入了基于细 粒度空间域的长距离全局注意力机制,同时在 SPP 模块的基础上进行特征图重组作为各 YOLO 检测头的输入。 通过使用长距离注意力机制通道将浅层网络提取到的特征传递到深层网络中,并采用特征图重组的方式提升特征 信息丰富度,从而提高对于 PCB 缺陷检测的精度。经实验分析,与各类经典 CNN 相比,在 PCB 缺陷检测任务 中,该算法有较大优势,整体缺陷的平均检测精度均值(mAP)达到 91.40%,适用于实际生产、检测环节。

关键词: 印刷电路板, 深度学习, 卷积神经网络, 缺陷检测, 注意力机制

Abstract: In the production of printed circuit boards (PCB), the production process and other problems incur flaws and defects on the circuit board. In order to enhance the detection efficiency of circuit board defects, a circuit board defect detection network based on convolutional neural network (CNN) was proposed. The whole detection network was optimized and reconstructed based on the YOLO v4 network. Aiming at the difficulty of precise and complex PCB production and difficult detection of various defects, a long-distance global attention mechanism based on fine-grained spatial domain was added to the optimized network. At the same time, on the basis of the spatial pyramid pooling (SPP) module, the feature map was reorganized as the input of each YOLO detection head. The long-distance attention mechanism channel was adopted to transfer the features extracted from the shallow network to the deep network, and the feature map reorganization method was utilized to boost the richness of feature information, thereby improving the accuracy of PCB defect detection. After experimental analysis, compared with various classic convolutional neural networks, the proposed algorithm is greatly superior in PCB board defect detection tasks. The mean average precision (mAP) of the overall defects reaches 91.40%, which is suitable for actual production and testing links. 

Key words: printed circuit board, deep learning, convolutional neural network, defect detection, attention mechanism 

中图分类号: