Please wait a minute...
浙江大学学报(工学版)  2026, Vol. 60 Issue (10): 2165-2175    DOI: 10.3785/j.issn.1008-973X.2026.10.009
计算机技术与控制工程     
基于改进RT-DETR的复杂天气下铁路异物实时检测算法
牛宏侠1,2(),冯鼎超1,2(),侯涛1
1. 兰州交通大学 自动化与电气工程学院,甘肃 兰州 730070
2. 兰州交通大学 甘肃省高原交通信息工程及控制重点实验室,甘肃 兰州 730070
Real-time detection algorithm for railway foreign objects in complex weather conditions based on improved RT-DETR
Hongxia NIU1,2(),Dingchao FENG1,2(),Tao HOU1
1. School of Automation and Electrical Engineering, Lanzhou Jiaotong University, Lanzhou 730070, China
2. Key Laboratory of Plateau Traffic Information Engineering and Control of Gansu Province, Lanzhou Jiaotong University, Lanzhou 730070, China
 全文: PDF(7802 KB)   HTML
摘要:

提出基于改进RT-DETR的复杂天气下铁路异物检测算法FRP-DETR. 引入特征互补映射模块(FCM)与Pzconv单元,通过构建浅层空间细节与深层语义信息弥补单一尺度特征表达的局限性,两者协同增强小目标和边缘目标的感知能力;引入铁路感知调制融合模块(RMFM),基于自适应通道注意力与空间调制机制,增强模型对铁路场景关键语义信息的响应能力;以风车状卷积(PSConv)替代原始下采样模块,通过多方向非对称填充与分离卷积强化边缘纹理提取. 基于SaMam风格迁移方法,将晴天铁路异物图像迁移至雨天、雾天、雪天等场景,构建了包含4种天气条件的铁路异物检测数据集. 实验结果表明,相比原RT-DETR-R18模型,所提方法在mAP@0.5和mAP@0.5:0.95上分别提升了1.65个百分点和3.4个百分点,参数量降低63.5%,推理速度达到88 帧/s,实验结果验证了FRP-DETR在复杂天气下的铁路异物检测任务中兼具高精度、轻量化与实时性优势.

关键词: 铁路异物检测复杂天气特征融合实时检测风格迁移    
Abstract:

A railway foreign object detection algorithm for complex weather conditions based on an improved RT-DETR, named FRP-DETR, was proposed. A feature complementary mapping module (FCM) and Pzconv units were introduced, which built complementary paths between shallow spatial details and deep semantic information to compensate for the limitations of single-scale feature representation, with the two components working collaboratively to enhance the perception capabilities of small and edge targets. A railway perception modulation fusion module (RMFM) was introduced, which was based on adaptive channel attention and spatial modulation mechanisms to enhance the model’s response to key semantic information in railway scenes. The original downsampling module was replaced with pinwheel-shaped convolution (PSConv), which enhanced edge texture extraction through multi-directional asymmetric padding and separable convolution. A railway foreign object detection dataset containing four weather conditions was constructed based on the SaMam style transfer method, by transferring sunny railway foreign object images to rainy, foggy, and snowy scenes. Experimental results showed that compared to the original RT-DETR-R18 model, this method achieved improvements of 1.65 percentage points and 3.4 percentage points in mAP@0.5 and mAP@0.5:0.95, respectively, with a 63.5% reduction in parameter count and an inference speed of 88 frames per second. The results verified that FRP-DETR achieved high accuracy, lightweight design, and real-time performance in railway foreign object detection under complex weather conditions.

Key words: railway foreign object detection    complex weather    feature fusion    real-time detection    style transfer
收稿日期: 2025-08-28 出版日期: 2026-07-28
CLC:  TP 391.4  
基金资助: 甘肃省重点研发计划-工业类项目(23YFGA0049);兰州市人才创新创业项目(2023-RC-13);甘肃省科技专员专项(24CXGA020).
作者简介: 牛宏侠(1978—),女,副教授,从事计算机视觉与智能控制研究. orcid.org/0009-0001-3837-9752. E-mail:nhx56055@mail.lzjtu.cn
服务  
把本文推荐给朋友
加入引用管理器
E-mail Alert
作者相关文章  
牛宏侠
冯鼎超
侯涛

引用本文:

牛宏侠,冯鼎超,侯涛. 基于改进RT-DETR的复杂天气下铁路异物实时检测算法[J]. 浙江大学学报(工学版), 2026, 60(10): 2165-2175.

Hongxia NIU,Dingchao FENG,Tao HOU. Real-time detection algorithm for railway foreign objects in complex weather conditions based on improved RT-DETR. Journal of ZheJiang University (Engineering Science), 2026, 60(10): 2165-2175.

链接本文:

https://www.zjujournals.com/eng/CN/10.3785/j.issn.1008-973X.2026.10.009        https://www.zjujournals.com/eng/CN/Y2026/V60/I10/2165

图 1  RT-DETR结构图
图 2  特征互补映射模块(FCM)结构示意图
图 3  Pzconv特征提取单元结构示意图
图 4  铁路感知调制融合模块(RMFM)结构示意图
图 5  风车状卷积模块(PSConv)结构示意图
图 6  FRP-DETR改进模型整体架构图
配置版本号
操作系统Win11
CPUIntel Xeon Gold 5218r CPU
GPUNVIDIA RTX A5000
深度学习框架Pytorch2.6.0
编程语言Python3.10.14
CUDA12.4
显存24 GB
表 1  实验环境配置
参数数值
Batch size(批次数)4
Epoch(迭代次数)200
Lr(学习率)0.0001
Workers(线程数)4
Imgsz(图像尺寸)640×640
表 2  实验参数配置
图 7  SaMam风格迁移模型结构示意图
图 8  铁路异物检测数据集中7类目标的样本数量分布统计图
图 9  风格迁移后的图像示例
天气类型FID
晴天→雨天25.1
晴天→雪天22.8
晴天→沙尘天气18.4
平均值22.1
表 3  基于 SaMam 风格迁移的生成图像质量评估结果
组别FCMRMFMPSConvmAP@0.5/%mAP@0.5:0.95/%ParametersFLOPs/109F1-scoreFPS/(帧·s?1
194.02(±0.1)76.051988074857.0920875
294.88(±0.5)78.04(±0.5)654168847.9925997
395.11(±0.3)78.21(±0.1)1971690855.0926177
495.09(±0.2)77.70(±0.1)1972622458.2926972
595.2179.01(±0.2)700248853.9935792
695.43(±0.1)79.11718955056.7930191
795.18(±0.1)78.261988758457.7930871
895.670.19)79.45(±0.3)726463256.8940388
表 4  改进模型中各模块的消融实验结果对比
方法mAP@0.5/%mAP@0.5:0.95/%ParametersFLOPs/109FPS/(帧·s?1)
RT-DETR-r1894.02(±0.3)76.05(±0.3)1988074857.075
SSD81.130.12)64.230.15)26578932.655
Faster R-CNN90.170.11)69.580.14)28304605908.914
Sparse R-CNN89.800.08)67.460.06)7783467723.248
YOLOv8m92.4474.582590874679.3101
YOLOv8l92.87(±0.1)74.84(±0.1)43691578168.068
YOLOv11m92.11(±0.1)76.01(±0.1)2000157967.794
YOLOv11l92.99(±0.1)75.03(±0.1)2541459787.064
TOOD[24]88.08(±0.1)70.64(±0.1)32001587199.023
DEIM[25]93.58(±0.2)76.06(±0.2)1926488756.781
文献[26]92.8874.581984754963.1121
本研究算法95.670.19)79.45(±0.3)726463256.888
表 5  不同目标检测算法对比实验结果
αmAP@0.5/%mAP@0.5:0.95/%
0.394.6577.70
0.594.8578.14
0.7(本研究)94.8878.04
0.995.7477.41
表 6  不同通道融合权重α分析结果
模型版本mAP@0.5/%mAP@0.5:0.95/%
原版PSConv[22]94.8177.19
改进后(本研究)95.0977.70
表 7  PSConv 模块纵向偏置改进的有效性验证
模块名mAP@0.5/%mAP@0.5:0.95/%Parameters
MFM94.2175.9919436504
RMFM(本研究)95.1378.2119716908
表 8  MFM与 RMFM 模块性能对比
图 10  MFM与RMFM模块特征响应热力图对比分析
图 11  Baseline模型与改进模型在训练过程中的关键性能指标对比曲线
图 12  晴天和雪天条件下Baseline模型与本研究方法的检测结果对比
图 13  沙尘和雨天条件下Baseline模型与本研究方法的检测结果对比
图 14  夜间低照度环境下Baseline模型与改进模型的特征注意力热力图对比
图 15  密集目标遮挡场景下Baseline模型与改进模型的特征注意力热力图对比
模型mAP@0.5/%mAP@0.5:0.95/%Parameters
RT-DETR-r1836.7720.0919880748
本研究算法38.5922.457264632
表 9  VisDrone2019数据集上的泛化性实验结果
1 DONG W, FANG W, JIANG X, et al Railway safety under increasing speed: train drivers’ hazard perception of foreign object intrusion on railway tracks[J]. International Journal of Industrial Ergonomics, 2025, 105: 103684
doi: 10.1016/j.ergon.2024.103684
2 侯涛, 宝才文, 陈燕楠 基于自适应高斯混合模型的铁轨异物入侵检测研究[J]. 光电子·激光, 2022, 33 (4): 403- 413
HOU Tao, BAO Caiwen, CHEN Yannan Research on detection of foreign object intrusion in railroad tracks based on AGMM[J]. Journal of OptoElectronics Lasers, 2022, 33 (4): 403- 413
3 PAN H, LI Y, WANG H, et al Railway obstacle intrusion detection based on convolution neural network multitask learning[J]. Electronics, 2022, 11 (17): 2697
doi: 10.3390/electronics11172697
4 何文玉, 杨杰, 张天露 基于深度学习的轨道异物入侵检测算法[J]. 计算机工程与设计, 2020, 41 (12): 3376- 3383
HE Wenyu, YANG Jie, ZHANG Tianlu Orbital foreign object intrusion detection algorithm based on deep learning[J]. Computer Engineering and Design, 2020, 41 (12): 3376- 3383
doi: 10.16208/j.issn1000-7024.2020.12.012
5 鞠逸凡. 基于深度学习的铁路周界异物入侵检测方法研究[D]. 青岛: 青岛科技大学, 2024
JU Yifan. Research on railroad perimeter foreign object intrusion detection method based on deep learing [D]. Qingdao: Qingdao University of Science and Technology, 2024.
6 ZHANG Z, CHEN P, HUANG Y, et al Railway obstacle intrusion warning mechanism integrating YOLO-based detection and risk assessment[J]. Journal of Industrial Information Integration, 2024, 38: 100571
doi: 10.1016/j.jii.2024.100571
7 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
8 SUN P, ZHANG R, JIANG Y, et al Sparse R-CNN: an end-to-end framework for object detection[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2023, 45 (12): 15650- 15664
doi: 10.1109/TPAMI.2023.3292030
9 HE K, GKIOXARI G, DOLLAR P, et al Mask R-CNN[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2020, 42 (2): 386- 397
doi: 10.1109/TPAMI.2018.2844175
10 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.
11 REDMON J, FARHADI A. YOLOv3: an incremental improvement [EB/OL]. (2018−04−08) [2026−04–16]. https://arxiv.org/abs/1804.02767.
12 BOCHKOVSKIY A, WANG C Y, LIAO H Y M. YOLOv4: optimal speed and accuracy of object detection [EB/OL]. (2020−04–23) [2026−04–16]. https://arxiv.org/abs/2004.10934.
13 LIU W, ANGUELOV D, ERHAN D, et al. SSD: single shot MultiBox detector [C]// Computer Vision – ECCV 2016. Cham: Springer, 2016: 21–37.
14 ZHU X, SU W, LU L, et al. Deformable DETR: deformable transformers for end-to-end object detection [EB/OL]. (2020–10−08) [2026−04–16]. https://arxiv.org/abs/2010.04159.
15 DAI X, CHEN Y, YANG J, et al. Dynamic DETR: end-to-end object detection with dynamic attention [C]// Proceedings of the IEEE/CVF International Conference on Computer Vision. Montreal: IEEE, 2021: 2968–2977.
16 LI F, ZHANG H, LIU S, et al. DN-DETR: accelerate DETR training by introducing query denoising [EB/OL]. (2022−03−02) [2026−04–16]. https://arxiv.org/abs/2203.01305.
17 ZHANG H, LI F, LIU S, et al. DINO: DETR with improved denoising anchor boxes for end-to-end object detection [EB/OL]. (2022−03−07) [2026−04–16]. https://arxiv.org/abs/2203.03605.
18 邵磊, 李金钊, 李季, 等. 基于YOLOv8的轻量化高速铁路接触网异物入侵目标检测 [EB/OL]. (2024–12−02) [2026−04–16]. https://link.cnki.net/urlid/12.1374.N.20241130.1122.006.
19 高修强, 余星阳, 刘伯鹍, 等. 基于改进Mask R-CNN的轨道交通异物入侵模型研究 [J]. 自动化与仪表, 2025, 40(6): 111–115.
GAO Xiuqiang, YU Xingyang, LIU Bokun, et al. Research on foreign object intrusion model for rail transit based on improved mask R-CNN [J]. Automation and Instrumentation. 2025, 40(6): 111–115.
20 ZHAO Y, LV W, XU S, et al. DETRs beat YOLOs on real-time object detection [C]// Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. Seattle: IEEE, 2024: 16965–16974.
21 XIAO Y, XU T, XIN Y, et al FBRT-YOLO: faster and better for real-time aerial image detection[J]. Proceedings of the AAAI Conference on Artificial Intelligence, 2025, 39 (8): 8673- 8681
doi: 10.1609/aaai.v39i8.32937
22 YANG J, LIU S, WU J, et al Pinwheel-shaped convolution and scale-based dynamic loss for infrared small target detection[J]. Proceedings of the AAAI Conference on Artificial Intelligence, 2025, 39 (9): 9202- 9210
doi: 10.1609/aaai.v39i9.32996
23 LIU H, WANG L, ZHANG Y, et al. SaMam: style-aware state space model for arbitrary image style transfer [EB/OL]. (2025−03–20) [2026−04–16]. https://arxiv.org/abs/2503.15934.
24 FENG C, ZHONG Y, GAO Y, et al. TOOD: task-aligned one-stage object detection [C]// Proceedings of the IEEE/CVF International Conference on Computer Vision. Montreal: IEEE, 2021: 3490–3499.
25 HUANG S, LU Z, CUN X, et al. DEIM: DETR with improved matching for fast convergence [EB/OL]. (2024–12−05) [2026−04–16]. https://arxiv.org/abs/2412.04234.
26 杨文, 胡昊, 李凌志, 等 基于机器视觉的铁路限界入侵检测方法[J]. 铁道科学与工程学报, 2025, 22 (3): 1328- 1343
YANG Wen, HU Hao, LI Lingzhi, et al Railway boundary foreign object intrusion detection method based on machine vision[J]. Journal of Railway Science and Engineering, 2025, 22 (3): 1328- 1343
[1] 邬开俊,郑云琦,魏鼎,袁海翔. 基于YOLOv8s的轻量化航拍图像小目标检测算法[J]. 浙江大学学报(工学版), 2026, 60(9): 1912-1923.
[2] 汤毅杰,钟铭恩,袁彬淦,范康,谭佳威,林志强. 联合正交特征融合与大核可分离注意力的道路分割算法[J]. 浙江大学学报(工学版), 2026, 60(9): 1942-1952.
[3] 陈广秋,任天蓉,段锦,黄丹丹. 结合边缘辅助与多级特征融合的跨模态语义分割算法[J]. 浙江大学学报(工学版), 2026, 60(8): 1782-1791.
[4] 王铮,张梦君,姜楠,王万良,屠杭垚. 基于多特征融合和牛顿-拉夫逊优化算法的LSTM日径流预测[J]. 浙江大学学报(工学版), 2026, 60(7): 1567-1576.
[5] 张乃洲,赵云超,曹薇,张啸剑. 基于多视图跨模态特征融合的图像描述生成[J]. 浙江大学学报(工学版), 2026, 60(6): 1205-1212.
[6] 董博,吕东澔,喻大华,杜晓炜. 融合多域特征的VAE模型在肌肉疲劳分析中的应用[J]. 浙江大学学报(工学版), 2026, 60(6): 1317-1328.
[7] 李国燕,于威,梅玉鹏,张明辉,王新强. 全局局部特征融合的遥感图像建筑物提取[J]. 浙江大学学报(工学版), 2026, 60(5): 1100-1108.
[8] 于天河,王文龙,刘镛,杨壮壮,侯善冲. 改进的有雾图像中被遮挡车辆及行人识别算法[J]. 浙江大学学报(工学版), 2026, 60(4): 738-750.
[9] 马龙,候永琪,吴佰靖,高丽,邓建伟,闫光辉. 多尺度图卷积下的水漂垃圾轨迹预测模型[J]. 浙江大学学报(工学版), 2026, 60(4): 751-762.
[10] 包晓安,陈恩琳,张娜,涂小妹,吴彪,张庆琪. 基于多尺度编码器融合的三维人体姿态估计算法[J]. 浙江大学学报(工学版), 2026, 60(3): 565-573.
[11] 李国燕,李鹏辉,刘榕,梅玉鹏,张明辉. 融合多尺度分辨率和带状特征的遥感道路提取[J]. 浙江大学学报(工学版), 2026, 60(3): 585-593.
[12] 张建刚,李肖,冯丹丹. 基于动态核感知的无人机视角路面病害检测方法[J]. 浙江大学学报(工学版), 2026, 60(10): 2141-2152.
[13] 周思瑶,夏楠,江佳鸿. 姿态引导的双分支换装行人重识别网络[J]. 浙江大学学报(工学版), 2026, 60(1): 71-80.
[14] 肖剑,何昕泽,程鸿亮,杨小苑,胡欣. 基于多尺度特征增强的航拍小目标检测算法[J]. 浙江大学学报(工学版), 2026, 60(1): 19-31.
[15] 程文鑫,闫光辉,常文文,吴佰靖,黄亚宁. 基于通道加权的多模态特征融合用于EEG疲劳驾驶检测[J]. 浙江大学学报(工学版), 2025, 59(9): 1775-1783.