Please wait a minute...
Journal of ZheJiang University (Engineering Science)  2025, Vol. 59 Issue (10): 2144-2153    DOI: 10.3785/j.issn.1008-973X.2025.10.015
    
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
Download: HTML     PDF(3160KB) HTML
Export: BibTeX | EndNote (RIS)      

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 wordsshield tunnel      bolt corrosion      YOLOv8      grade determination      HSV color space segmentation     
Received: 15 October 2024      Published: 27 October 2025
CLC:  TP 393  
Fund:  中国国家铁路集团有限公司基金资助项目(N2022G012);国家自然科学基金资助项目(61661027).
Cite this article:

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.

URL:

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


基于YOLOv8-HSV的隧道螺栓锈蚀检测及等级判定

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


关键词: 盾构隧道,  螺栓锈蚀,  YOLOv8,  等级判定,  HSV色域分割 
Fig.1 Structure diagram of improved YOLOv8 corrosion bolt detection model
Fig.2 Structure diagram of focal modulation module
Fig.3 Structure diagram of weighted bidirectional feature pyramid network
Fig.4 Example of bolt being obstructed
Fig.5 Structure diagram of separated and enhancement attention module
Fig.6 Technology roadmap of improved YOLOv8 corrosion bolt detection model
Fig.7 Example of image sample with size of 500×500
Fig.8 Schematic diagram of slicing aided hyper inference window
Fig.9 Comparison plot of loss function convergence
Fig.10 Average precision curve (IoU = 0.5)
YOLOv8nFMBiFPNSEAMWIoU v3mAP@50/%S/MB
93.96.0
94.06.2
94.34.2
94.93.9
95.03.9
Tab.1 Ablation experiment results of improved YOLOv8 corrosion bolt detection model
Fig.11 Comparison of feature extraction heat maps before and after introduction of separated and enhancement attention module
Fig.12 Precision-recall curves of different detection models
模型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
Tab.2 Comparison results of performance indicators of different detection models
Fig.13 Detection results comparison of different models
Fig.14 Examples of validation set images before and after changing lighting
状态PRmAP@50F1
改变光照前85.495.195.089.99
改变光照后86.093.294.189.46
Tab.3 Comparison of verification results of improved YOLOv8 corrosion bolt detection model before and after changing lighting %
Fig.15 HSV fitting curve of corroded bolt images
Fig.16 Comparison of HSV color distribution maps between normal bolts and corroded bolts
Fig.17 Binary image after segmentation of corroded areas
Pc/%锈蚀级别锈蚀程度
[0, 3)0无锈蚀
[3, 10)1轻微锈蚀
[10, 40)2中度锈蚀
[40, 100]3重度锈蚀
Tab.4 Bolt corrosion grade
Fig.18 Examples of bolts with different corrosion grades
Fig.19 Detection capture of corrosion grade
[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] Yahong ZHAI,Yaling CHEN,Longyan XU,Yu GONG. Improved YOLOv8s lightweight small target detection algorithm of UAV aerial image[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(8): 1708-1717.
[2] Jingyao HE,Pengfei LI,Chengzhi WANG,Zhenming LV,Ping MU. Dynamic 3D reconstruction method using binocular vision and improved YOLOv8[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(7): 1443-1450.
[3] Yongjie QI,Yicheng JIANG,Jian ZHOU,Weikang ZHANG,Di ZHANG,Gang WEI. Analysis of overexcavation and underexcavation caused by shield tunneling in clay and rock composite stratum[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(6): 1241-1252.
[4] Ming CAO,Wufeng DUAN,Mengxiao MA,Fanrong AI,Kui ZHOU. Uniformity evaluation of bio-printer based on improved YOLOv8-Seg model[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(6): 1277-1283.
[5] Liming LIANG,Pengwei LONG,Jiaxin JIN,Renjie LI,Lu ZENG. Steel surface defect detection algorithm based on improved YOLOv8s[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(3): 512-522.
[6] Sijian ZHOU,Di ZHANG,Jian ZHOU,Ying LI,Xiaonan GONG. Deformation control of shield tunnel operation based on tunnel jet system method[J]. Journal of ZheJiang University (Engineering Science), 2024, 58(7): 1427-1435.
[7] Tianmin DENG,Xinxin CHENG,Jinfeng LIU,Xiyue ZHANG. Small target detection algorithm for aerial images based on feature reuse mechanism[J]. Journal of ZheJiang University (Engineering Science), 2024, 58(3): 437-448.
[8] Chao WANG,Chunzhou ZHU,Jinfeng ZOU,Bo LIU,Hanqiu ZHANG,Jiangfeng MA. Calculation approach for deformation of adjacent pile foundation caused by diagonal intersection with side penetration construction of shield tunnel[J]. Journal of ZheJiang University (Engineering Science), 2024, 58(3): 557-569.
[9] Anjing WANG,Julong YUAN,Yongjian ZHU,Cong CHEN,Jinjin WU. Drum roller surface defect detection algorithm based on improved YOLOv8s[J]. Journal of ZheJiang University (Engineering Science), 2024, 58(2): 370-380.
[10] Han-yuan LI,Xing-gao LI,Yang LIU,Yi YANG,Ming-zhe MA. Longitudinal stress and deformation characteristics of shield tunnel crossing active fault[J]. Journal of ZheJiang University (Engineering Science), 2023, 57(2): 340-352.
[11] Zhe-jian ZHOU,Yi-xiong FAN,Ran FANG,Xue-cheng BIAN. Foundation settlement-induced bending analysis of composite structures in water-conveying shield tunnels[J]. Journal of ZheJiang University (Engineering Science), 2023, 57(12): 2476-2488.
[12] Han-yuan LI,Xing-gao LI,Ming-zhe MA,Hao LIU,Yi YANG. Model experimental study on influence of buried fault dislocation on shield tunnel[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(4): 631-639.
[13] Yun-liang CUI,Zhi-yuan LI,Gang WEI,Jiang CHEN,Lian-ying ZHOU. Pre-protection effect of underground comprehensive pipe gallery over proposed tunnel[J]. Journal of ZheJiang University (Engineering Science), 2021, 55(2): 330-337.
[14] Zi-xin ZHANG,Jia-qi ZHANG,Xin HUANG,Qian-wei ZHUANG. Experimental study on prediction of long-term durability of sealing gasket of shield tunnel[J]. Journal of ZheJiang University (Engineering Science), 2020, 54(1): 118-125.
[15] YANG Chun-shan, WEI Li-xin, MO Hai-hong, HE Ze-gan. Longitudinal rigidity of shield tunnel considering deformation characteristic and joints characteristic of lining[J]. Journal of ZheJiang University (Engineering Science), 2018, 52(2): 358-366.