基于改进YOLOv5的金属表面缺陷分割
Metal Surface Defect Segmentation Algorithm Based on Improved YOLOv5
王九鑫 1吴鑫 2杜雨蓉 1赵明虎 1苏耀恒1
作者信息
- 1. 西安工程大学理学院,西安 710048
- 2. 西南交通大学数学学院,成都 611756
- 折叠
摘要
针对当前工业图像表面缺陷检测算法定位精度差等问题,提出了一种基于改进YOLOv5 缺陷分割算法.首先,在骨干网络的前两层使用ODConv替换原有的Conv模块,使图片的下采样信息更好地保存;其次,使用Meta-ACON激活函数替代SiLU激活函数,能够通过学习自动使用性能更好地激活函数来提高特征提取能力;然后,在下层特征提取部分以及Neck层引入SimAM注意力机制,增强特征提取能力;最后,引入Alpha-IoU作为损失函数,提升了边界框回归的精确度.实验结果表明,改进的分割模型检测精度(map)为86.7%,比原YOLOv5 网络提升了20.1%,比最新的检测模型YOLOv8高出2%.改进的模型不仅具有较高的检测精度,而且分割检测算法可以更加精确定位缺陷位置.
Abstract
Aiming at the problem of poor positioning accuracy of the current industrial image surface defect detection algorithm,a defect segmentation algorithm based on improved YOLOv5 is proposed.Firstly,ODConv is used to replace the original Conv module in the first two layers of the backbone network,so that the downsampling information of the picture can be better preserved;Secondly,using Meta-ACON activa-tion function instead of SiLU activation function can improve the feature extraction ability by learning to automatically use activation function with better performance;Thirdly,SimAM attention mechanism is intro-duced into the lower feature extraction part and Neck layer to enhance the feature extraction ability;Finally,Alpha-IoU is introduced as the loss function,which improves the accuracy of bounding box regression.The experimental results show that the detection accuracy(map)of the improved segmentation model is 86.7%,which is 20.1%higher than the original YOLOv5 network and 2%higher than the latest detection model YOLOv8.Therefore,the improved model in this paper not only has high detection accuracy,but also the segmentation detection algorithm can locate the defect position more accurately.
关键词
缺陷分割/注意力机制/Alpha-IoU/YOLOv5Key words
defect segmentation/attention mechanism/Alpha-IoU/YOLOv5引用本文复制引用
基金项目
西安市青年人才托举计划(959202313010)
出版年
2024