Detecting Rails and Obstacles Using a Train-Mounted Thermal Camera

Amanda Berg, Kristoffer Öfjäll, Jörgen Ahlberg, Michael Felsberg

Abstract

This paper presents a novel system for detecting railway tracks and obstacles using a train-mounted thermal camera. By leveraging the fixed geometry of rail travel and adaptive correlation filters, the authors provide a method to identify hazards in low-visibility conditions where traditional visual sensors and human operators often fail. The system achieves a True Positive Rate (TPR) of over 90% for obstacles with a temperature difference of at least 5°C relative to the background.

Introduction

The stakes for railway safety are high, as trains traveling at cruising speeds require significant distances to stop. Often, by the time a human driver spots an obstacle—such as an animal or a fallen tree—it is too late to avoid a collision. This risk is amplified during "impaired visibility" conditions like fog, heavy snow, or total darkness.

While autonomous lane detection is common in the automotive industry, railways present unique challenges. They possess a rigid, specific structure but lack clear lane markings. Furthermore, the lack of publicly available thermal datasets for railway obstacle detection necessitated the foundational research and dataset creation presented here.

Methods

The proposed system utilizes a two-stage pipeline to process thermal imagery:

  1. Rail Detection via Curvature Histograms: Since a train’s position is fixed relative to the tracks, the authors use Inverse Perspective Mapping (IPM) to map image pixels to ground coordinates. They pre-calculate "look-up images" that map every pixel below the horizon to a specific curvature bin. By applying Gaussian derivative filters to estimate edge orientation and weighting these against expected rail directions, the track's curvature is extracted from a 1D histogram. This approach is significantly faster and more robust than general-purpose line detection.
  2. Anomaly Detection via Adaptive Correlation Filters: Rather than training a classifier for specific objects, the system identifies anomalies. It employs a 1D version of the MOSSE (Minimum Output Sum of Squared Error) filter to "learn" the appearance of a clear track in real-time. The system rescales the masked rail area to a uniform width and flags any row where the visual signature deviates significantly from the learned model of rails and sleepers.
System architecture showing the thermal camera input and the processing pipeline for rail and anomaly detection.

Experimental Setup and Datasets

The authors introduced a novel dataset recorded using a FLIR SC655 thermal camera mounted on a train moving at 200 km/h. Because real-world collisions are rare, simulated obstacles of varying sizes and temperatures were inserted into the real thermal footage to evaluate detection performance.

Hardware implementation: (a) Thermal camera in a protective box, (b) mounted on the front of a train, and (c) the driver's interface showing the thermal feed.

A key technical consideration is that thermal cameras must be mounted externally, as standard glass windshields are opaque to long-wave infrared radiation.

Key Results

The system's performance was evaluated using Receiver Operating Characteristic (ROC) curves. Accuracy was found to be highly dependent on the temperature difference ($\Delta T$) between the obstacle and the background. At a $\Delta T$ of $5^\circ C$ or higher, the system achieved a True Positive Rate (TPR) of over 90% with a False Positive Rate (FPR) of only 1-2%. The authors conclude that at this threshold, the system is suitable for practical use, as temporal tracking can filter out occasional false detections.

Conclusion and Future Work

By treating obstacle detection as an anomaly detection problem and exploiting the physical constraints of rail travel, the authors developed an efficient 24/7 safety application. Current limitations include a "constant curvature" assumption that limits look-ahead range and false positives from infrastructure like heated switches. Future work aims to integrate foreground-background segmentation to detect moving objects near the tracks before they become a hazard.

Summary updated

BibTeX
@inproceedings{berg2015detecting,
  author = {Amanda Berg and Kristoffer Öfjäll and Jörgen Ahlberg and Michael Felsberg},
  title = {{Detecting Rails and Obstacles Using a Train-Mounted Thermal Camera}},
  booktitle = {SCIA},
  year = {2015},
  doi = {10.1007/978-3-319-19665-7\_42},
}
Figure