RailSafeNet: Visual Scene Understanding for Tram Safety

Ondřej Valach, Ivan Gruber
9/15/2025
cs.CV

Official code: oValach/RailSafeNet (9 stars, MIT, last commit 2026-02-08).

Abstract

Tram-human interaction safety is an important challenge, given that trams frequently operate in densely populated areas, where collisions can range from minor injuries to fatal outcomes. This paper addresses the issue from the perspective of designing a solution leveraging digital image processing, deep learning, and artificial intelligence to improve the safety of pedestrians, drivers, cyclists, pets, and tram passengers. We present RailSafeNet, a real-time framework that fuses semantic segmentation, object detection and a rule-based Distance Assessor to highlight track intrusions. Using only monocular video, the system identifies rails, localises nearby objects and classifies their risk by comparing projected distances with the standard 1435mm rail gauge. Experiments on the diverse RailSem19 dataset show that a class-filtered SegFormer B3 model achieves 65% intersection-over-union (IoU), while a fine-tuned YOLOv8 attains 75.6% mean average precision (mAP) calculated at an intersection over union (IoU) threshold of 0.50. RailSafeNet therefore delivers accurate, annotation-light scene understanding that can warn drivers before dangerous situations escalate. Code available at https://github.com/oValach/RailSafeNet.

View on arXivView PDF

Code Implementations(1)

MIT

Repository of the paper: RailSafeNet: Visual Scene Understanding for Tram Safety

92PythonNov 3, 20238 months agoMIT
distance-estimationhuman-safetyimage-processingimage-segmentationobject-detection+5 more

Similar Papers

Cite this paper

@article{valach2025railsafenet,
  title  = {RailSafeNet: Visual Scene Understanding for Tram Safety},
  author = {Ondřej Valach and Ivan Gruber},
  year   = {2025},
  eprint = {2509.12125},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2509.12125v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2509.12125.svg)](https://codeofpaper.com/paper/2509.12125)

Discussion