首页|期刊导航|重庆工商大学学报(自然科学版)|基于YOLOv8的钢材表面缺陷检测算法

基于YOLOv8的钢材表面缺陷检测算法OA

A Steel Surface Defect Detection Algorithm Based on YOLOv8

中文摘要英文摘要

目的 针对现有钢材表面缺陷检测算法检测精度不足和模型复杂度高的问题,提出一种基于YOLOv8的改进钢材表面缺陷检测算法,命名为YOLOv8-RDP.方法 首先,引入RepNCSPELAN4模块替换YOLOv8n模型中的C2f模块,通过并行处理不同尺度的特征,并在最终的卷积层中融合这些特征来优化模型的特征提取和融合能力;其次,在骨干网络部位集成DA(Deformable Attention)注意力机制,通过自适应调整卷积核采样点,增强模型对不同形状和大小物体的特征捕捉能力,从而提高对关键信息的捕捉效率;最后,为减少模型所需的计算资源,结合PConv(Partial Convolution)模块改进基线模型检测头,利用特征图中的冗余性,根据数据是否缺失动态调整卷积核的作用区域,以减少计算量.结果 在NEU-DET数据集上的实验结果表明,YOLOv8-RDP的mAP达到了78.8%,较基线模型提升了1.8%;参数量减少至1.87 M,GFLOPs降至3.5 G,分别比基线模型降低了37.9%和57.0%.改进后的模型在保持高精度的同时,大幅度减少了计算资源的需求.结论 YOLOv8-RDP算法在钢材表面缺陷检测中表现出较高的检测精度和较低的模型复杂度,对钢材表面缺陷检测具有一定的应用价值.

Objective To address the problems of insufficient detection accuracy and high model complexity in existing steel surface defect detection algorithms,an improved steel surface defect detection algorithm based on YOLOv8,named YOLOv8-RDP,is proposed.Methods First,the RepNCSPELAN4 module was introduced to replace the C2f module in the YOLOv8n model.The feature extraction and integration capability of the model was optimized through parallel processing of features at different scales and their fusion in the final convolution layer.Second,a deformable attention(DA)mechanism was integrated into the backbone network.This mechanism adaptively adjusted the sampling points of convolutional kernels,strengthening the model's ability to capture features of objects with varying shapes and sizes and thereby improving the efficiency of capturing key information.Finally,to reduce the computational resources required by the model,the detection head of the baseline model was modified using the partial convolution(Pconv)module.By leveraging redundancy in feature maps and dynamically adjusting the active area of convolutional kernels based on data availability,the computational load was reduced.Results Experimental results on the NEU-DET dataset show that YOLOv8-RDP achieved an mAP of 78.8%,representing a 1.8%improvement over the baseline model.The number of parameters was reduced to 1.87 M and GFLOPs dropped to 3.5 G,representing decreases of 37.9%and 57.0%compared with the baseline model,respectively.The improved model significantly reduced the demand for computational resources while maintaining high accuracy.Conclusion The YOLOv8-RDP algorithm demonstrates high detection accuracy and low model complexity in steel surface defect detection,showing strong potential for practical application in this field.

刘昱;彭龑

四川轻化工大学计算机科学与工程学院,四川宜宾 644002四川轻化工大学计算机科学与工程学院,四川宜宾 644002

矿业与冶金

缺陷检测特征融合可变形注意力轻量化检测头

defect detectionfeature fusiondeformable attentionlightweight detection head

《重庆工商大学学报(自然科学版)》 2026 (3)

30-37,8

四川省科技厅项目资助(2019FYG0377).

10.16055/j.issn.1672-058X.2026.0003.004

评论