摘要
针对铝型材表面缺陷不同类别尺寸差别较大,导致检测效果较差的情况,本文提出一种基于改进YOLOv5的铝型材表面缺陷检测算法。首先,在网络中嵌入CA(coordinate attention)注意力机制模块,使网络更好地抑制图像中无效样本的干扰,更多聚焦于有用信息;其次,在原有检测层上增加一个小目标检测层,获取和传递更为丰富且更具判别性的小目标特征,以解决对小目标缺陷检测精度低的问题,提高整体检测精度;最后,引入SIoU损失函数,用边界框回归之间的向量角度来重新定义损失函数,在有效减少总自由度损失的同时提高推理精度。将改进算法应用到天池铝型材数据集中进行验证,实验结果表明:该模型能有效识别铝型材表面不同种类的缺陷,较原YOLOv5算法mAP提高11.4个百分点,检测速度达到66.4 frame/s,能够满足目前铝型材工厂生产现场缺陷检测要求。
In view of the large difference of different sizes of aluminum surface defects leading to poor detection effect,an aluminum surface defect detection algorithm based on improved YOLOv5 is proposed.Firstly,CA attention mechanism module is embedded in the network to make the network better suppress the interference of invalid samples in the image and focus more on useful information.Secondly,a small target detection layer is added to the original detection layer to acquire and transmit more abundant and discriminant small target features,so as to solve the problem of low detection accuracy of small target defects and improve the overall detection accuracy.Finally,the SIoU loss function is introduced and the vector angle between boundary box regression is introduced to redefine the loss function,which effectively reduces the total freedom of loss and improves the reasoning precision.The improved algorithm is applied to Tianchi aluminum data set for verification.The experimental results show that the model can effectively identify different types of defects on aluminum profiles,which is 11.4%higher than the original YOLOv5 algorithm mAP,and the detection speed is up to 66.4 frame/s.The proposed method can meet the requirements of on-site defect detection in aluminum profile factories.
作者
席凌飞
伊力哈木·亚尔买买提
刘雅洁
XI Lingfei;Yilihamu Yaermaimaiti;LIU Yajie(School of Electrical Engineering,Xinjiang University,Urumuqi Xinjiang 830017,China)
出处
《广西师范大学学报(自然科学版)》
CAS
北大核心
2024年第1期111-119,共9页
Journal of Guangxi Normal University:Natural Science Edition
基金
国家自然科学基金(61866037,61462082)。