计算机工程与应用 ›› 2025, Vol. 61 ›› Issue (20): 358-367.DOI: 10.3778/j.issn.1002-8331.2406-0111

• 工程与应用 • 上一篇    下一篇

改进YOLOv5s的地铁齿轮箱螺丝状态检测

程光耀,张文强,王志城,华路捷,严世昌,张涛   

  1. 1.北京市地铁运营有限公司 运营三分公司,北京 100080
    2.江南大学 人工智能与计算机学院,江苏 无锡 214000
  • 出版日期:2025-10-15 发布日期:2025-10-15

Screw Status Detection of Subway Gearbox Based on Improved YOLOv5s

CHENG Guangyao, ZHANG Wenqiang, WANG Zhicheng, HUA Lujie, YAN Shichang, ZHANG Tao   

  1. 1.The Third Operation Branch Company Affiliated with Beijing Mass Transit Railway Operation Co., Ltd., Beijing 100080, China
    2.College of Artificial Intelligence and Computer Science, Jiangnan University, Wuxi, Jiangsu 214000, China
  • Online:2025-10-15 Published:2025-10-15

摘要: 随着城市轨道交通的快速发展,地铁维护的安全性和效率变得尤为重要。其中,车底齿轮箱螺丝的状态直接关系到城轨车辆的安全运行,但传统的基于YOLOv5s检测方法在实时性方面存在明显不足。针对以上问题,提出一种基于改进YOLOv5s的齿轮箱螺丝状态检测算法。为保证模型实时性,采用了分组混洗卷积模块,显著减少了模型的计算量;针对传统空间金字塔池化技术未能充分考虑特征间差异性的问题,引入特征自适应融合的空间金字塔池化技术,提升了模型的性能;为提升单个卷积的表达能力,使用了一种新的特征提取单元,在保证轻量化的同时能够获取更多特征信息;为提高模型检测微小螺丝目标的能力,采用Focal Loss损失函数,提高了检测的准确率。实验结果表明,改进后的模型在mAP精度上比原始YOLOv5s算法提高了2.2个百分点,同时模型的参数和计算量分别降低2.9[×]106和8.1 GFLOPs,检测速度低至25 ms,提升了22%,证明了该方法有效性。

关键词: 齿轮箱, 螺丝检测, YOLOv5s, 特征融合, 小目标检测

Abstract: With the rapid development of urban rail transit, the safety and efficiency of subway maintenance have become particularly important. The condition of gearbox screws under the train is directly related to the safe operation of urban rail vehicles. However, traditional detection methods based on YOLOv5s have significant deficiencies in real-time performance. To address these issues, this paper proposes an improved YOLOv5s-based algorithm for detecting the condition of gearbox screws. Firstly, to ensure the real-time performance of the model, a group shuffle convolution module is used, which significantly reduces the calculation of the model. Secondly, to address the issue that traditional spatial pyramid pooling technology fails to fully consider the differences between features, a spatial pyramid pooling technique with feature adaptive fusion is proposed, enhancing the model’s performance. Next, to improve the representative ability of a single convolution, a new feature extraction unit is employed, which can acquire more feature information while ensuring lightweight design. Finally, to enhance the model’s ability to detect small screw targets, the Focal Loss function is used, improving detection accuracy. Experimental results show that the improved model increases mAP accuracy by 2.2 percen-tage points compared to the original YOLOv5s algorithm, while the parameters and computational load are reduced by 2.9[×]106 and 8.1 GFLOPs respectively, and the detection speed decreases to 25 ms, with a 22 percent improvement, demonstrating the effectiveness of this method.

Key words: gearbox, screw detection, YOLOv5s, feature fusion, small target detection