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


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)



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