Please wait a minute...
Journal of ZheJiang University (Engineering Science)  2024, Vol. 58 Issue (12): 2469-2478    DOI: 10.3785/j.issn.1008-973X.2024.12.006
    
Insulator defect detection based on improved YOLOv5s network
Yuntang LI(),Kun ZHANG,Hengjie LI,Wenkai ZHU,Jie JIN,Cong ZHANG,Bingqing WANG,Francis OPPONG
College of Mechanical and Electrical Engineering, China Jiliang University, Hangzhou 310018, China
Download: HTML     PDF(2449KB) HTML
Export: BibTeX | EndNote (RIS)      

Abstract  

The YOLOv5s network was improved aiming at the problem of missed detection, false detection and low efficiency of existing object detection algorithms for insulator defects in complex backgrounds. K-means++ clustering was used to analyze the insulator dataset to determine the anchor box size preset by the network. The SiLU activation function of convolution module in the third, fifth, and seventh layers of the backbone network was replaced by Hard-Swish activation function, and the convolutional block attention mechanism (CBAM) was added to improve the network generalization ability. CBAMs were added to the skip links between backbone network and neck network to enhance the ability of image feature extraction. Moreover, the residual structure of feature fusion module of the neck network was replaced by the cross convolution to reduce the network parameters and improve the detection speed. The experimental results demonstrated that the detection accuracy and speed for the insulator defect by the improved YOLOv5s network were 88.6% and 69.4 frames per second, respectively, which were better than those of the popular networks such as Faster R-CNN, YOLOv3, YOLOv4 and regular YOLOv5s. The improved YOLOv5s network meets the requirements of insulator defect detection.



Key wordsYOLOv5s      insulator defect      activation function      convolutional block attention mechanism      cross convolution     
Received: 30 October 2023      Published: 25 November 2024
CLC:  TP 391  
Fund:  浙江省属高校基本科研业务费专项资金(2020YW29).
Cite this article:

Yuntang LI,Kun ZHANG,Hengjie LI,Wenkai ZHU,Jie JIN,Cong ZHANG,Bingqing WANG,Francis OPPONG. Insulator defect detection based on improved YOLOv5s network. Journal of ZheJiang University (Engineering Science), 2024, 58(12): 2469-2478.

URL:

https://www.zjujournals.com/eng/10.3785/j.issn.1008-973X.2024.12.006     OR     https://www.zjujournals.com/eng/Y2024/V58/I12/2469


基于改进YOLOv5s网络的绝缘子缺陷检测

针对现有目标检测算法在复杂背景下绝缘子缺陷检测中容易出现漏检、误检和检测效率低等问题,改进YOLOv5s网络以提高绝缘子缺陷检测精度和速度. 采用K-means++聚类分析绝缘子数据集,确定网络预设锚框尺寸;利用Hard-Swish激活函数替换主干网络第3、5、7层卷积模块的SiLU激活函数,并添加卷积注意力机制(CBAM),提高网络泛化能力;在主干网络与颈部网络间的跳跃链接添加CBAM,增强图像特征提取能力;利用交叉卷积替换颈部网络特征融合模块的残差结构,减少网络参数,提高检测速度. 实验结果表明:基于改进YOLOv5s网络的绝缘子缺陷检测精度和速度分别为88.6%和69.4帧/s,优于Faster R-CNN、YOLOv3、YOLOv4、常规YOLOv5s等主流网络,满足绝缘子缺陷检测要求.


关键词: YOLOv5s,  绝缘子缺陷,  激活函数,  卷积注意力机制,  交叉卷积 
Fig.1 Structure of regular YOLOv5s network
Fig.2 Schematic diagram of SPPF module
特征图尺寸锚框尺寸
164×64(10,13),(16,30),(33,23)
232×32(30,61),(62,45),(59,119)
316×16(116,90),(156,198),(373,326)
Tab.1 Anchor box size of regular YOLOv5s network
Fig.3 Result of K-means++ clustering
特征图尺寸锚框尺寸
164×64(45,43),(116,30),(70,82)
232×32(131,128),(283,60),(82,391)
316×16(407,102),(465,202),(266,442)
Tab.2 Anchor box size of K-means++ clustering
Fig.4 Curves of SiLU and Hard-Swish activation function
方法层1层3层5层7mAP/%FPS/(帧·s?1)
HS086.164.1
HS185.764.1
HS286.264.2
HS386.464.4
HS486.664.5
Tab.3 Experiment results of Hard-Swish activation function
Fig.5 Convolutional block attention mechanism
Fig.6 Schematic diagram of channel attention weights
Fig.7 Schematic diagram of spatial attention weights
网络MmAP/%FPS/(帧·s?1)
常规YOLOv5s702502386.164.1
TA703451386.463.7
SE706019186.963.3
CBAM707015387.362.5
Tab.4 Experimental results on impact of various attention mechanisms on model performance
Fig.8 Comparative heat maps of various attention mechanisms
Fig.9 Schematic diagram of cross convolution
Fig.10 Structure of improved YOLOv5s network
Fig.11 Visualization results of feature maps at different layers
Fig.12 Interface of software annotation
方法网络mAP/%
验证集测试集
先增强后划分Faster R-CNN85.984.2
YOLOv391.886.1
YOLOv492.286.4
常规YOLOv5s93.585.9
先划分后增强Faster R-CNN84.584.4
YOLOv386.386.3
YOLOv486.786.5
常规YOLOv5s86.286.1
Tab.5 Experiment results of dataset enhancement
Fig.13 Evaluation metrics change curves for improved YOLOv5s
Fig.14 Loss value change curve for improved YOLOv5s
网络P/%R/%AP/%mAP/%FPS/
(帧·s?1)
正常
绝缘子
缺陷
绝缘子
破损
缺陷
闪络
缺陷
常规
YOLOv5s
88.181.295.994.787.166.786.164.1
方法 188.381.696.295.087.367.186.464.1
方法 289.482.596.395.188.669.287.362.5
方法389.883.196.795.790.470.488.361.1
方法 490.283.496.995.891.270.588.669.4
Tab.6 Results of ablation comparative experiment
Fig.15 Comparison results of different network detection results
网络S/MBP/%R/%mAP/%FPS/(帧·s?1)
Faster R-CNN130.478.683.284.44.8
Faster R-Transformer105.683.383.986.47.2
YOLOv359.185.581.686.323
YOLOv3-SimAM68.287.982.287.118.9
YOLOv461.487.380.486.520.1
YOLOv4-GhostNet35.987.582.687.426.7
常规YOLOv5s13.488.181.286.164.1
YOLOv5-TR13.688.580.586.963.5
改进YOLOv5s12.790.283.488.669.4
Tab.7 Comparative experimental results of different networks
Fig.16 Insulator defect detection interface
[1]   PRATES R M, CRUZ R, MAROTTA A P, et al Insulator visual non-conformity detection in overhead power distribution lines using deep learning[J]. Computers and Electrical Engineering, 2019, 78: 343- 355
doi: 10.1016/j.compeleceng.2019.08.001
[2]   ANTWI-BEKOE E, LIU G, AINAM J P, et al A deep learning approach for insulator instance segmentation and defect detection[J]. Neural Computing and Applications, 2022, 34 (9): 7253- 7269
doi: 10.1007/s00521-021-06792-z
[3]   FENG Z, GUO L, HUANG D, et al. Electrical insulator defects detection method based on YOLOv5 [C] // IEEE Data Driven Control and Learning Systems Conference . Suzhou: IEEE, 2021: 979−984.
[4]   马进, 白雨生 应用于绝缘子缺陷检测的轻量化YOLOv4研究[J]. 电子测量技术, 2022, 45 (14): 123- 130
MA Jin, BAI Yusheng Research on lightweight YOLOv4 applied to insulator defect detection[J]. Electronic Measurement Technology, 2022, 45 (14): 123- 130
[5]   肖粲俊, 潘睿志, 李超, 等 基于改进YOLOv5s绝缘子缺陷检测技术研究[J]. 电子测量技术, 2022, 45 (24): 137- 144
XIAO Canjun, PAN Ruizhi, LI Chao, et al Research on defection technology based on improved YOLOv5s insulator[J]. Electronic Measurement Technology, 2022, 45 (24): 137- 144
[6]   GAO Z, YANG G, LI E, et al Novel feature fusion module-based detector for small insulator defect detection[J]. IEEE Sensors Journal, 2021, 21 (15): 16807- 16814
doi: 10.1109/JSEN.2021.3073422
[7]   谢静, 杜耀文, 刘志坚, 等 基于轻量化改进型YOLOv5s的可见光绝缘子缺陷检测算法[J]. 电网技术, 2023, 47 (12): 5273- 5283
XIE Jing, DU Yaowen, LIU Zhijian, et al Defect detection algorithm based on lightweight and improved YOLOv5s for visible light insulators[J]. Power System Technology, 2023, 47 (12): 5273- 5283
[8]   GAO J, CHEN X, LIN D. Insulator defect detection based on improved YOLOv5 [C] // 5th Asian Conference on Artificial Intelligence Technology . Haikou: IEEE, 2021: 53−58.
[9]   颜宏文, 万俊杰, 潘志敏, 等. 基于改进YOLOv5-Lite轻量级的配电组件缺陷识别[EB/OL]. (2022-8-11) [2023-10-23]. https://doi.org/10.13336/j.1003-6520.hve.20220387.
[10]   HUANG Y, JIANG L, HAN T, et al High-accuracy insulator defect detection for overhead transmission lines based on improved YOLOv5[J]. Applied Sciences, 2022, 12 (24): 1- 13
[11]   李利荣, 张云良, 陈鹏, 等 基于轻量化YOLOv4的复杂场景绝缘子缺陷检测算法[J]. 光电子激光, 2022, 33 (6): 598- 606
LI Lirong, ZHANG Yunliang, CHEN Peng, et al Insulator defect detection algorithm for complex scenes based on lightweight YOLOv4[J]. Journal of Optoelectronics Laser, 2022, 33 (6): 598- 606
[12]   LIAN X, WANG D Insulator defect detection algorithm based on improved YOLOv5[J]. Frontiers in Computing and Intelligent Systems, 2023, 3 (2): 44- 47
doi: 10.54097/fcis.v3i2.7168
[13]   ZHAO L, ZUO M, CUI Y, et al Fast detection of defective insulator based on improved YOLOv5s[J]. Computational Intelligence and Neuroscience, 2022, 12 (2): 8955292
[14]   ZHANG Y, WEI B, ZHAO L, et al. Insulator defect detection based on feature fusion and attention mechanism [C]// IEEE International Conference on Signal Processing . Beijing: IEEE, 2022: 1−6.
[15]   HOWARD A, SANDLER M, CHU G, et al. Searching for mobilenetv3 [C]// IEEE International Conference on Computer Vision . Seoul: IEEE, 2019: 1314−1324.
[16]   徐建军, 黄立达, 闫丽梅, 等 基于层次多任务深度学习的绝缘子自爆缺陷检测[J]. 电工技术学报, 2021, 36 (7): 1407- 1415
XU Jianjun, HUANG Lida, YAN Limei, et al Insulator self-explosion defect detection based on hierarchical multi-task deep learning[J]. Transactions of China Electrotechnical Society, 2021, 36 (7): 1407- 1415
[17]   YANG L, FAN J, SONG S, et al A light defect detection algorithm of power insulators from aerial images for power inspection[J]. Neural Computing and Applications, 2022, 34 (20): 17951- 17961
doi: 10.1007/s00521-022-07437-5
[18]   李斌, 屈璐瑶, 朱新山, 等 基于多尺度特征融合的绝缘子缺陷检测[J]. 电工技术学报, 2023, 38 (1): 60- 70
LI Bin, QU Luyao, ZHU Xinshan, et al Insulator defect detection based on multi-scale feature fusion[J]. Transactions of China Electrotechnical Society, 2023, 38 (1): 60- 70
[19]   HE H, HUANG X, SONG Y, et al An insulator self-blast detection method based on YOLOv4 with Aerial Images[J]. Energy Reports, 2022, 8: 448- 454
[20]   韩俊, 袁小平, 王准, 等 基于YOLOv5s的无人机密集小目标检测算法[J]. 浙江大学学报: 工学版, 2023, 57 (6): 1224- 1233
HAN Jun, YUAN Xiaoping, WANG Zhun, et al UAV dense small target detection algorithm based on YOLOv5s[J]. Journal of Zhejiang University: Engineering Science, 2023, 57 (6): 1224- 1233
[21]   DIAN S, ZHONG X, ZHONG Y Faster R-Transformer: an efficient method for insulator detection in complex aerial environments[J]. Measurement, 2022, 199: 111238
doi: 10.1016/j.measurement.2022.111238
[22]   李季, 刘乐, 牛雨潇, 等 融入注意力的YOLOv3绝缘子串识别方法[J]. 高压电器, 2022, 58 (11): 67- 74
LI Ji, LIU Le, NIU Yuxiao, et al YOLOv3 identification method incorporating attention for insulator string[J]. High Voltage Apparatus, 2022, 58 (11): 67- 74
[1] Jiaming LV,Feng ZHANG,Yabo LUO. Improved YOLOv5s based target detection algorithm for tobacco stem material[J]. Journal of ZheJiang University (Engineering Science), 2024, 58(12): 2438-2446.
[2] Henghui MO,linjing WEI. Improved YOLOv7 based apple target detection in complex environment[J]. Journal of ZheJiang University (Engineering Science), 2024, 58(12): 2447-2458.
[3] Zhiqiang GENG,Wei CHEN,Bo MA,Yongming HAN. Bearing intelligent fault diagnosis method based on continuous wavelet convolutional neural network[J]. Journal of ZheJiang University (Engineering Science), 2024, 58(10): 2069-2075.
[4] Xin JIN,Jian-jun ZHUANG,Zi-heng XU. Lightweight YOLOv5s network-based algorithm for identifying hazardous objects under vehicles[J]. Journal of ZheJiang University (Engineering Science), 2023, 57(8): 1516-1526.
[5] Qing-lu MA,Jia-ping LU,Xiao-yao TANG,Xue-feng DUAN. Improved YOLOv5s flame and smoke detection method in road tunnels[J]. Journal of ZheJiang University (Engineering Science), 2023, 57(4): 784-794.
[6] Yun-zuo ZHANG,Wei GUO,Zhao-quan CAI,Wen-bo LI. Remote sensing image target detection combining multi-scale and attention mechanism[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(11): 2215-2223.
[7] Hong-xia WANG,Jia-qi ZHOU,Cheng-hao GU,Hong LIN. Design of activation function in CNN for image classification[J]. Journal of ZheJiang University (Engineering Science), 2019, 53(7): 1363-1373.