基于改进YOLOv5s的铝材表面缺陷检测方法

Aluminum surface defect detection method based on improved YOLOv5s

  • 摘要: 针对目前铝材表面缺陷检测算法在实际工程应用中检测精度低以及不够轻量化难以部署等问题,文章提出一种基于改进YOLOv5s的铝材表面缺陷检测方法。该算法以经典YOLOv5s模型为基础,将ShufflenNetV2-Block算法融合到主干网络backbone中,降低模型的计算复杂性;然后添加SE注意力机制,使注意力集中于缺陷相关区域,更好地区分类别之间的差异,提高分类性能和检测效率;最后优化损失函数,采用SIoU(S-intersection over union)替代CIoU,提升网络定位精度。结果表明:针孔类和斑点类缺陷检测精度比原版YOLOv5分别提升了8.3%和8.4%,mAP值提高了6.4%,提高了缺陷检测精度且降低了模型的大小和所占内存,更加便于移动端部署,有效改善了制造过程中漏检问题。

     

    Abstract: In view of the current problems of low detection accuracy of aluminum surface defect detection algorithms in practical engineering applications and being not lightweight enough and difficult to deploy, an aluminum surface defect detection method based on improved YOLOv5s is proposed. This algorithm is based on the classic YOLOv5s model, and integrates the ShufflenNetV2-Block algorithm into the backbone network to reduce the computational complexity of the model; then adds an SE attention mechanism to focus attention on defect-related areas and better distinguish between categories. The difference between them improves classification performance and detection efficiency; finally, the loss function is optimized and SIoU (S-intersection over union) is used to replace CIoU to improve network positioning accuracy. The results show that the detection accuracy of pinhole and spot defects is improved by 8.3% and 8.4% respectively compared with the original YOLOv5, and the mAP value is increased by 6.4%, which improves the defect detection accuracy and reduces the size and memory of the model, making it more convenient. Mobile terminal deployment effectively improves the problem of missed detection during the manufacturing process.

     

/

返回文章
返回