吉首大学学报(自然科学版) ›› 2025, Vol. 46 ›› Issue (4): 44-51.DOI: 10.13438/j.cnki.jdzk.2025.04.007

• 计算机 • 上一篇    下一篇

轻量化YOLOv5s与U2-Net的指针式仪表智能读数方法

苏盈盈,斯洪云,唐霞,刘兴华,郭利霞   

  1. (1.重庆科技大学电气工程学院,重庆 401331;2.中国石化西南石油工程重庆钻井分公司,重庆 400010)
  • 出版日期:2025-07-25 发布日期:2025-08-05
  • 作者简介:苏盈盈(1982—),女,黑龙江伊春人,重庆科技大学电气工程学院教授,博士,硕士生导师,主要从事智能计算与模式识别研究
  • 基金资助:
    重庆市教育委员会科学技术研究项目(KJQN202101510);重庆市自然科学基金面上项目(CSTB2022NSCQ-MSX1425);重庆科技学院硕士研究生创新计划项目(YKJCX2320403)

Lightweight YOLOv5s with U2-Net for Intelligent Reading of Pointer Meters

SU Yingying,SI Hongyun,TANG Xia,LIU Xinghua,GUO Lixia   

  1. (1.College of Electrical Engineering,Chongqing University of Science and Technology,Chongqing 401331,China;2.Sinopec Southwest Petroleum Engineering Chongqing Drilling Branch,Chongqing 400010,China)
  • Online:2025-07-25 Published:2025-08-05

摘要:针对指针式仪表智能定位速度慢和读数精准度低的问题,设计了一种基于YOLOv5s模型与U2-Net模型的指针式仪表智能读数方法.首先,对YOLOv5s主干与颈部中的部分批量化归一层进行通道剪枝,实现模型轻量化,提升仪表定位速度;然后,针对现场采集图像存在阴影、噪声等问题,对图像进行增强处理,使模型适用于复杂环境;其次,采用U2-Net模型分割指针和刻度,定位指针在刻度上的相对位置,提升读数的准确率;最后,采用距离法进行仪表读数.实验结果表明,轻量化YOLOv5s模型的大小较YOLOv5s模型缩减56.35%,定位时间减少18.18%,轻量化YOLOv5s模型的读数识别测试准确率为93.42%,平均绝对误差为0.032,平均读数误差率为0.605%,每张图片平均测试时间为0.402 s,满足工业检测要求.

关键词: 指针式仪表, YOLOv5s, 通道剪枝, U2-Net, 距离法

Abstract: Aiming at the problem of slow speed of intelligent positioning and low accuracy of reading for pointer meters,a method of intelligent reading for pointer meters based on YOLOv5s and U2-Net is proposed.Firstly,the partial batch normalization layer in the trunk and neck of YOLOv5s is used for channel pruning to realize the model lightweight and improve the speed of meter positioning;secondly,in view of shadow and noisy images collected in the field,the image is enhanced,so as to make the model suitable for complex environments;and then,the U2-Net model is adopted to segment the pointer and the scale,to locate the relative position of pointer on the scale,and to improve the accuracy of readings.Then,the U2-Net model is used to segment the pointer and the scale,locate the relative position of the pointer on the scale,and improve the accuracy of the readings;finally,the distance method is used for meter reading.The results of the experiment and reading test show that the size of the lightweight YOLOv5s model is reduced by 56.35%,the positioning time is reduced by 18.18%,the accuracy of the reading recognition test is 93.42%,the average absolute error is 0.032,the average reading error rate is 0.605%,and the average test time per picture is 0.402 s,which meets the industrial inspection requirements.

Key words: pointer instrument, YOLOv5s, channel pruning, U2-Net, distance method

公众号 电子书橱 超星期刊 手机浏览 在线QQ