首页|期刊导航|山东理工大学学报(自然科学版)|基于改进YOLOv8n的钢材表面缺陷检测算法

基于改进YOLOv8n的钢材表面缺陷检测算法OA

Steel surface defect detection algorithm based on improved YOLOv8n

中文摘要英文摘要

针对现有钢材表面缺陷检测方法存在特征提取能力不足,对形状不规则、尺度变化大等复杂缺陷检测精度低的问题,提出一种改进YOLOv8n的钢材表面缺陷检测算法YOLOv8n-OMD.首先,在主干网络利用在线重参数化卷积OREPA将复杂的多卷积层重参数化为单卷积层,在保持特征提取能力的同时具有较低的计算成本;其次,设计中值增强通道空间注意力机制MECS并添加到主干网络末端,从而增强对重要特征的提取,提高检测准确性;最后,结合可变形卷积DCNv4 构建C2f_DCNv4 模块并引入到颈部网络,以增加有效感受野和有效位置的采样,更准确地捕获复杂形状特征的详细信息.实验结果表明:YOLOv8n-OMD算法在钢材表面缺陷数据集NEU-DET上,mAP@0.5 达到82.2%,mAP@0.5∶0.95 达到48.8%,计算量为7.1×109;较基准算法YOLOv8n,mAP@0.5 和 mAP@0.5∶0.95 分别提高了 3.3%和 1.5%,计算量下降了 12.3%,证明了YOLOv8n-OMD算法对钢材表面缺陷检测的有效性和实用性.

In order to solve the problems of insufficient feature extraction ability and low detection accura-cy of complex defects such as irregular shape and significant scale variation,a steel surface defect detec-tion algorithm YOLOv8n-OMD based on improved YOLOv8n was proposed.Firstly,in the backbone net-work,the Online Convolutional Re-parameterization(OREPA)is used to reparameterize the complex network structure layer into a single convolutional layer,which has a low computational cost while main-taining the feature extraction ability.Secondly,the Median-Enhanced Channel and Spatial Attention(MECS)was designed and integrated to the end of the backbone network to enhance the extraction of im-portant features and improve the detection accuracy.Finally,the C2f_DCNv4 module was constructed by combining the deformable convolution DCNv4 and introduced into the neck network to increase sampling in the effective receptive field and effective position,thereby capturing the details of complex shape fea-tures more accurately.Experimental results show that the YOLOv8n-OMD algorithm achieves 82.2%mAP@0.5,48.8%mAP@0.5∶0.95,with a computational cost of 7.1×109 FLOPs on the NEU-DET steel surface defect dataset.Compared with the benchmark algorithm YOLOv8n,the mAP@0.5 and mAP@0.5∶0.95 are increased by 3.3%and 1.5%,respectively,and the computational cost is re-duced by 12.3%,which proves the effectiveness and practicability of the YOLOv8n-OMD algorithm for steel surface defect detection.

陈辉;李淑婷

安徽理工大学 计算机科学与工程学院,安徽 淮南 232001安徽理工大学 计算机科学与工程学院,安徽 淮南 232001

信息技术与安全科学

缺陷检测YOLOv8nOREPA可变形卷积注意力机制

defect detectionYOLOv8nonline convolutional re-parameterizationdeformable convolutionattention mechanism

《山东理工大学学报(自然科学版)》 2026 (4)

34-42,9

安徽理工大学研究生创新基金项目(2024cx2103)

评论