Computer Integrated Manufacturing System ›› 2024, Vol. 30 ›› Issue (3): 1092-1104.DOI: 10.13196/j.cims.2023.0039

Previous Articles     Next Articles

Defect detection for PCB by combining shallow features and attention mechanism

LIAO Xinting1,2,ZHANG Jie1+,LYU Shengping3   

  1. 1.Institute of Artificial Intelligence,Donghua University
    2.College of Mechanical Engineering,Donghua University
    3.College of Engineering,South China Agricultural University
  • Online:2024-03-31 Published:2024-04-03
  • Supported by:
    Project supported by the National Natural Science Foundation,China (No.52375485),the Natural Science Foundation of Shanghai Municipality,China (No.22ZR1403000),and the Natural Science Foundation of Guangdong Province,China(No.2021A1515012395).

融合浅层特征和注意力机制的PCB缺陷检测方法

廖鑫婷1,2,张洁1+,吕盛坪3   

  1. 1.东华大学人工智能研究院
    2.东华大学机械工程学院
    3.华南农业大学工程学院
  • 基金资助:
    国家自然科学基金面上资助项目(52375485);上海市自然科学基金资助项目(22ZR1403000);广东省自然科学基金资助项目(2021A1515012395)。

Abstract: Defect detection is an important part of quality control in the production of Printed Circuit Board (PCB).Due to the tiny size of PCB surface defects and the complex of traverse layout,the existing detection algorithms cannot make full use of the characteristics of small defects,and its detection accuracy cannot meet the production requirements.To solve these problems,a You Only Look Once Version 5—Tiny Defect Detection (YOLOv5-TDD) algorithm for PCB minimal defect detection was presented.Based on YOLOv5,the shallow feature fusion branch in the neck network was added to improve the information flow efficiency of tiny defect features.The Squeeze and Excitation—SiLU (SE-SiLU) attention mechanism module was introduced to improve the network's attention to the tiny defect information of shallow features by assigning weights to the feature information.The experimental results showed that YOLOv5-TDD had 99.12% mAP  in PCB_DATASET defect dataset test,3.54% higher than YOLOv5,and better detection accuracy than other algorithms.

Key words: printed circuit board, tiny defect, YOLOv5, attention mechanism, feature fusion

摘要: 缺陷检测是印制电路板(PCB)生产过程中质量控制的重要环节。由于PCB表面缺陷尺寸微小,导线布局复杂多样,现有的检测算法难以充分利用微小缺陷的特征信息,其检测准确率难以满足生产需求。为解决上述问题,提出针对PCB微小缺陷检测的YOLOv5-TDD算法。该算法在YOLOv5基础上,首先在颈部网络中增加浅层特征融合分支,提升微小缺陷特征信息流通效率;其次引入SE-SiLU注意力机制模块,以对特征信息分配权重的方式,提高网络对浅层特征的微小缺陷信息关注度。实验结果表明,YOLOv5-TDD在PCB_DATASET缺陷数据集测试中,其检测精度mAP为99.12%,相较于YOLOv5提高了3.54%,检测精度优于其他算法。

关键词: 印制电路板, 微小缺陷, YOLOv5, 注意力机制, 特征融合

CLC Number: