基于改进YOLOv5s网络的斜拉桥拉索表面缺陷检测

王鹏峰,李运堂,黄永勇,等. 基于改进YOLOv5s网络的斜拉桥拉索表面缺陷检测[J]. 光电工程,2024,51(5): 240028. doi: 10.12086/oee.2024.240028
引用本文: 王鹏峰,李运堂,黄永勇,等. 基于改进YOLOv5s网络的斜拉桥拉索表面缺陷检测[J]. 光电工程,2024,51(5): 240028. doi: 10.12086/oee.2024.240028
Wang P F, Li Y T, Huang Y Y, et al. Defects detection for cable surface of cable-stayed bridge based on improved YOLOv5s network[J]. Opto-Electron Eng, 2024, 51(5): 240028. doi: 10.12086/oee.2024.240028
Citation: Wang P F, Li Y T, Huang Y Y, et al. Defects detection for cable surface of cable-stayed bridge based on improved YOLOv5s network[J]. Opto-Electron Eng, 2024, 51(5): 240028. doi: 10.12086/oee.2024.240028

基于改进YOLOv5s网络的斜拉桥拉索表面缺陷检测

  • 基金项目:
    浙江省基础公益研究计划(LGF19E050002, LZ23E050002, LZ23E060002);浙江省属高校基本科研业务费专项资金(2020YW29)
详细信息
    作者简介:
    *通讯作者: 李运堂, yuntangli@cjlu.edu.cn
  • 中图分类号: TP391

Defects detection for cable surface of cable-stayed bridge based on improved YOLOv5s network

  • Fund Project: Zhejiang Province Basic Public Welfare Research Program (LGF19E050002, LZ23E050002, LZ23E060002), and Special Funds for Basic Scientific Research Business Expenses of Zhejiang Provincial Universities (2020YW29)
More Information
  • 针对人工检测斜拉桥拉索表面缺陷效率低、安全性差,而现有目标检测方法速度慢、精度低,受拉索表面污垢干扰容易导致错检、漏检等问题,本文改进YOLOv5s网络以实现拉索表面缺陷快速准确检测。在主干网络增加TRANS模块,获取单幅图像更多特征,提高缺陷检测精度;为减少参数量、提高计算速度,将颈部网络的CSP模块替换为GhostBottleneck模块,同时利用深度可分离卷积代替普通卷积;利用SIOU损失函数减少边界框震荡,提高预测框和真实框重叠度计算结果准确性,增加模型稳定性。实验结果表明:改进YOLOv5s网络的mAP和FPS分别达到94.26%和68 f/s,优于Faster-RCNN、YOLOv4和常规YOLOv5等网络,满足斜拉桥拉索表面缺陷检测精度和实时性要求。

  • Overview: In recent years, the construction technology of large-span bridges has developed rapidly and its application has increased. As the main form of large-span bridges, the cable-stayed bridge has outstanding advantages such as beautiful appearance, strong seismic resistance, long span distance, low cost, and convenient construction. Therefore, it is widely used in bridges for crossing rivers or seas. As the main load-bearing component, the cable guarantees cable-stayed bridges being serviced safely. The interior of the cable is composed of high-strength steel wires and anti-corrosion coatings while the exterior is mainly protected by polyethylene or high-density polyethylene. Due to long-term exposure to the natural environment and affected by sunlight, wind, rain, and other factors, the protective layer of the cable is extremely easy to be erosion, deformation, cracking, and even peeling, which leads to the failure of the protective function. Furthermore, corrosion media and humid water mist entering the interior of the cable will cause steel wire corrosion and fracture. Therefore, regular cable detection is necessary to ensure bridge safety. Due to the low efficiency, high cost, and poor safety of manual detection of cable surface defects in cable-stayed bridges, existing target detection methods have low accuracy and slow speed, and are easily affected by cable surface dirt interference, resulting in false or missed detections. Therefore, an improved YOLOv5s network is proposed to achieve fast and accurate detection of cable surface defects. Add a TRANS module to the backbone network to obtain more features from a single image and improve defect detection accuracy. In the neck network, GhostBottleneck is used instead of the CSP module, and depthwise separable convolution is used instead of regular convolution to ensure detection accuracy while effectively reducing network parameters and significantly improving detection speed. Introducing the SIOU loss function to solve the problem of mismatch between the real and predicted boxes of small target defects, and improving the convergence speed and stability of the network. Using polyvinyl chloride pipes to simulate cable protection sleeves, constructing a dataset for experiments. The experimental results show that the mAP and FPS of the improved YOLOv5s network reach 94.26% and 68 frames per second, respectively, which are superior to Faster RCNN, YOLOv4, conventional YOLOv5, and other networks, meeting the requirements of surface defect detection accuracy and real-time performance for cable-stayed bridges.

  • 加载中
  • 图 1  常规YOLOv5s网络结构

    Figure 1.  Structure of the conventional YOLOv5s network

    图 2  SPPF模块

    Figure 2.  SPPF module

    图 3  预测框示意图

    Figure 3.  Schematic diagram of the prediction box

    图 4  改进YOLOv5s网络结构

    Figure 4.  Structure of the improved YOLOv5s network

    图 5  TRANS模块

    Figure 5.  TRANS module

    图 6  多头注意力机制

    Figure 6.  Multi-head attention

    图 7  GhostBottleneck模块

    Figure 7.  GhostBottleneck module

    图 8  Ghost结构

    Figure 8.  Ghost structure

    图 9  角度损失

    Figure 9.  Angle loss

    图 10  距离损失

    Figure 10.  Distance loss

    图 11  拉索表面缺陷数据采集

    Figure 11.  Data collection of cable surface defects

    图 12  Mosaic数据扩充

    Figure 12.  Mosaic data augmentation

    图 13  标注实例

    Figure 13.  Annotation instance

    图 14  损失值变化曲线

    Figure 14.  Loss value variation curve

    图 15  不同网络检测结果对比

    Figure 15.  Comparison of different network detection results

    表 1  常规YOLOv5s先验框尺寸

    Table 1.  Prior box size of conventional YOLOv5s

    特征图尺寸先验框尺寸
    特征图180×80 (10, 13), (16, 30), (33, 23)
    特征图240×40 (30, 61), (62, 45), (59, 119)
    特征图320×20 (116, 90), (156, 198), (373, 326)
    下载: 导出CSV

    表 2  消融对比实验

    Table 2.  Ablation comparative experiment

    算法AP /%mAP /%FPS
    abcd
    常规YOLOv5s90.4289.0883.7791.5787.7156
    方法191.9292.5494.0196.1393.6551
    方法294.0991.8190.3295.6292.9664
    方法393.2092.2391.2695.8393.1368
    方法495.1191.2993.4297.2294.2668
    下载: 导出CSV

    表 3  不同网络在拉索表面缺陷数据集的检测结果

    Table 3.  Detection results of different networks on the surface defect dataset of the cable

    网络mAP /%FPS
    Faster R-CNN90.573
    文献[12]87.8916
    YOLOv489.3720
    常规YOLOv5s87.7159
    常规YOLOv8s92.3851
    改进YOLOv5s94.2668
    下载: 导出CSV

    表 4  不同网络在VOC 2007数据集检测结果

    Table 4.  Detection results of different networks on VOC 2007 dataset

    网络mAP /%FPS
    Faster R-CNN76.384
    文献[12]71.9121
    YOLOv473.1226
    常规YOLOv5s72.5763
    常规YOLOv8s76.8257
    改进YOLOv5s78.2171
    下载: 导出CSV
  • [1]

    颜东煌, 郭鑫. 斜拉索损伤对在役斜拉桥体系可靠度的影响[J]. 中南大学学报(自然科学版), 2020, 51(1): 213−220. doi: 10.11817/j.issn.1672-7207.2020.01.024

    Yan D H, Guo X. Influence of damage of stay cables on system reliability of in-service cable-stayed bridges[J]. J Central South Univ (Sci Technol), 2020, 51(1): 213−220. doi: 10.11817/j.issn.1672-7207.2020.01.024

    [2]

    Xu F Y, Dai S Y, Jiang Q S, et al. Developing a climbing robot for repairing cables of cable-stayed bridges[J]. Autom Constr, 2021, 129: 103807. doi: 10.1016/J.AUTCON.2021.103807

    [3]

    李少波, 杨静, 王铮, 等. 缺陷检测技术的发展与应用研究综述[J]. 自动化学报, 2020, 46(11): 2319−2336. doi: 10.16383/j.aas.c180538

    Li S B, Yang J, Wang Z, et al. Review of development and application of defect detection technology[J]. Acta Autom Sin, 2020, 46(11): 2319−2336. doi: 10.16383/j.aas.c180538

    [4]

    Zheng Z L, Yuan X Q, Huang H H, et al. Mechanical design of a cable climbing robot for inspection on a cable-stayed bridge[C]//Proceedings of the 13th World Congress on Intelligent Control and Automation, 2018: 1680–1684. https://doi.org/10.1109/WCICA.2018.8630709.

    [5]

    Ho H N, Kim K D, Park Y S, et al. An efficient image-based damage detection for cable surface in cable-stayed bridges[J]. NDT E Int, 2013, 58: 18−23. doi: 10.1016/j.ndteint.2013.04.006

    [6]

    Li X K, Gao C, Guo Y C, et al. Cable surface damage detection in cable-stayed bridges using optical techniques and image mosaicking[J]. Opt Laser Technol, 2019, 110: 36−43. doi: 10.1016/j.optlastec.2018.07.012

    [7]

    赵鹤, 杨晓洪, 杨奇, 等. 融合注意力机制的金属缺陷图像分割方法[J]. 光电子·激光, 2021, 32(4): 403−408. doi: 10.16136/j.joel.2021.04.0411

    Zhao H, Yang X H, Yang Q, et al. Metal defect image segmentation algorithm combined with attention mechanism[J]. J Optoelectron Laser, 2021, 32(4): 403−408. doi: 10.16136/j.joel.2021.04.0411

    [8]

    Pan G, Zheng Y X, Guo S, et al. Automatic sewer pipe defect semantic segmentation based on improved U-Net[J]. Autom Constr, 2020, 119: 103383. doi: 10.1016/j.autcon.2020.103383

    [9]

    Xiao Y Z, Tian Z Q, Yu J C, et al. A review of object detection based on deep learning[J]. Multimed Tools Appl, 2020, 79(33-34): 23729−23791. doi: 10.1007/s11042-020-08976-6

    [10]

    赵宏伟, 郑嘉俊, 赵鑫欣, 等. 基于双模态深度学习的钢轨表面缺陷检测方法[J]. 计算机工程与应用, 2023, 59(7): 285−293. doi: 10.3778/j.issn.1002-8331.2209-0364

    Zhao H W, Zheng J J, Zhao X X, et al. Rail surface defect method based on bimodal-modal deep learning[J]. Comput Eng Appl, 2023, 59(7): 285−293. doi: 10.3778/j.issn.1002-8331.2209-0364

    [11]

    Hou S T, Dong B, Wang H C, et al. Inspection of surface defects on stay cables using a robot and transfer learning[J]. Autom Constr, 2020, 119: 103382. doi: 10.1016/j.autcon.2020.103382

    [12]

    李运堂, 谢梦鸣, 王鹏峰, 等. 基于改进YOLOv3算法的斜拉桥拉索表面缺陷检测方法[J]. 传感技术学报, 2021, 34(11): 1509−1517. doi: 10.3969/j.issn.1004-1699.2021.11.014

    Li Y T, Xie M M, Wang P F, et al. Defects inspection method for cable surface of cable-stayed bridge based on improved YOLOv3 algorithm[J]. Chin J Sens Actuators, 2021, 34(11): 1509−1517. doi: 10.3969/j.issn.1004-1699.2021.11.014

    [13]

    孙泽强, 陈炳才, 崔晓博, 等. 融合频域注意力机制和解耦头的YOLOv5带钢表面缺陷检测[J]. 计算机应用, 2023, 43(1): 242−249. doi: 10.11772/j.issn.1001-9081.2021111926

    Sun Z Q, Chen B C, Cui X B, et al. Strip steel surface defect detection by YOLOv5 algorithm fusing frequency domain attention mechanism and decoupled head[J]. J Comput Appl, 2023, 43(1): 242−249. doi: 10.11772/j.issn.1001-9081.2021111926

    [14]

    Huang X Y, Liu Z L, Zhang X Y, et al. Surface damage detection for steel wire ropes using deep learning and computer vision techniques[J]. Measurement, 2020, 161: 107843. doi: 10.1016/j.measurement.2020.107843

    [15]

    张银胜, 杨宇龙, 吉茹, 等. 改进YOLOv5s的风力涡轮机表面缺陷检测[J]. 电子测量与仪器学报, 2023, 37(1): 40−49. doi: 10.13382/j.jemi.B2205857

    Zhang Y S, Yang Y L, Ji R, et al. Surface defect detection of wind turbine based on YOLOv5s[J]. J Electron Meas Instrum, 2023, 37(1): 40−49. doi: 10.13382/j.jemi.B2205857

    [16]

    Qiao W T, Liu Q W, Wu X G, et al. Automatic pixel-level pavement crack recognition using a deep feature aggregation segmentation network with a scSE attention mechanism module[J]. Sensors, 2021, 21(9): 2902. doi: 10.3390/s21092902

    [17]

    Li K Y, Wang X F, Ji L J. Application of multi-scale feature fusion and deep learning in detection of steel strip surface defect[C]//Proceedings of 2019 International Conference on Artificial Intelligence and Advanced Manufacturing, 2019: 656–661. https://doi.org/10.1109/AIAM48774.2019.00136.

    [18]

    Fan H D, Zhu D Q, Li Y H. An improved yolov5 marine biological object detection algorithm[C]//Proceedings of the 2nd International Conference on Artificial Intelligence and Computer Engineering, 2021: 29–34. https://doi.org/10.1109/ICAICE54393.2021.00014.

    [19]

    Strudel R, Garcia R, Laptev I, et al. Segmenter: transformer for semantic segmentation[C]//Proceedings of 2021 IEEE/CVF International Conference on Computer Vision, 2021: 7262–7272. https://doi.org/10.1109/ICCV48922.2021.00717.

    [20]

    Zhao Z Y, Yang X X, Zhou Y C, et al. Real-time detection of particleboard surface defects based on improved YOLOv5 target detection[J]. Sci Rep, 2021, 11(1): 21777. doi: 10.1038/s41598-021-01084-x

    [21]

    Shelhamer E, Long J, Darrell T. Fully convolutional networks for semantic segmentation[J]. IEEE Trans Pattern Anal Mach Intell, 2017, 39(4): 640−651. doi: 10.1109/TPAMI.2016.2572683

  • 加载中

(16)

(4)

计量
  • 文章访问数: 
  • PDF下载数: 
  • 施引文献:  0
出版历程
收稿日期:  2024-01-26
修回日期:  2024-04-19
录用日期:  2024-04-24
刊出日期:  2024-05-25

目录

/

返回文章
返回