Author Login Chief Editor Login Reviewer Login Editor Login Remote Office

Computer Engineering ›› 2025, Vol. 51 ›› Issue (4): 249-260. doi: 10.19678/j.issn.1000-3428.0068476

• Graphics and Image Processing • Previous Articles     Next Articles

Improved Steel Defect Detection Method Based on Enhanced Fusion of RFB and YOLOv5 Features

HUANG Shuoqing, HUANG Jingui*()   

  1. College of Information Science and Engineering, Hunan Normal University, Changsha 410081, Hunan, China
  • Received:2023-09-27 Online:2025-04-15 Published:2024-05-30
  • Contact: HUANG Jingui

基于RFB和YOLOv5特征增强融合改进的钢材表面缺陷检测方法

黄硕清, 黄金贵*()   

  1. 湖南师范大学信息科学与工程学院, 湖南 长沙 410081
  • 通讯作者: 黄金贵
  • 基金资助:
    国家自然科学基金面上项目(62077014)

Abstract:

Factors such as irregular shapes, different sizes, and complex backgrounds of steel surface defects significantly increase the difficulty in detecting steel surface defects. To overcome the drawbacks of existing methods, such as low detection accuracy, low detection speed, and difficulty in detecting small target defects, an improved steel defect detection method, namely RFB-YOLOv5-E, based on the enhanced fusion of Receptive Field Block (RFB) and YOLOv5 features, is proposed to improve the recognition rate of steel surface defects. First, the C3 module in YOLOv5 is modified and upgraded to the C3s module to obtain more gradient information by adding more gradient flow branches, which improves the accuracy of the model. Second, the shallow feature extraction network is improved, and feature enhancement functions are added, which increase the difference between background and defect. A downsampling layer and a detection head are added to expand the depth and receptive field of the network in order to improve the feature extraction and detection capabilities. In addition, the RFB module is improved, and it replaces the Spatial Pyramid Pooling-Fast (SPPF) module in the YOLOv5 backbone network. By simulating human vision, the receptive field is further enlarged, and the feature extraction capability of the network is further enhanced. The experimental results show that the mean Average Precision (AmAP) of the RFB-YOLOv5-E algorithm on the NEU-DET dataset reaches 79.2%, which is 8.5% higher than that of the original YOLOv5 algorithm. Further, the detection speed is 122 frames per second, which indicates that a better balance between detection speed and detection accuracy is achieved.

Key words: defect detection, feature enhancement, receptive field block, YOLOv5 method

摘要:

钢材表面缺陷形状不规则、尺度不一、背景复杂等因素大大增加了钢材表面缺陷检测的难度。针对现有方法检测精度低、检测速度小、小目标缺陷难以检测等问题, 提出了一种基于感受野块(RFB)和YOLOv5特征增强融合改进的钢材表面缺陷检测(RFB-YOLOv5-E)模型, 以提高对钢材表面缺陷的识别率。首先, 对YOLOv5中的C3模块进行修改, 将其升级为C3s模块, 通过增加更多的梯度流分支来获取更多的梯度信息, 从而提高模型的准确度; 然后改进浅层特征提取网络, 添加特征增强函数以增大背景与缺陷间的差距, 再增加一个下采样层和一个检测头以扩大网络的深度和感受野, 进而提高特征提取的能力和检测能力; 此外, 还改进了RFB并替换YOLOv5主干网络中的空间金字塔池化(SPPF)模块, 通过模拟人类视觉进一步增大感受野, 进一步强化网络的特征提取能力。实验结果表明, RFB-YOLOv5-E算法在NEU-DET数据集上的均值平均精度(AmAP)达到了79.2%, 较原YOLOv5算法提高了8.5%, 检测速度为122帧/s, 实现了检测速度与检测精度更好的均衡。

关键词: 缺陷检测, 特征增强, 感受野块, YOLOv5方法