Journal of Frontiers of Computer Science and Technology ›› 2021, Vol. 15 ›› Issue (7): 1245-1254.DOI: 10.3778/j.issn.1673-9418.2007005

• Artificial Intelligence • Previous Articles     Next Articles

Defect Detection of Metal Surface Based on Attention Cascade R-CNN

FANG Junting, TAN Xiaoyang   

  1. 1. College of Computer Science and Technology, Nanjing University of Aeronautics and Astronautics, Nanjing 211106, China
    2. Key Laboratory of Pattern Analysis and Machine Intelligence, Ministry of Industry and Information Technology, Nanjing 211106, China
    3. Collaborative Innovation Center of Novel Software Technology and Industrialization, Nanjing 211106, China
  • Online:2021-07-01 Published:2021-07-09

注意力级联网络的金属表面缺陷检测算法

方钧婷谭晓阳   

  1. 1. 南京航空航天大学 计算机学院,南京 211106
    2. 模式分析与机器智能工业和信息化部重点实验室,南京 211106
    3. 软件新技术与产业化协同创新中心,南京 211106

Abstract:

Automatic metal surface defect detection is an important part of quality control in industrial production. In complex industrial scenarios, traditional image processing methods cannot detect defect areas effectively, and manual inspection is time-consuming and labor-intensive. How to quickly and effectively detect defects for metal surface has become the key to improve the efficiency of the production. However, the complex lighting conditions on the metal surface are prone to strong reflections and reflections, and defects are varied and have unclear boundaries, which poses a great challenge to defect detection. This paper proposes a novel cascade R-CNN (region-based convolutional neural network) defect detection method based on attention mechanism to classify and locate metal surface defects with high-quality. A lightweight network module is designed to calculate attention along two separate dimensions, spatial and channel. It can be inserted into a convolutional neural network and effectively improve the feature extraction ability. To improve the detection accuracy, two cascade detection heads are trained with increasing IoU thresholds. The output of the previous head is used as the next training set for the next head to refine the detection results in turn. In addition, various factors affecting performance are explored in a large number of experi-ments. Compared with existing methods, the proposed method has high accuracy and good robustness, and can be practically applied in production.

Key words: defect detection, object detection, attention mechanism, deep learning, convolutional neural network (CNN)

摘要:

金属表面缺陷检测是工业生产质量把控的重要一环。在复杂的工业场景中,传统的图像处理方法无法有效地检测缺陷区域,而人工检测既费时又费力。快速有效地检测金属表面缺陷已成为提高生产效率的关键。复杂的光照条件会使金属表面产生强反射和倒影,缺陷种类多样、边界模糊,给缺陷检测问题带来巨大的挑战。提出了一种基于注意力机制的级联网络缺陷检测算法(R-CNN),对金属表面缺陷进行高质量分类和定位。设计了一个轻量级的网络模块,该模块沿着空间和通道计算注意力,将其插入到卷积神经网络中可有效提高特征提取能力;为了提高检测精度,将两个IoU阈值递增的检测头部网络级联,使用前一个头部的输出作为下一个头部的输入,依次细化检测结果。在大量实验中探索影响性能的各种因素,与现有方法进行比较,该方法具有更高的精度和良好的鲁棒性,可实际应用于生产中。

关键词: 缺陷检测, 目标检测, 注意力机制, 深度学习, 卷积神经网络(CNN)