Please wait a minute...
浙江大学学报(工学版)  2024, Vol. 58 Issue (12): 2469-2478    DOI: 10.3785/j.issn.1008-973X.2024.12.006
计算机技术     
基于改进YOLOv5s网络的绝缘子缺陷检测
李运堂(),张坤,李恒杰,朱文凯,金杰,章聪,王冰清,OPPONGFrancis
中国计量大学 机电工程学院,浙江 杭州 310018
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
 全文: PDF(2449 KB)   HTML
摘要:

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

关键词: YOLOv5s绝缘子缺陷激活函数卷积注意力机制交叉卷积    
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 words: YOLOv5s    insulator defect    activation function    convolutional block attention mechanism    cross convolution
收稿日期: 2023-10-30 出版日期: 2024-11-25
CLC:  TP 391  
基金资助: 浙江省属高校基本科研业务费专项资金(2020YW29).
作者简介: 李运堂(1976—),男,教授,博士,从事无人机电力巡检研究. orcid.org/0000-0003-0924-8187. E-mail:Yuntangli@cjlu.edu.cn
服务  
把本文推荐给朋友
加入引用管理器
E-mail Alert
作者相关文章  
李运堂
张坤
李恒杰
朱文凯
金杰
章聪
王冰清
OPPONGFrancis

引用本文:

李运堂,张坤,李恒杰,朱文凯,金杰,章聪,王冰清,OPPONGFrancis. 基于改进YOLOv5s网络的绝缘子缺陷检测[J]. 浙江大学学报(工学版), 2024, 58(12): 2469-2478.

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.

链接本文:

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

图 1  常规YOLOv5s网络结构
图 2  SPPF模块示意图
特征图尺寸锚框尺寸
164×64(10,13),(16,30),(33,23)
232×32(30,61),(62,45),(59,119)
316×16(116,90),(156,198),(373,326)
表 1  常规YOLOv5s网络锚框尺寸
图 3  K-means++聚类结果
特征图尺寸锚框尺寸
164×64(45,43),(116,30),(70,82)
232×32(131,128),(283,60),(82,391)
316×16(407,102),(465,202),(266,442)
表 2  K-means++聚类锚框尺寸
图 4  SiLU与Hard-Swish激活函数曲线
方法层1层3层5层7mAP/%FPS/(帧·s?1)
HS086.164.1
HS185.764.1
HS286.264.2
HS386.464.4
HS486.664.5
表 3  Hard-Swish激活函数实验结果
图 5  卷积注意力机制
图 6  通道注意力权值示意图
图 7  空间注意力权值示意图
网络MmAP/%FPS/(帧·s?1)
常规YOLOv5s702502386.164.1
TA703451386.463.7
SE706019186.963.3
CBAM707015387.362.5
表 4  多种注意力机制对模型性能影响的实验结果
图 8  多种注意力机制的热力图对比
图 9  交叉卷积示意图
图 10  改进YOLOv5s网络结构
图 11  不同层特征图可视化结果
图 12  软件标注界面
方法网络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
表 5  数据集增强实验结果
图 13  改进YOLOv5s评价指标变化曲线
图 14  改进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
表 6  消融对比实验结果
图 15  不同网络检测结果对比
网络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
表 7  不同网络对比实验结果
图 16  绝缘子缺陷检测界面
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] 吕佳铭,张峰,罗亚波. 基于改进YOLOv5s的烟梗物料目标检测算法[J]. 浙江大学学报(工学版), 2024, 58(12): 2438-2446.
[2] 莫恒辉,魏霖静. 基于改进YOLOv7的复杂环境下苹果目标检测[J]. 浙江大学学报(工学版), 2024, 58(12): 2447-2458.
[3] 耿志强,陈威,马波,韩永明. 基于连续小波卷积神经网络的轴承智能故障诊断方法[J]. 浙江大学学报(工学版), 2024, 58(10): 2069-2075.
[4] 金鑫,庄建军,徐子恒. 轻量化YOLOv5s网络车底危险物识别算法[J]. 浙江大学学报(工学版), 2023, 57(8): 1516-1526.
[5] 马庆禄,鲁佳萍,唐小垚,段学锋. 改进YOLOv5s的公路隧道烟火检测方法[J]. 浙江大学学报(工学版), 2023, 57(4): 784-794.
[6] 张云佐,郭威,蔡昭权,李文博. 联合多尺度与注意力机制的遥感图像目标检测[J]. 浙江大学学报(工学版), 2022, 56(11): 2215-2223.
[7] 王红霞,周家奇,辜承昊,林泓. 用于图像分类的卷积神经网络中激活函数的设计[J]. 浙江大学学报(工学版), 2019, 53(7): 1363-1373.