J Shanghai Jiaotong Univ Sci ›› 2025, Vol. 30 ›› Issue (5): 923-934.doi: 10.1007/s12204-023-2683-y

• • 上一篇    下一篇

基于改进CLRNet的铁轨线检测算法

  

  1. 四川大学 a. 计算机学院;b. 视觉合成图形图像国防重点实验室,成都 610065
  • 收稿日期:2023-06-29 接受日期:2023-07-20 出版日期:2025-09-26 发布日期:2023-12-21

Rail Line Detection Algorithm Based on Improved CLRNet

周博玮a,邢冠宇b,刘艳丽a,b   

  1. a. College of Computer Science; b. National Key Laboratory of Fundamental Science on Synthetic Vision, Sichuan University, Chengdu 610065, China)
  • Received:2023-06-29 Accepted:2023-07-20 Online:2025-09-26 Published:2023-12-21

摘要: 在轨道交通智慧驾驶中,可靠的障碍物检测系统是列车安全的重要保障,其中对铁轨区域的检测直接影响系统辨别危险目标的准确性。铁轨线与车道线在图像中都呈现为细长线条状,但是轨道场景的环境更复杂,铁轨线的颜色更难以与背景区分。相较而言,目前已经有许多基于深度学习的车道线检测算法,铁轨线检测却缺乏公开的数据集以及针对性的深度学习检测算法。为此本文构建了一个铁轨图像数据集RailwayLine并对铁轨线进行标注用于检测模型的训练和测试。该数据集包含单轨道、多轨道、直轨、弯轨、交叉 、遮挡、模糊和不同光照条件等丰富的铁轨图像;针对目前缺少基于深度学习的铁轨线检测算法的问题,我们改进了在车道线方面性能优异的CLRNet算法,提出了铁轨线检测算法CLRNet-R;针对铁轨线在成像中线条细长,所占像素少,难以从复杂背景中区分的问题,我们引入注意力机制,提升全局特征提取能力,并增加语义分割头,利用铁轨二值概率增强铁轨线区域的特征;针对原CLRNet算法识别弯轨性能差、输出线条不光滑的问题,我们改进了原框架中线条交并比计算的权重分配,并提出两种基于局部斜率的损失,优化模型局部采样点的训练约束,提升模型对弯轨的拟合性能,获取光滑、稳定的铁轨线检测结果。本文通过实验证明,与其他主流的车道线检测算法相比,所提出的算法在铁轨线检测任务中具有更好的性能。

关键词: 铁轨线检测, 注意力, 语义分割头, 损失函数, CLRNet算法

Abstract: In smart driving for rail transit, a reliable obstacle detection system is an important guarantee for the safety of trains. Therein, the detection of the rail area directly affects the accuracy of the system to identify dangerous targets. Both the rail line and the lane are presented as thin line shapes in the image, but the rail scene is more complex, and the color of the rail line is more difficult to distinguish from the background. By comparison, there are already many deep learning-based lane detection algorithms, but there is a lack of public datasets and targeted deep learning detection algorithms for rail line detection. To address this, this paper constructs a rail image dataset RailwayLine and labels the rail line for the training and testing of models. This dataset contains rich rail images including single-rail, multi-rail, straight rail, curved rail, crossing rails, occlusion, blur, and different lighting conditions. To address the problem of the lack of deep learning-based rail line detection algorithms, we improve the CLRNet algorithm which has an excellent performance in lane detection, and propose the CLRNet-R algorithm for rail line detection. To address the problem of the rail line being thin and occupying fewer pixels in the image, making it difficult to distinguish from complex backgrounds, we introduce an attention mechanism to enhance global feature extraction ability and add a semantic segmentation head to enhance the features of the rail region by the binary probability of rail lines. To address the poor curve recognition performance and unsmooth output lines in the original CLRNet algorithm, we improve the weight allocation for line intersection-over-union calculation in the original framework and propose two loss functions based on local slopes to optimize the model’s local sampling point training constraints, improving the model’s fitting performance on curved rails and obtaining smooth and stable rail line detection results. Through experiments, this paper demonstrates that compared with other mainstream lane detection algorithms, the algorithm proposed in this paper has a better performance for rail line detection.

中图分类号: