Please wait a minute...
浙江大学学报(工学版)  2025, Vol. 59 Issue (10): 2144-2153    DOI: 10.3785/j.issn.1008-973X.2025.10.015
计算机技术     
基于YOLOv8-HSV的隧道螺栓锈蚀检测及等级判定
武晓春1(),张恒骏1,谭磊2
1. 兰州交通大学 自动化与电气工程学院,甘肃 兰州 730070
2. 北京市市政工程研究院,北京 100037
Corrosion detection and grade determination of tunnel bolts based on YOLOv8-HSV
Xiaochun WU1(),Hengjun ZHANG1,Lei TAN2
1. School of Automation and Electrical Engineering, Lanzhou Jiaotong University, Lanzhou 730070, China
2. Beijing Municipal Engineering Research Institute, Beijing 100037, China
 全文: PDF(3160 KB)   HTML
摘要:

针对盾构隧道扫描图像中锈蚀螺栓目标小、存在遮挡、扫描图像尺寸大的问题,提出改进YOLOv8锈蚀螺栓检测模型. 将焦点调制模块引入YOLOv8主干网络,颈部升级为4级别特征融合的加权双向特征金字塔网络(BiFPN),提升小目标的特征提取能力;检测头添加分离增强注意力模块(SEAM),有效解决螺栓的遮挡问题;检测阶段借助切片辅助推理(SAHI),实现对大尺寸扫描图像的高效处理. 提出基于HSV(色相、饱和度、明度)色域分割的锈蚀等级判定方法,利用锈蚀区域与背景颜色上的差异,对检测到的螺栓进行锈蚀区域分割,划分锈蚀等级并将等级信息还原到扫描图像中. 实验结果表明,改进YOLOv8锈蚀螺栓检测模型的平均精度均值为95.0%,模型大小为3.9 MB,帧率为83.3 帧/s,实现了对锈蚀螺栓的高性能检测.

关键词: 盾构隧道螺栓锈蚀YOLOv8等级判定HSV色域分割    
Abstract:

An improved YOLOv8 corrosion bolt detection model was proposed to address the challenges in detecting corroded bolts in shield tunnel scanning images, particularly the issues of small target sizes, occlusion, and large image dimensions. A focal modulation module was introduced in the backbone, and the neck was upgraded to a weighted bidirectional feature pyramid network (BiFPN) with four levels of feature fusion, to enhance feature extraction ability for small targets. A separated and enhancement attention module (SEAM) was incorporated into the detection head, effectively addressing the problem of bolt occlusion. Slicing aided hyper inference (SAHI) was applied during the detection phase, allowing the model to process large-sized scanned images efficiently. A rust grade determination method based on HSV (hue, saturation, value) color space segmentation was proposed. The color contrast between the rusted areas and the surrounding background was utilized to accurately segment the rust regions, classify the corrosion severity, and overlay the results directly onto the scanned image. Experimental results showed that the improved YOLOv8 corrosion bolt detection model achieved a mean average precision of 95.0%, with a compact model size of 3.9 MB and a frame rate of 83.3 frames per second, enabling high-performance detection of corroded bolts.

Key words: shield tunnel    bolt corrosion    YOLOv8    grade determination    HSV color space segmentation
收稿日期: 2024-10-15 出版日期: 2025-10-27
CLC:  TP 393  
基金资助: 中国国家铁路集团有限公司基金资助项目(N2022G012);国家自然科学基金资助项目(61661027).
作者简介: 武晓春(1973—),女,教授,硕士,从事交通信息工程及控制研究. orcid.org/0009-0005-9874-452X. E-mail:369038806@qq.com
服务  
把本文推荐给朋友
加入引用管理器
E-mail Alert
作者相关文章  
武晓春
张恒骏
谭磊

引用本文:

武晓春,张恒骏,谭磊. 基于YOLOv8-HSV的隧道螺栓锈蚀检测及等级判定[J]. 浙江大学学报(工学版), 2025, 59(10): 2144-2153.

Xiaochun WU,Hengjun ZHANG,Lei TAN. Corrosion detection and grade determination of tunnel bolts based on YOLOv8-HSV. Journal of ZheJiang University (Engineering Science), 2025, 59(10): 2144-2153.

链接本文:

https://www.zjujournals.com/eng/CN/10.3785/j.issn.1008-973X.2025.10.015        https://www.zjujournals.com/eng/CN/Y2025/V59/I10/2144

图 1  改进YOLOv8锈蚀螺栓检测模型的结构图
图 2  焦点调制模块的结构图
图 3  加权双向特征金字塔网络的结构图
图 4  螺栓被遮挡示例
图 5  分离增强注意力模块的结构图
图 6  改进YOLOv8锈蚀螺栓检测模型的技术路线图
图 7  尺寸为500×500的图片样本示例
图 8  切片辅助推理滑窗示意图
图 9  损失函数收敛对比图
图 10  平均准确率曲线(IoU = 0.5)
YOLOv8nFMBiFPNSEAMWIoU v3mAP@50/%S/MB
93.96.0
94.06.2
94.34.2
94.93.9
95.03.9
表 1  改进YOLOv8锈蚀螺栓检测模型的消融实验结果
图 11  引入分离增强注意力模块前后的特征提取热力图对比
图 12  不同检测模型的准确率-召回率曲线
模型P/%R/%mAP@50/%F1/%S/MBFPS(帧/s)
Faster R-CNN27.896.070.443.11108.013.7
YOLOv5n84.694.294.289.145.082.6
YOLOv8n86.094.393.989.966.090.9
YOLOv9t87.193.094.489.954.469.4
YOLOv10n86.693.494.589.875.578.1
本研究85.495.195.089.993.983.3
表 2  不同检测模型的性能指标对比结果
图 13  不同模型的检测结果对比
图 14  改变光照前后验证集图片示例
状态PRmAP@50F1
改变光照前85.495.195.089.99
改变光照后86.093.294.189.46
表 3  改变光照前后改进YOLOv8锈蚀螺栓检测模型的验证结果对比
图 15  锈蚀螺栓图片的HSV拟合曲线
图 16  正常螺栓与锈蚀螺栓HSV颜色分布图对比
图 17  锈蚀区域分割后的二值化图像
Pc/%锈蚀级别锈蚀程度
[0, 3)0无锈蚀
[3, 10)1轻微锈蚀
[10, 40)2中度锈蚀
[40, 100]3重度锈蚀
表 4  螺栓锈蚀等级
图 18  不同锈蚀等级的螺栓示例
图 19  带有锈蚀等级的检测截图
1 何川, 封坤, 方勇 盾构法修建地铁隧道的技术现状与展望[J]. 西南交通大学学报, 2015, 50 (1): 97- 109
HE Chuan, FENG Kun, FANG Yong Review and prospects on constructing technologies of metro tunnels using shield tunnelling method[J]. Journal of Southwest Jiaotong University, 2015, 50 (1): 97- 109
2 訾谦. 我国盾构技术驶入数智发展快车道[N]. 光明日报, 2024–11–20(3).
3 沈恺, 张森, 李胜腾, 等 基于摄影测量的盾构隧道轮廓快速检测方法[J]. 铁道学报, 2021, 43 (10): 136- 146
SHEN Kai, ZHANG Sen, LI Shengteng, et al A rapid shield tunnel profile measuring method based on close-range photogrammetry[J]. Journal of the China Railway Society, 2021, 43 (10): 136- 146
4 WANG Y, LIAO W, DONG A, et al High-speed acquisition and intelligent tunnel surface defects recognition[J]. Tunnelling and Underground Space Technology, 2024, 144: 105572
doi: 10.1016/j.tust.2023.105572
5 TAN L, CHEN X, HU X, et al. DMDSNet: a computer vision-based dual multi-task model for tunnel bolt detection and corrosion segmentation [C]// Proceedings of the IEEE 26th International Conference on Intelligent Transportation Systems. Bilbao: IEEE, 2023: 4827–4833.
6 宋娟, 贺龙喜, 龙会平 基于深度学习的隧道衬砌多病害检测算法[J]. 浙江大学学报: 工学版, 2024, 58 (6): 1161- 1173
SONG Juan, HE Longxi, LONG Huiping Deep learning-based algorithm for multi defect detection in tunnel lining[J]. Journal of Zhejiang University: Engineering Science, 2024, 58 (6): 1161- 1173
7 葛双双, 高玮, 汪义伟, 等 我国交通盾构隧道病害、评价及治理研究综述[J]. 土木工程学报, 2023, 56 (1): 119- 128
GE Shuangshuang, GAO Wei, WANG Yiwei, et al Review on evaluation and treatment of traffic shield tunnel defects in China[J]. China Civil Engineering Journal, 2023, 56 (1): 119- 128
8 NIKRAVESH S M Y, GOUDARZI M A review paper on looseness detection methods in bolted structures[J]. Latin American Journal of Solids and Structures, 2017, 14 (12): 2153- 2176
doi: 10.1590/1679-78254231
9 REDDY M S B, PONNAMMA D, SADASIVUNI K K, et al Sensors in advancing the capabilities of corrosion detection: a review[J]. Sensors and Actuators A: Physical, 2021, 332: 113086
doi: 10.1016/j.sna.2021.113086
10 XU Y, LI D, XIE Q, et al Automatic defect detection and segmentation of tunnel surface using modified Mask R-CNN[J]. Measurement, 2021, 178: 109316
doi: 10.1016/j.measurement.2021.109316
11 许敏娟, 陈莹莹, 刘浩 基于全景图像的隧道渗漏水病害识别方法[J]. 铁道学报, 2023, 45 (8): 184- 192
XU Minjuan, CHEN Yingying, LIU Hao Identification method of tunnel water leakage based on panoramic image[J]. Journal of the China Railway Society, 2023, 45 (8): 184- 192
12 TAN L, TANG T, YUAN D An ensemble learning aided computer vision method with advanced color enhancement for corroded bolt detection in tunnels[J]. Sensors, 2022, 22 (24): 9715
doi: 10.3390/s22249715
13 周中, 闫龙宾, 张俊杰, 等 基于YOLOX-G算法的隧道裂缝实时检测[J]. 铁道科学与工程学报, 2023, 20 (7): 2751- 2762
ZHOU Zhong, YAN Longbin, ZHANG Junjie, et al Real-time detection of tunnel cracks based on YOLOX-G algorithm[J]. Journal of Railway Science and Engineering, 2023, 20 (7): 2751- 2762
14 GU Y, AI Q, XU Z, et al Cost-effective image recognition of water leakage in metro tunnels using self-supervised learning[J]. Automation in Construction, 2024, 167: 105678
doi: 10.1016/j.autcon.2024.105678
15 GUO Z, CHENG X, XIE Q, et al Spatial adaptive improvement detection network for corroded bolt detection in tunnels[J]. Buildings, 2024, 14 (8): 2560
doi: 10.3390/buildings14082560
16 LI X, WANG Q, YANG X, et al Track fastener defect detection model based on improved YOLOv5s[J]. Sensors, 2023, 23 (14): 6457
doi: 10.3390/s23146457
17 REDMON J, DIVVALA S, GIRSHICK R, et al. You only look once: unified, real-time object detection [C]// Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Las Vegas: IEEE, 2016: 779–788.
18 JOCHER, G, CHAURASIA, A, QIU, J, et al. YOLO by Ultralytics (Version 8.0. 0) [EB/OL]. [2024–12–03]. https://github.com/ultralytics/ultralytics.
19 WANG X, LIU J Vegetable disease detection using an improved YOLOv8 algorithm in the greenhouse plant environment[J]. Scientific Reports, 2024, 14: 4261
doi: 10.1038/s41598-024-54540-9
20 LIU L, LI P, WANG D, et al A wind turbine damage detection algorithm designed based on YOLOv8[J]. Applied Soft Computing, 2024, 154: 111364
doi: 10.1016/j.asoc.2024.111364
21 冉庆东, 郑力新 基于改进YOLOv5的锂电池极片缺陷检测方法[J]. 浙江大学学报: 工学版, 2024, 58 (9): 1811- 1821
RAN Qingdong, ZHENG Lixin Defect detection method of lithium battery electrode based on improved YOLOv5[J]. Journal of Zhejiang University: Engineering Science, 2024, 58 (9): 1811- 1821
22 黄宏伟, 李庆桐 基于深度学习的盾构隧道渗漏水病害图像识别[J]. 岩石力学与工程学报, 2017, 36 (12): 2861- 2871
HUANG Hongwei, LI Qingtong Image recognition for water leakage in shield tunnel based on deep learning[J]. Chinese Journal of Rock Mechanics and Engineering, 2017, 36 (12): 2861- 2871
23 QIU S, CAI B, WANG W, et al Automated detection of railway defective fasteners based on YOLOv8-FAM and synthetic data using style transfer[J]. Automation in Construction, 2024, 162: 105363
doi: 10.1016/j.autcon.2024.105363
24 YANG J, LI C, DAI X, et al Focal modulation networks[J]. Advances in Neural Information Processing Systems, 2022, 35: 4203- 4217
25 TAN M, PANG R, LE Q V. EfficientDet: scalable and efficient object detection [C]// Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. Seattle: IEEE, 2020: 10778–10787.
26 YU Z, HUANG H, CHEN W, et al YOLO-FaceV2: a scale and occlusion aware face detector[J]. Pattern Recognition, 2024, 155: 110714
doi: 10.1016/j.patcog.2024.110714
27 TONG Z, CHEN Y, XU Z, et al. Wise-IoU: bounding box regression loss with dynamic focusing mechanism [EB/OL]. (2023–04–08)[2024–12–03]. https://arxiv.org/pdf/2301.10051.
28 DE MELO LIMA B P, DE ARAÚJO BARBOSA BORGES L, HIROSE E, et al A lightweight and enhanced model for detecting the Neotropical brown stink bug, Euschistus heros (Hemiptera: Pentatomidae) based on YOLOv8 for soybean fields[J]. Ecological Informatics, 2024, 80: 102543
doi: 10.1016/j.ecoinf.2024.102543
29 AKYON F C, ONUR ALTINUC S, TEMIZEL A. Slicing aided hyper inference and fine-tuning for small object detection [C]// Proceedings of the IEEE International Conference on Image Processing. Bordeaux: IEEE, 2022: 966–970.
30 TAN L, HU X, TANG T, et al A lightweight metro tunnel water leakage identification algorithm via machine vision[J]. Engineering Failure Analysis, 2023, 150: 107327
doi: 10.1016/j.engfailanal.2023.107327
31 REN S, HE K, GIRSHICK R, et al Faster R-CNN: towards real-time object detection with region proposal networks[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017, 39 (6): 1137- 1149
doi: 10.1109/TPAMI.2016.2577031
32 WANG C Y, YEH I H, MARK LIAO H Y. YOLOv9: learning what you want toLearn using programmable gradient information [C]// Computer Vision – ECCV 2024. [S.l.]: Springer, 2025: 1–21.
33 WANG A, CHEN H, LIU L, et al. YOLOv10: real-time end-to-end object detection [EB/OL]. (2024–10–30)[2024–12–03]. https://arxiv.org/pdf/2405.14458.
34 邓伟, 王洪亮 基于级联网络的螺栓锈蚀检测方法研究[J]. 现代电子技术, 2023, 46 (19): 111- 115
DENG Wei, WANG Hongliang Research on bolt corrosion detection method based on cascade network[J]. Modern Electronics Technique, 2023, 46 (19): 111- 115
35 WALDAMICHAEL F G, DEBELEE T G, AYANO Y M Coffee disease detection using a robust HSV color-based segmentation and transfer learning for use on smartphones[J]. International Journal of Intelligent Systems, 2022, 37 (8): 4967- 4993
doi: 10.1002/int.22747
[1] 翟亚红,陈雅玲,徐龙艳,龚玉. 改进YOLOv8s的轻量级无人机航拍小目标检测算法[J]. 浙江大学学报(工学版), 2025, 59(8): 1708-1717.
[2] 何婧瑶,李鹏飞,汪承志,吕振鸣,牟萍. 基于双目视觉和改进YOLOv8的动态三维重建方法[J]. 浙江大学学报(工学版), 2025, 59(7): 1443-1450.
[3] 齐永洁,蒋熠诚,周建,章伟康,张迪,魏纲. 黏岩复合地层中盾构掘进引起的超欠挖分析[J]. 浙江大学学报(工学版), 2025, 59(6): 1241-1252.
[4] 曹铭,段武峰,马梦骁,艾凡荣,周奎. 基于改进YOLOv8-Seg模型的生物打印机产物均一性评估[J]. 浙江大学学报(工学版), 2025, 59(6): 1277-1283.
[5] 梁礼明,龙鹏威,金家新,李仁杰,曾璐. 基于改进YOLOv8s的钢材表面缺陷检测算法[J]. 浙江大学学报(工学版), 2025, 59(3): 512-522.
[6] 周思剑,张迪,周建,李瑛,龚晓南. 基于TJS工法的盾构隧道运营变形控制[J]. 浙江大学学报(工学版), 2024, 58(7): 1427-1435.
[7] 邓天民,程鑫鑫,刘金凤,张曦月. 基于特征复用机制的航拍图像小目标检测算法[J]. 浙江大学学报(工学版), 2024, 58(3): 437-448.
[8] 王超,朱春洲,邹金锋,刘波,张晗秋,马江锋. 盾构隧道近接斜交侧穿桥梁桩基变形计算方法[J]. 浙江大学学报(工学版), 2024, 58(3): 557-569.
[9] 王安静,袁巨龙,朱勇建,陈聪,吴金津. 基于改进YOLOv8s的鼓形滚子表面缺陷检测算法[J]. 浙江大学学报(工学版), 2024, 58(2): 370-380.
[10] 李瀚源,李兴高,刘杨,杨益,马明哲. 跨活动断层盾构隧道纵向受力及变形特征[J]. 浙江大学学报(工学版), 2023, 57(2): 340-352.
[11] 周浙件,范毅雄,方燃,边学成. 地基沉降引发输水盾构隧道复合结构受弯分析[J]. 浙江大学学报(工学版), 2023, 57(12): 2476-2488.
[12] 李瀚源,李兴高,马明哲,刘浩,杨益. 隐伏断层错动对盾构隧道影响的模型试验研究[J]. 浙江大学学报(工学版), 2022, 56(4): 631-639.
[13] 崔允亮,李志远,魏纲,陈江,周联英. 上跨拟建隧道的地下综合管廊预保护效果[J]. 浙江大学学报(工学版), 2021, 55(2): 330-337.
[14] 张子新,张家奇,黄昕,庄欠伟. 盾构隧道密封垫长期防水性能预测的试验研究[J]. 浙江大学学报(工学版), 2020, 54(1): 118-125.
[15] 杨春山, 魏立新, 莫海鸿, 何则干. 考虑衬砌变形与接头特征的盾构隧道纵向刚度[J]. 浙江大学学报(工学版), 2018, 52(2): 358-366.