作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2025, Vol. 51 ›› Issue (2): 289-299. doi: 10.19678/j.issn.1000-3428.0068491

• 图形图像处理 • 上一篇    下一篇

基于双注意力和GSSN轻量化的钢轨扣件缺陷检测

张元1, 吕德芳2, 孟建军1,3,4,*(), 祁文哲2   

  1. 1. 兰州交通大学机电技术研究所, 甘肃 兰州 730070
    2. 兰州交通大学机电工程学院, 甘肃 兰州 730070
    3. 甘肃省物流与运输装备行业技术中心, 甘肃 兰州 730070
    4. 甘肃省物流及运输装备信息化工程技术研究中心, 甘肃 兰州 730070
  • 收稿日期:2023-10-07 出版日期:2025-02-15 发布日期:2024-04-26
  • 通讯作者: 孟建军
  • 基金资助:
    甘肃省重点研发计划(21YF5GA049); 兰州市科技计划项目(2023-1-16)

Defect Detection of Rail Fasteners Based on Double Attention and GSSN Lightweight

ZHANG Yuan1, LÜ Defang2, MENG Jianjun1,3,4,*(), QI Wenzhe2   

  1. 1. Mechatronics T&R Institute, Lanzhou Jiaotong University, Lanzhou 730070, Gansu, China
    2. School of Mechanical Engineering, Lanzhou Jiaotong University, Lanzhou 730070, Gansu, China
    3. Gansu Provincial Industry Technology Center of Logistics & Transport Equipment, Lanzhou 730070, Gansu, China
    4. Gansu Provincial Engineering Technology Center for Informatization of Logistics & Transport Equipment, Lanzhou 730070, Gansu, China
  • Received:2023-10-07 Online:2025-02-15 Published:2024-04-26
  • Contact: MENG Jianjun

摘要:

铁路钢轨扣件的缺陷检测是铁道安全巡检中极为重要的工作之一。为提高钢轨扣件维护工作的效率, 基于深度学习的方式进行巡检。而使用当前主流的目标检测模型进行钢轨扣件缺陷的检测时, 模型体积大、参数量多等因素导致无法同时平衡检测准确度和速度。采用压缩与激活(SE)注意力机制与坐标注意力(CA)机制组成的双注意力机制对YOLOv5模型进行改进; 重新设计网络, 选用MobileNetv3作为主干网络, 同时引入含有GSConv模块的Slim-Neck结构和轻量级上采样算子, 以降低计算成本; 将YOLOv5的坐标损失函数修改为SIoU, 以提升训练时的收敛速度, 使得模型更加轻量化。使用改进后的模型在钢轨扣件数据集上进行测试, 结果显示, 单张扣件图片的检测时间为53.8 ms, 检测速度为17.9帧/s, 并且模型大小仅有8.3 MB, 符合模型体积小、检测效果佳的要求。

关键词: 钢轨扣件, 目标检测, YOLOv5, 注意力机制, 卷积网络, 轻量化

Abstract:

The defect detection of railway rail fasteners is a critical task in railway safety inspections. To improve the efficiency of rail fastener maintenance, a deep learning-based approach is implemented for inspections. When using current major object detection models to detect defects in rail fasteners, the large size and numerous parameters of the models make it challenging to balance detection accuracy and speed. The YOLOv5 model is improved by adopting the Squeeze-and-Excitation (SE) attention mechanism and the Coordinate Attention (CA) mechanism. The network is redesigned, with MobileNetv3 selected as the backbone network. Additionally, a Slim-Neck structure incorporating the GSConv module and a lightweight upsampling operator are introduced to reduce computational cost. Finally, the coordinate loss function of YOLOv5 is modified to SIoU to enhance convergence speed during training and make the model more lightweight. The improved model is tested on the rail fastener dataset. Results show that the detection time for a single fastener image is 53.8 ms, with a detection speed of 17.9 frames per second and a model size of only 8.3 MB. These results satisfy the requirements for small model size and effective detection.

Key words: rail fastener, target detection, YOLOv5, attention mechanism, convolutional network, lightweight