Welcome to Journal of Graphics share: 

Journal of Graphics ›› 2023, Vol. 44 ›› Issue (2): 335-345.DOI: 10.11996/JG.j.2095-302X.2023020335

Previous Articles     Next Articles

Steel surface defect detection based on improved YOLOv5 algorithm

CAO Yi-qin1(), WU Ming-lin1, XU Lu2   

  1. 1. College of software, East China Jiaotong University, Nanchang Jiangxi 330013, China
    2. School of Electromechanical Engineering, Jiangxi V&T College of Communications, Nanchang Jiangxi 330013, China
  • Received:2022-06-17 Accepted:2022-10-07 Online:2023-04-30 Published:2023-05-01
  • About author:CAO Yi-qin (1964-), professor, master. His main research interests cover digital image processing and pattern recognition. E-mail:yqcao@ecjtu.edu.cn
  • Supported by:
    National Natural Science Foundation of China(61861016);Key Project of Jiangxi Science and Technology Support Plan(20161BBE50081)

Abstract:

An improved YOLOv5 steel surface defects detection algorithm was proposed to address the one-stage detection network YOLOv5, such as inadequate feature extraction ability, limited receptive field, and insufficient feature fusion. A feature pyramid structure of SPP_Res with residual edges was proposed to speed up the training of the model and enhance the feature extraction ability of the model. Additionally, a multi-head self-attention mechanism (C3_MHSA) was added to optimize the network structure, focusing on the global receptive field of the model and extracting richer features of the target. Furthermore, a multi-layer fusion mechanism was introduced to further integrate shallow and deep features, taking into account more information on location, semantics, and details, thereby improving the detection accuracy of steel surface defects. The experimental results demonstrated that the improved YOLOv5 algorithm could exhibit excellent detection performance, and that the mAP on the NEU-DET datasets reached 74.1%, which was 3.4% higher than that of the original YOLOv5 algorithm, 4.0% higher than that of the YOLOX algorithm, 8.6% higher than that of YOLOv3 algorithm, and 23.4% higher than that of the SSD algorithm. The improved YOLOv5 network could detect steel surface defects more accurately than YOLOv5 with similar detection speed, while outperforming other mainstream algorithms in both accuracy and speed.

Key words: YOLOv5, SPP_Res, muti-head self-attention mechanism, muti-layer fusion mechanism, defect detection

CLC Number: