Journal of Computer Applications ›› 2025, Vol. 45 ›› Issue (2): 655-661.DOI: 10.11772/j.issn.1001-9081.2024020225

• Multimedia computing and computer simulation • Previous Articles    

Tunnel foreign object detection algorithm based on improved YOLOv8n

Jiayang GUI1, Shunji WANG1, Zhengkang ZHOU2, Jiashan TANG1()   

  1. 1.College of Science,Nanjing University of Posts and Telecommunications,Nanjing Jiangsu 210023,China
    2.Nanjing Urban Construction Tunnel and Bridge Intelligent Management Company Limited,Nanjing Jiangsu 211800,China
  • Received:2024-03-04 Revised:2024-04-09 Accepted:2024-04-15 Online:2024-06-04 Published:2025-02-10
  • Contact: Jiashan TANG
  • About author:GUI Jiayang, born in 1998, M. S. candidate. Her research interests include computer vision, object detection.
    WANG Shunji, born in 1996, Ph. D. candidate. His research interests include pattern recognition, structural equation model.
    ZHOU Zhengkang, born in 1968, M. S., professor. His research interests include smart city management, data science.
  • Supported by:
    Horizontal Research Project of Nanjing University of Posts and Telecommunications(2023W221)

基于改进YOLOv8n的隧道内异物检测算法

桂佳扬1, 王顺吉1, 周正康2, 唐加山1()   

  1. 1.南京邮电大学 理学院,南京 210023
    2.南京城建隧桥智慧管理有限公司,南京 211800
  • 通讯作者: 唐加山
  • 作者简介:桂佳扬(1998—),女,河南平顶山人,硕士研究生,主要研究方向:计算机视觉、目标检测
    王顺吉(1996—),男,江苏宿迁人,博士研究生,主要研究方向:模式识别、结构方程模型
    周正康(1968—),男,安徽池州人,教授,硕士,主要研究方向:智慧城市管理、数据科学;
  • 基金资助:
    南京邮电大学横向科研项目(2023外221)

Abstract:

In order to address the problems of high labor costs and low efficiency in manual inspection for tunnel foreign object detection, a tunnel foreign object detection algorithm based on improved YOLOv8n was proposed. Firstly, C2f_CA module was proposed with the incorporation of Coordinate Attention (CA) mechanism. In the module, by embedding positional information into channel attention, the network’s focus on the spatial distribution of features in the image was enhanced, thereby improving feature extraction capability of the network. Secondly, inspired by the concept of high-resolution network, a new feature fusion module HRNet_Fusion (High Resolution Net) was proposed to take extracted feature maps with different resolutions as four parallel branches and input them into the network, and multiple up-sampling, down-sampling, and fusion operations were performed to obtain comprehensive and accurate feature information. The above enhanced performance in small target detection and feature fusion significantly. Finally, the WIoU (Wise-IoU) loss function was introduced to reduce the harmful gradient effects of low-quality samples on the network, further improving model detection accuracy. Experimental results on a tunnel foreign object detection dataset indicate that the improved algorithm achieves mean Average Precision (mAP@0.5) of 79.9%, with a model size of 6.0 MB. Compared to YOLOv8n, the proposed algorithm has the mAP@0.5 enhanced by 6 percentage points, while the model size decreased by 0.2 MB, and the model parameters reduced by 0.379×106.

Key words: object detection, foreign object detection, YOLOv8n, Coordinate Attention (CA) mechanism, high resolution net, WIoU (Wise-IoU) loss function

摘要:

针对当前隧道内异物检测存在人工巡检成本高、效率低等问题,提出一种基于改进YOLOv8n的隧道内异物检测算法。首先,提出融入坐标注意力(CA)机制的C2f_CA模块,通过将位置信息嵌入通道注意力,增强网络对图像在空间上的特征分布的关注,从而增强网络的特征提取能力;其次,借鉴高分辨率网络的思想,提出新的特征融合模块HRNet_Fusion(High Resolution Net)将提取的不同分辨率特征图作为4个并行分支输入网络,并经过多次上、下采样和融合操作得到全面且准确的特征信息,从而显著提升在小目标检测和特征信息融合方面的性能;最后,引入WIoU(Wise-IoU)损失函数降低低质量样本对网络的不良梯度影响,进一步提高模型的检测精度。实验结果表明,在隧道异物数据集上,改进算法的平均精度均值(mAP@0.5)为79.9%,模型大小为6.0 MB,与YOLOv8n算法相比,mAP@0.5提升了6个百分点,模型大小减少了0.2 MB,模型参数量减少了0.379×106

关键词: 目标检测, 异物检测, YOLOv8n, 坐标注意力机制, 高分辨率网络, WIoU损失函数

CLC Number: