起重运输机械2024,Issue(17) :32-39.

基于改进YOLOv5s的测温样件缺陷识别方法

蒋近民 张旭梅 黄安贻
起重运输机械2024,Issue(17) :32-39.

基于改进YOLOv5s的测温样件缺陷识别方法

蒋近民 1张旭梅 2黄安贻1
扫码查看

作者信息

  • 1. 武汉理工大学机电工程学院 武汉 430070
  • 2. 汉口学院 武汉 430212
  • 折叠

摘要

文中针对目前测温取样样件表面缺陷识别存在人工目视识别主观性强,检测速度慢,对工人身体伤害大等问题,提出了一种改进的YOLOv5s缺陷检测算法,将机器视觉运用在测温样件的缺陷识别工艺中.对数据集进行数据增强,保证数据分布均衡性以及提高结果的可靠性.为了保证轻量化的同时获得更加丰富的梯度流信息,在主干网络中增加C2f模块.引入CAM模块(Context Augmentation Module)提取更多有效的特征信息,提高对缺陷的定位能力,进一步聚合坐标信息.然后对改进后的网络模型通过基于层自适应幅度的剪枝LAMP(Layer Adaptive Magnitude Pruning)压缩,进一步提升模型加载和运行速度.最后在数据集上对改进后的模型进行测试,其mAP@0.5、mAP@0.5~0.95 分别达到了 89.1%,64.5%,每张图的推理时间为 0.00 204 s,均优于原模型.研究结果表明,改进模型为测温样件的缺陷检测提供了更加高效的方法.

Abstract

Considering the problems of strong subjectivity,slow detection speed and great harm to workers in the surface defect identification of temperature measuring samples,an improved YOLOv5s defect detection algorithm is proposed,and machine vision is introduced into the defect identification process of temperature measuring samples.The data set was enhanced to ensure the balance of data distribution and improve the reliability of the results.To ensure the lightweight design and obtain more abundant gradient flow information,C2f module was added to the backbone network.More effective feature information was extracted through the introduced CAM module,which improves the defect location and further aggregates the coordinate information.Then the improved network model was compressed by layer adaptive amplitude pruning(LAMP),which further improves the loading and running speed of the model.Finally,the improved model was tested on the data set,mAP@0.5 and mAP@0.5~0.95 reached 89.1%and 64.5%respectively,and the reasoning time of each graph was 0.002 04 s,which is better than the original model.The results show that the improved model is more efficient in defect detection of temperature measurement samples.

关键词

目标检测/YOLOv5s/CAM模块/C2f模块/轻量化

Key words

target detection/YOLOv5s/CAM module/C2f module/lightweight design

引用本文复制引用

出版年

2024
起重运输机械
北京起重运输机械设计研究院

起重运输机械

影响因子:0.214
ISSN:1001-0785
段落导航相关论文