Computer Engineering and Applications ›› 2024, Vol. 60 ›› Issue (10): 256-265.DOI: 10.3778/j.issn.1002-8331.2309-0468

• Graphics and Image Processing • Previous Articles     Next Articles

Improved Defect Detection Algorithm in Power Inspection Based on YOLOv5s

WANG Lei, HAO Yongting, PAN Mingran, ZHAO Mudong, ZHANG Yongxin, ZHANG Mingyu   

  1. 1.School of Mechanical Engineering, Shenyang Ligong University, Shenyang 110159, China
    2.Research and Development Center, Liaoshen Industrial Group Co., Ltd., Shenyang 110045, China
  • Online:2024-05-15 Published:2024-05-15

电力巡检中改进YOLOv5s的缺陷检测算法研究

王磊,郝涌汀,潘明然,赵慕东,张永鑫,张茗宇   

  1. 1.沈阳理工大学 机械工程学院,沈阳 110159
    2.辽沈工业集团有限公司 研发中心,沈阳 110045

Abstract: A modified defect detection algorithm based on YOLOv5s is proposed to address the issue of low detection accuracy for critical components during power line inspections using drones. The algorithm introduces a convolutional neural network attention module (CBAM) in the backbone network to enhance the efficiency of extracting important information from feature maps. The original PANet feature fusion framework in YOLOv5s is replaced with a bidirectional feature pyramid network (BiFPN), which incorporates learnable weights to map different feature contributions, thereby increasing the importance of significant feature mappings. Additionally, a context convolution module is added on top of the spatial pyramid pooling (SPP) module to improve feature representation capabilities. Experimental verification is conducted by using aerial photography datasets, demonstrating that the improved algorithm achieves an mAP of 95.6%, accuracy of 93.7%, and recall rate of 93.8%. To further validate the algorithm’s performance on embedded systems, the model is accelerated and deployed on the Jetson Xavier NX platform, the average runtime for a single-frame image is 24.6?ms with a detection accuracy of 90.8% and a recall rate of 90.5%. This capability allows for precise object recognition on Jetson Xavier NX devices. The improved model has enhanced detection accuracy, demonstrating the effectiveness of the algorithm and meeting real-time detection requirements for power line inspections.

Key words: electric power inspection, object detection, attention mechanism, features fusion, YOLO

摘要: 针对无人机进行电力巡检时关键零件的检测精度较低的问题,提出了一种基于YOLOv5s的改进型缺陷检测算法。在骨干网络中引入卷积神经网络注意力模块(CBAM),增强网络对特征图中重要信息的提取效率;将YOLOv5s中原有的PANet特征融合框架替换为双向特征金字塔网络(BiFPN),引入可学习的权重,映射不同的学习特征,增加对贡献较大特征的映射。在空间金字塔池化模块(spatial pyramid pooling,SPP)的基础上加入上下文卷积模块,提升特征的表达能力。通过构建航拍数据集进行实验验证,结果表明,改进后的算法mAP达到95.6%,准确率达到93.7%,召回率达到93.8%。为进一步验证算法在嵌入式系统的运行效果,通过缩小网络宽度进行轻量化,利用TensorRT推理引擎,优化了网络结构并加速了模型的推理。将模型加速后部署至Jetson Xavier NX平台进行测试,单帧图像平均运行时间为24.6?ms,检测准确率为90.8%,召回率为90.5%,能够在Jetson Xavier NX设备上对目标实现精准识别。改进后的模型提高了检测精度,体现了算法的有效性,满足电力巡检作业的实时检测需求。

关键词: 电力巡检, 目标检测, 注意力机制, 特征融合, YOLO