Research on Steel Surface Defect Detection Based on YOLOv5 with Attention Mechanism
Open Access
- 15 November 2022
- journal article
- research article
- Published by MDPI AG in Electronics
- Vol. 11 (22) , 3735
Abstract
Due to the irresistible factors of material properties and processing technology in the steel production, there may be different types of defects on the steel surface, such as rolling scale, patches and so on, which seriously affect the quality of steel, and thus have a negative impact on the economic efficiency of the enterprises. Different from the general target detection tasks, the defect detection tasks have small targets and extreme aspect ratio targets. The contradiction of high positioning accuracy for targets and their inconspicuous features makes the defect detection tasks difficult. Therefore, the original YOLOv5 algorithm was improved in this paper to enhance the accuracy and efficiency of detecting defects on steel surfaces. Firstly, an attention mechanism module was added in the process of transmitting the shallow feature map from the backbone structure to the neck structure, aiming at improving the algorithm attention to small targets information in the feature map and suppressing the influence of irrelevant information on the algorithm, so as to improve the detection accuracy of the algorithm for small targets. Secondly, in order to improve the algorithm effectiveness in detecting extreme aspect ratio targets, K-means algorithm was used to cluster and analyze the marked steel surface defect dataset, so that the anchor boxes can be adapted to all types of sizes, especially for extreme aspect ratio defects. The experimental results showed that the improved algorithms were better than the original YOLOv5 algorithm in terms of the average precision and the mean average precision. The mean average precision, demonstrating the largest increase among the improved YOLOv5 algorithms, was increased by 4.57% in the YOLOv5+CBAM algorithm. In particular, the YOLOv5+CBAM algorithm had a significant increase in the average precision for small targets and extreme aspect ratio targets. Therefore, the YOLOv5+CBAM algorithm could make the accurate localization and classification of steel surface defects, which can provide a reference for the automatic detection of steel defects.Keywords
Funding Information
- Fundamental Research Funds for the Local Provincial Universities of Hei longjiang Province (2018-KYYWF-1189)
This publication has 31 references indexed in Scilit:
- YOLO9000: Better, Faster, Stronger2017
- Automated surface inspection for steel products using computer vision approachApplied Optics, 2017
- Faster R-CNN: Towards Real-Time Object Detection with Region Proposal NetworksIEEE Transactions on Pattern Analysis and Machine Intelligence, 2016
- Deep Residual Learning for Image Recognition2016
- Steel-surface defect detection using a switching-lighting schemeApplied Optics, 2015
- Spatial Pyramid Pooling in Deep Convolutional Networks for Visual RecognitionIEEE Transactions on Pattern Analysis and Machine Intelligence, 2015
- Detection of Periodic Defects Using Dual-Light Switching Lighting Method on the Surface of Thick PlatesISIJ International, 2015
- Shaping of steel mold surface of lens array by electrical discharge machining with single rod electrodeApplied Optics, 2014
- A noise robust method based on completed local binary patterns for hot-rolled steel strip surface defectsApplied Surface Science, 2013
- The global k-means clustering algorithmPattern Recognition, 2003