| 摘要: |
| 目的 针对现有钢材表面缺陷检测算法检测精度不足和模型复杂度高的问题,提出一种基于 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 算法在钢材表面缺陷检测中表
现出较高的检测精度和较低的模型复杂度,对钢材表面缺陷检测具有一定的应用价值。 |
| 关键词: 缺陷检测 特征融合 可变形注意力 轻量化检测头 |
| DOI: |
| 分类号: |
| 基金项目: |
|
| A Steel Surface Defect Detection Algorithm Based on YOLOv8 |
|
LIU Yu PENG Yan
|
|
School of Computer Science and Engineering Sichuan University of Science & Engineering Yibin 644002 Sichuan
China
|
| Abstract: |
| 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
a
th
c
i
c
s
u
f
r
i
a
e
c
l
y
d. |
| Key words: defect detection feature fusion deformable attention lightweight detection head |