基于改进YOLOv5s轻量化带钢表面缺陷检测方法
Lightweight strip surface defect detection method based on im-proved YOLOv5s
苏盈盈 1何亚平 1邓圆圆 1刘兴华 1阎垒 1斯洪云1
作者信息
- 1. 重庆科技大学电气工程学院,重庆 401331
- 折叠
摘要
针对YOLOv5s模型参数量大、难以在嵌入式设备上部署的问题,设计了一种轻量化的YOLOv5s带钢表面缺陷检测方法.首先将主干网络中的部分卷积层替换为多分枝结构的RepG-host,增强了主干对特征信息的提取能力,推理时可以转化为单分支结构,保证了检测速度.其次提出了一种轻量级的FPN网络(GG-FPN),其中的G-Ghost用于削减C3模块中的冗余参数,而GSConv则利用大卷积核的深度可分离卷积和分支结构,保证精度和速度的双提升.实验表明,在NEU-DET数据集上,GG-FPN模型参数量较原FPN减少了 24.7%,GFLOPs降低了 20.6%.对于整个模型,改进的算法mAP仅损失1.9%,参数量较YOLOv5s减少了 37.5%,GFLOPs降低了33.1%,检测速度达到187 frame/s,更好地均衡了检测的速度与精度.
Abstract
Aiming at the problems of large number of parameters of YOLOv5s model and difficulty in de-ploying on embedded devices,a lightweight YOLOv5s strip surface defect detection method is designed.Firstly,part of the convolutional layer in the backbone network is replaced with RepGhost with multi-branching structure,which enhances the ability of the backbone to extract feature information,and the reasoning can be converted into a single-branch structure to ensure the detection speed.Secondly,a light-weight FPN network(GG-FPN)is proposed,in which G-Ghost is used to reduce redundant parameters in the C3 module,while GSConv uses the large convolutional kernels depth separate convolution and branching structures to ensure the improvement of accuracy and speed at the same time.Experiments show that on the NEU-DET dataset,the number of parameters of the GG-FPN model is reduced by 24.7%compared with the original FPN,and the GFLOPs are reduced by 20.6%.For the whole model,the improved algorithm mAP only loses 1.9%,the number of parameters is reduced by 37.5%compared with YOLOv5s,GFLOPs is reduced by 33.1%,and the detection speed reaches 187 frame/s,which bet-ter balances the speed and accuracy of detection.
关键词
YOLOv5s/G-Ghostnet/缺陷检测/RepGhost/GSConv/轻量化模型Key words
YOLOv5s/G-Ghostnet/defect detection/Repghost/GSConv/lightweight model引用本文复制引用
基金项目
重庆市自然科学基金项目(CSTB2022NSCQ-MSX1425)
重庆科技学院创新项目(YKJCX2220408)
重庆科技学院创新项目(YKJCX2320403)
出版年
2024