作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2023, Vol. 49 ›› Issue (11): 275-283. doi: 10.19678/j.issn.1000-3428.0066270

• 开发研究与工程应用 • 上一篇    下一篇

基于注意力的轻量级工业产品缺陷检测网络

李刚1,2, 邵瑞1,2, 周鸣乐1,2, 李敏1,2, 万洪林3,*   

  1. 1. 齐鲁工业大学(山东省科学院) 山东省计算中心(国家超级计算济南中心), 济南 250014
    2. 山东省基础科学研究中心(计算机科学) 山东省计算机网络重点实验室, 济南 250014
    3. 山东师范大学 物理与电子科学学院, 济南 250358
  • 收稿日期:2022-11-15 出版日期:2023-11-15 发布日期:2023-11-08
  • 通讯作者: 万洪林
  • 作者简介:

    李刚(1980—),男,研究员、博士,主研方向为计算机视觉、深度学习、工业互联网

    邵瑞,硕士研究生

    周鸣乐,研究员

    李敏,研究员

  • 基金资助:
    山东省重点研发计划(软科学)项目(2022RZB02012); 泰山学者工程(tsqn202103097)

Lightweight Industrial Products Defect Detection Network Based on Attention

Gang LI1,2, Rui SHAO1,2, Mingle ZHOU1,2, Min LI1,2, Honglin WAN3,*   

  1. 1. Shandong Computer Science Center (National Supercomputer Center in Jinan), Qilu University of Technology (Shandong Academy of Sciences), Jinan 250014, China
    2. Shandong Provincial Key Laboratory of Computer Networks, Shandong Fundamental Research Center for Computer Science, Jinan 250014, China
    3. School of Physics and Electronic Science, Shandong Normal University, Jinan 250358, China
  • Received:2022-11-15 Online:2023-11-15 Published:2023-11-08
  • Contact: Honglin WAN

摘要:

工业领域的表面缺陷检测对提高工业产品质量、维护生产安全具有重要意义。因工业产品表面缺陷复杂多样、形状各异、缺陷检测场景和硬件配置不同,对工业产品的表面缺陷检测提出更高要求。基于图像的工业产品表面缺陷检测方法难以兼顾实时性和准确性的要求。为满足工业产品缺陷检测快速准确的需求,提出一种轻量级的缺陷检测网络。该网络由主干网络、多尺度特征聚合网络、残差增强网络和注意力增强网络4部分组成。其中,主干网络将通道注意力层和坐标注意力层嵌入到特征提取部分,以获取丰富的表面缺陷特征信息,多尺度特征聚合网络则融合深层语义和浅层语义特征信息,残差增强网络关注空间信息,注意力增强网络利用全局特征与局部特征的信息交互,在满足低硬件配置的同时增强模型对复杂多样缺陷的检测性能。实验结果表明,该网络在NRSD-MN、NEU-DET和PCBData等公开数据集上的精准度、召回率、F1值、mAP@0.5和GFLOPS这5项指标上优于YOLOv3-tiny、YOLOv5s、YOLOv7-tiny等同参数量级算法,能有效兼顾工业产品表面缺陷检测场景下实时性和准确性的要求。

关键词: 表面缺陷检测, 注意力机制, 轻量级网络, 多尺度特征聚合, 信息交互

Abstract:

The detection of surface defects in industry is of great significance in improving the quality of industrial products and maintaining production safety. As surface defects are complex, diverse, and of different shapes, higher requirements are put forward for surface defect detection of industrial products in different defect detection scenarios and hardware configurations. The image-based surface defect detection method for industrial products cannot easily balance the requirements of real-time and accuracy. Thus, a lightweight defect detection network is proposed to meet the speed and accuracy requirements of industrial product defect detection. The proposed network consists of four parts: backbone, multi-scale feature aggregation, residual enhancement, and attention enhancement networks. Among them, the backbone network embeds the channel and coordinate attention layers into the feature extraction section to obtain rich surface defect feature information. The multi-scale feature aggregation network integrates deep and shallow semantic feature information. The residual enhancement network pays attention to spatial information, and the attention enhancement network utilizes information interaction between global and local features. The model detection performance for complex and diverse defects has to be enhanced while satisfying simple hardware configurations. The experimental results show that the network performs well on publicly available datasets such as NRSD-MN, NEU-DET, and PCBData, with respect to precision, recall, F1 value, and mean Average Precision(mAP)@0.5 values. Compared to algorithms such as YOLOv3-tiny, YOLOv5s, and YOLOv7-tiny, it can effectively balance the real-time and accuracy requirements of industrial product surface defect detection scenarios with respect to the five indicators of GFLOPS.

Key words: surface defect detection, attention mechanism, lightweight network, multi-scale feature aggregation, information interaction