针对光照不均匀和水表表盘雾化的指针式水表在读数检测时出现漏检、误检等问题,提出一种基于改进YOLOv5s的指针式水表读数检测方法.首先,采用Mosaic、Mixup等数据增强方法,提高模型的泛化能力;其次,引入加权双向特征金字塔网络(bilateral feature pyramid network,BiFPN)实现更高层次的特征融合使得水表图像的深层特征图和浅层特征图充分融合,提高网络的表达能力;然后,嵌入卷积注意力机制(convolutional block attention module,CBAM),在通道和空间双重维度上强化指针式水表子表盘示数特征;最后将完全交并比损失函数(complete intersection over union loss,CIoU-Loss)替换为SIoU_Loss(scylla intersection over union loss),提升边界框的回归精度.改进算法的mAP@0.5达到97.8%,比YOLOv5s原始网络提升了 3.2%.实验结果表明:该算法能有效提高指针式水表的读数检测精度.
Reading Detection of Pointer Water Meter Based on Improved YOLOv5s
In view of the problems such as missing detection and false detection in the reading detection of the pointer water meter with uneven illumination and atomized water meter dial,a reading detection method of the pointer water meter based on the improved YOLOv5s was proposed.Firstly,data augmentation methods such as Mosaic and Mixup were used to improve the generalization ability of the model.Secondly,the introduction of the bilateral feature pyramid network(BiFPN)module enabled higher-level feature fusion,enabling the full fusion of deep and shallow feature maps of water meter images,thereby improving the network's expressive power.Then,the convolutional block attention module(CBAM)was embedded to enhance the sub dial indication features of the pointer water meter in both channel and spatial dimensions.Finally,the complete intersection over union loss(CIoU Loss)function was replace with SIoU_Loss(scylla intersection over union loss)to improve the regression accuracy of bounding boxes.Improved algorithm mAP@0.5 reached 97.8%,an improvement of 3.2%compared to the YOLOv5s original network.The experimental results show that this algo-rithm can effectively improve the reading detection accuracy of pointer water meters.
pointer water meter readingdata enhancementYOLOv5sSIoUCBAMBiFPN