Detection and Recognition of Digital Instruments Based on Lightweight YOLO-v4 Model at Substations
-
摘要:
为了在变电站实际场景中准确获取数字仪表读数,智能管控变电站的安全风险,同时推动变电站智能化发展,以实际场景中变电站数字仪表作为研究对象,综合考虑实时性及准确度等,提出一种基于轻量级YOLO-v4模型的变电站数字仪表检测识别方法. 首先,通过从鄂尔多斯变电站实际拍摄变电站数字仪表图像数据,使用Albumentations框架对数字仪表图像进行数据扩充,构建变电站数字仪表目标检测数据集;然后,以YOLO-v4网络为基础,结合注意力机制构建一个有效通道注意(efficient channel attention,ECA)改进的深度可分离卷积模块(ECA-bneck-m);最后,提出一个轻量级YOLO-v4模型,进行模型大小与性能的对比实验. 实验结果表明:本文方法可以在几乎不损失检测准确度的情况下,将整个模型存储大小压缩为原先的1/5,同时将模型推理速度从24.0帧/s提升至36.9帧/s,其实时性能够满足实际变电站检测识别的工程需要.
Abstract:In order to accurately recognize the readings of digital instruments in the actual scene of substations, intelligently control substation security, and promote its intelligent development, the digital instruments in the substation are taken as the research object, and in view of real-time and accuracy, a lightweight YOLO-v4 model is proposed for the detection and recognition of digital instruments. Firstly, the digital instrument images captured from the Ordos substation are expanded by using the Albumentations framework, thus building an effective digital instrument data set for detection and recognition. After that, an efficient channel attention (ECA)-based deep separable convolution block (ECA-bneck-m) is constructed with attention mechanism, and further a lightweight YOLO-v4 model is proposed to conduct comparative experiments on model size and performance. Finally, experiments comparing model size and performance are performed. The results show that, the storage size of the model can be compressed by about 5 times nearly without loss of detection accuracy, and the processing speed of model can be increased from 24.0 frame/s to 36.9 frame/s, indicating that the proposed model can meet the requirements of real-time detection and recognition in the actual substation.
-
Key words:
- digital instrument /
- detection and recognition /
- YOLO-v4 /
- data augmentation /
- lightweight
-
表 1 图像数据扩充结果
Table 1. Image data expansion results
幅 数据集 数字仪表 数字字符 总计 原数据集 1571 1201 2772 扩充数据集 5000 5000 10000 表 2 k-means预选框聚类结果
Table 2. k-means clustering results of prior box
模型 特征层 13 × 13 26 × 26 52 × 52 仪表检测
模型(204, 149) (84, 174) (5, 16) (221, 448) (128, 227) (21, 36) (288, 144) (174, 479) (71, 131) 字符识别
模型(159, 191) (94, 127) (14, 24) (163, 270) (127, 167) (42, 62) (297, 876) (131, 633) (70, 308) 表 3 SPP层不同池化尺度性能对比结果
Table 3. Performance comparison of SPP layer at different pooling scales
池化尺度 mAP/% {3 × 3, 5 × 5} 99.75 {5 × 5, 7 × 7} 99.69 {7 × 7, 9 × 9} 99.78 {7 × 7, 11 × 11} 99.74 {5 × 5, 9 × 9} 99.68 表 4 不同网络模型大小对比结果
Table 4. Comparison results of different model sizes
网络模型 参数量/个 模型大小/MB YOLO-v4 (DarkNet-53) 63986151 244.0 YOLO-v4 (bneck) 14018719 53.8 YOLO-v4 (bneck-m) 14018719 53.8 YOLO-v4 (ECA-bneck-m) 12506463 48.0 表 5 不同深度学习目标检测模型对比结果
Table 5. Comparison of different deep learning detection models
网络 mAP/% FPS/(帧·s−1) Faster-RCNN 83.88 6.0 YOLO-v3 99.64 30.0 YOLO-v4 99.80 24.0 轻量级YOLO-v4 (bneck) 99.58 33.7 轻量级YOLO-v4 (bneck-m) 99.75 35.6 轻量级YOLO-v4 (ECA-bneck-m) 99.78 36.9 表 6 轻量级YOLO-v4(ECA-bneck-m)测试结果
Table 6. Lightweight YOLO-v4 (ECA-bneck-m) test results
类别 P/% R/% F1 字符 0 识别 99.83 99.65 1.00 字符 1 识别 99.43 98.87 0.99 字符 2 识别 98.58 100.00 0.99 字符 3 识别 100.00 100.00 1.00 字符 4 识别 98.56 100.00 0.99 字符 5 识别 96.58 99.30 0.98 字符 6 识别 95.27 98.60 0.97 字符 7 识别 99.05 100.00 1.00 字符 8 识别 97.54 100.00 0.99 字符 9 识别 100.00 99.25 1.00 仪表检测 97.22 100.00 0.99 数显区域定位 98.25 100.00 0.99 -
[1] CUI X X, FANG H, YANG G Q, et al. A new method of digital number recognition for substation inspection robot[C]//2016 4th International Conference on Applied Robotics for the Power Industry (CARPI). Jinan: IEEE, 2016: 1-4. [2] 卜令正,王洪栋,朱美强,等. 基于改进卷积神经网络的多源数字识别算法[J]. 计算机应用,2018,38(12): 3403-3408.BU Lingzheng, WANG Hongdong, ZHU Meiqiang, et al. Multi-source digit recognition algorithm based on improved convolutional neural network[J]. Journal of Computer Applications, 2018, 38(12): 3403-3408. [3] 郭兰英,韩睿之,程鑫. 基于可变形卷积神经网络的数字仪表识别方法[J]. 计算机科学,2020,47(10): 187-193.GUO Lanying, HAN Ruizhi, CHENG Xin. Digital instrument identification method based on deformable convolutional neural network[J]. Computer Science, 2020, 47(10): 187-193. [4] 陈刚,胡子峰,郑超. 基于特征检测的数字仪表数码快速识别算法[J]. 中国测试,2019,45(4): 146-150.CHEN Gang, HU Zifeng, ZHENG Chao. Fast recognition algorithm for digital instruments based on feature detection[J]. China Measurement & Test, 2019, 45(4): 146-150. [5] 郭爽. 数码管数字仪表自动识别方法的研究[J]. 通信技术,2012,45(8): 91-93.GUO Shuang. Study on automatic identification method of digital tube[J]. Communications Technology, 2012, 45(8): 91-93. [6] 高菊,叶桦. 一种有效的水表数字图像二次识别算法[J]. 东南大学学报(自然科学版),2013,43(增1): 153-157.GAO Ju, YE Hua. An effective two-times recognition algorithm of meter digital image[J]. Journal of Southeast University (Natural Science Edition), 2013, 43(S1): 153-157. [7] ZHOU C H, ZHOU J Y, YU C, et al. Multi-channel sliced deep RCNN with residual network for text classification[J]. Chinese Journal of Electronics, 2020, 29(5): 880-886. doi: 10.1049/cje.2020.08.003 [8] SHELHAMER E, LONG J, DARRELL T. Fully convolutional networks for semantic segmentation[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017, 39(4): 640-651. [9] TANG Z L, LIU Q Q, WU M J, et al. WiFi CSI gesture recognition based on parallel LSTM-FCN deep space-time neural network[J]. China Communications, 2021, 18(3): 205-215. doi: 10.23919/JCC.2021.03.016 [10] 黄继鹏,史颖欢,高阳. 面向小目标的多尺度Faster-RCNN检测算法[J]. 计算机研究与发展,2019,56(2): 319-327.HUANG Jipeng, SHI Yinghuan, GAO Yang. Multi-scale faster-RCNN algorithm for small object detection[J]. Journal of Computer Research and Development, 2019, 56(2): 319-327. [11] 林刚,王波,彭辉,等. 基于改进Faster-RCNN的输电线巡检图像多目标检测及定位[J]. 电力自动化设备,2019,39(5): 213-218.LIN Gang, WANG Bo, PENG Hui, et al. Multi-target detection and location of transmission line inspection image based on improved Faster-RCNN[J]. Electric Power Automation Equipment, 2019, 39(5): 213-218. [12] 王粉花,黄超,赵波,等. 基于YOLO算法的手势识别[J]. 北京理工大学学报,2020,40(8): 873-879.WANG Fenhua, HUANG Chao, ZHAO Bo, et al. Gesture recognition based on YOLO algorithm[J]. Transactions of Beijing Institute of Technology, 2020, 40(8): 873-879. [13] 昝珊珊,李波. 融合改进YOLOv2网络的视觉多目标跟踪方法[J]. 小型微型计算机系统,2020,41(12): 2601-2606.ZAN Shanshan, LI Bo. Visual multi-target tracking method combined with improved YOLOv2 network[J]. Journal of Chinese Computer Systems, 2020, 41(12): 2601-2606. [14] 寇大磊,权冀川,张仲伟. 基于深度学习的目标检测框架进展研究[J]. 计算机工程与应用,2019,55(11): 25-34.KOU Dalei, QUAN Jichuan, ZHANG Zhongwei. Research on progress of object detection framework based on deep learning[J]. Computer Engineering and Applications, 2019, 55(11): 25-34. [15] 郭璠,张泳祥,唐琎,等. YOLOv3-A:基于注意力机制的交通标志检测网络[J]. 通信学报,2021,42(1): 87-99.GUO Fan, ZHANG Yongyang, TANG Jin, et al. YOLOv3-A: a traffic sign detection network based on attention mechanism[J]. Journal on Communications, 2021, 42(1): 87-99. [16] DEGADWALA S, VYAS D, CHAKRABORTY U, et al. Yolo-v4 deep learning model for medical face mask detection[C]//2021 International Conference on Artificial Intelligence and Smart Systems (ICAIS). Coimbatore: IEEE, 2021: 209-213. [17] 窦其龙,颜明重,朱大奇. 基于YOLO-v5的星载SAR图像海洋小目标检测[J]. 应用科技,2021,48(6): 1-7. doi: 10.11991/yykj.202105023DOU Qilong, YAN Mingzhong, ZHU Daqi. Small marine target detection in space-borne SAR image based on YOLO-v5[J]. Applied Science and Technology, 2021, 48(6): 1-7. doi: 10.11991/yykj.202105023 [18] 来文豪,周孟然,胡锋,等. 基于多光谱成像和改进YOLO v4的煤矸石检测[J]. 光学学报,2020,40(24): 72-80.LAI Wenhao, ZHOU Mengran, HU Feng, et al. Coal gangue detection based on multi-spectral imaging and improved YOLO v4[J]. Acta Optica Sinica, 2020, 40(24): 72-80. [19] KANNADAGULI P. YOLO v4 based human detection system using aerial thermal imaging for UAV based surveillance applications[C]//2020 International Conference on Decision Aid Sciences and Application (DASA). Sakheer: IEEE, 2020: 1213-1219. [20] DENG B Y, LEI X C, YE M. Safety helmet detection method based on YOLO v4[C]//2020 16th Inter-national Conference on Computational Intelligence and Security (CIS). Guangxi: IEEE, 2021: 155-158. [21] LI Y T, HUANG H S, XIE Q S, et al. Research on a surface defect detection algorithm based on MobileNet-SSD[J]. Applied Sciences, 2018, 8(9): 1678.1-1678.17. doi: 10.3390/app8091678 [22] SANDLER M, HOWARD A, ZHU M L, et al. MobileNetV2: inverted residuals and linear bottlenecks[C]//2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). Salt Lake City: IEEE, 2018: 4510-4520. [23] HOWARD A, SANDLER M, CHEN B, et al. Searching for MobileNetV3[C]//2019 IEEE/CVF International Conference on Computer Vision (ICCV). Seoul: IEEE, 2020: 1314-1324. [24] 盛敏,刘双庆,王婕,等. 基于改进模板匹配的智能下肢假肢运动意图实时识别[J]. 控制与决策,2020,35(9): 2153-2161.SHENG Min, LIU Shuangqing, WANG Jie, et al. Real-time motion intent recognition of intelligent lower limb prosthesis based on improved template matching technique[J]. Control and Decision, 2020, 35(9): 2153-2161. [25] 刘宇晴,王天昊,徐旭. 深度学习神经网络的新型自适应激活函数[J]. 吉林大学学报(理学版),2019,57(4): 857-859.LIU Yuqing, WANG Tianhao, XU Xu. New adaptive activation function for deep learning neural networks[J]. Journal of Jilin University (Science Edition), 2019, 57(4): 857-859. [26] 马小陆,方洋,王兵,等. 一种改进的YOLO v3红外图像行人检测方法[J]. 湖北理工学院学报,2020,36(6): 19-24,38. doi: 10.3969/j.issn.2095-4565.2020.06.005MA Xiaolu, FANG Yang, WANG Bing, et al. An improved YOLO v3 infrared image pedestrian detection method[J]. Journal of Hubei Polytechnic University, 2020, 36(6): 19-24,38. doi: 10.3969/j.issn.2095-4565.2020.06.005 [27] 杨蜀秦, 刘江川, 徐可可, 等. 基于改进CenterNet的玉米雄蕊无人机遥感图像识别[J]. 农业机械学报, 2021, 52(9): 206-212.YANG Shuqin, LIU Jiangchuan, XU Keke, et al. Improved CenterNet based maize tassel recognition for UAV remote sensing image[J]. Transactions of the Chinese Society for Agricultural Machinery, 2021, 52(9): 206-212. [28] 王钏文,王磊,黄仁欢,等. 基于YOLOv3算法的中低速列车在途障碍物检测方法[J]. 铁路通信信号工程技术,2021,18(7): 86-89.WANG Chuanwen, WANG Lei, HUANG Renhuan, et al. Detection method of obstacles of medium-low speed train in transit based on YOLOv3 algorithm[J]. Railway Signalling & Communication Engineering, 2021, 18(7): 86-89. [29] 张欣,张永强,何斌,等. 基于YOLOv4-tiny的遥感图像飞机目标检测技术研究[J]. 光学技术,2021,47(3): 344-351.ZHANG Xin, ZHANG Yongqiang, HE Bin, et al. Research on remote sensing image aircraft target detection technology based on YOLOv4-tiny[J]. Optical Technique, 2021, 47(3): 344-351.