FRSign: A Large-Scale Traffic Light Dataset for Autonomous Trains

by   Jeanine Harb, et al.
IRT SystemX

In the realm of autonomous transportation, there have been many initiatives for open-sourcing self-driving cars datasets, but much less for alternative methods of transportation such as trains. In this paper, we aim to bridge the gap by introducing FRSign, a large-scale and accurate dataset for vision-based railway traffic light detection and recognition. Our recordings were made on selected running trains in France and benefited from carefully hand-labeled annotations. An illustrative dataset which corresponds to ten percent of the acquired data to date is published in open source with the paper. It contains more than 100,000 images illustrating six types of French railway traffic lights and their possible color combinations, together with the relevant information regarding their acquisition such as date, time, sensor parameters, and bounding boxes. This dataset is published in open-source at the address <>. We compare, analyze various properties of the dataset and provide metrics to express its variability. We also discuss specific challenges and particularities related to autonomous trains in comparison to autonomous cars.


page 2

page 3

page 6

page 8

page 9


Key Ingredients of Self-Driving Cars

Over the past decade, many research articles have been published in the ...

Explainable Abstract Trains Dataset

The Explainable Abstract Trains Dataset is an image dataset containing s...

Comparing Unit Trains versus Manifest Trains for the Risk of Rail Transport of Hazardous Materials – Part II: Application and Case Study

Built upon the risk analysis methodology (presented in the part I paper)...

Combining Visual Saliency Methods and Sparse Keypoint Annotations to Providently Detect Vehicles at Night

Provident detection of other road users at night has the potential for i...

A Study of Car-to-Train Assignment Problem for Rail Express Cargos on Scheduled and Unscheduled Train Service Network

Freight train services in a railway network system are generally divided...

Ithaca365: Dataset and Driving Perception under Repeated and Challenging Weather Conditions

Advances in perception for self-driving cars have accelerated in recent ...

A Machine to Machine framework for the charging of Electric Autonomous Vehicles

Electric Autonomous Vehicles (EAVs) have gained increasing attention of ...

I Introduction

Intelligent transport systems (ITS) present nowadays a major interest to thousands of companies all over the world. These systems encompass a wide range of technologies, from detection and recognition to telecommunications, traffic management and security, to mention a few. ITS are now at different stages of development with the aim to achieve a better organization of daily transport, provide better quality of service, add more safety and comfort for users, and improve coordination for traffic management. They can also save more time, cost or energy, and thus contribute to the development and design of tomorrow’s digital city.

Autonomous cars are certainly the means of transportation that have so far deserved the most resources, development, research and analysis. Developing autonomous cars is certainly the most challenging given the complexity of the road environment, particularly when many vehicles have to interact between each others. But cars are far from being the only vehicle of interest in the quest towards automation. Other modes of transportation have recently joined the race such as trains, ships and aircrafts. In this paper, our main concern will be in mainline trains. While automation of trains is less complex than that of cars and has been solved in closed environment already (e.g. automatic metros), the challenges remain significant in open environments. A first difficulty is to build an obstacle detection system with efficient sensors that is able to detect obstacles at long distance and which remains robust against external perturbations such as branches falling on the tracks, rockslides, animals and human intrusion. A second challenge is to design an automatic traffic light system which is able to recognize and properly interpret lights of existing railway signalization systems. All these technologies must respect the real-time constraint which is much more challenging in the field of autonomous trains than autonomous vehicles given trains speeds. Safety is another important component that should be considered seriously in the development of autonomous trains. Indeed, restrictions are much more severe in the world of autonomous trains than in the world of autonomous vehicles [5].

Even though trains are behind time in terms of vehicular automation, there is a crude sense of excitement when learning about the initiatives being spearheaded at national and international levels. For instance, France’s national railway company, Société Nationale des Chemins de Fer (SNCF), expects to see semi-autonomous trains running on the French rail network by 2020, and fully automatic trains within five years. In order to achieve full autonomy, trains will be equipped with advanced (and/or intelligent) cameras, high-precision sensors, and state-of-the-art positioning systems. These sensors are required for monitoring the railway and the train’s environment. Therefore, they record a massive amount of data which, when acquired, play a critical role. Indeed, these data could one day enable computers to mimic a train driver’s observational capabilities, through the training of machine learning models. On the other hand, having data available in public allows researchers and developers to work in a competitive environment, which can only accelerate technological development.

Open sourcing data has proven effective in the development of autonomous vehicles [3]. For example, KITTI [2] can be considered as the first destination for autonomous driving researchers. It contains annotated data from scene flow, sensors and 3D object localization. The benchmarks on KITTI are a battleground for researchers in pursuit of the sleekest algorithms. BDD100K [8]

is probably the hugest publicly available self-driving dataset. It includes object detection, lane detection, drivable area and semantic segmentation sub-datasets. COCO

[4] is a large-scale object detection, segmentation, and captioning dataset designed for object recognition. nuScenes [1] is a more recent image-based benchmark dataset for object detection and tracking. These datasets, as well as others, have been the driving force behind various developments in autonomous vehicles.

In the field of autonomous trains, open sourcing data initiatives are still very limited. Recently, [9]

introduced RailSem19 as the first public dataset containing annotated images for semantic scene understanding in the rail environment. In the present paper, we introduce FRSign, the first dataset containing images for railway traffic lights. In addition to having benefited from manual annotation, our dataset is accompanied with several acquisition information which highlight its variability. Some samples of labeled railway traffic lights from FRSign are shown in Figure

1. Unlike the automotive sector, railway lights specifications are not unified, and each country designs and uses its own signals. Our dataset was acquired in France and contains multitudes of samples of the French railway traffic lights which will be described in the paper.

Fig. 1: Images from FRSign Dataset

The rest of the paper is organised as follows. Section II discusses general challenges of autonomous trains in comparison with autonomous vehicles. Our dataset FRSign is introduced and described in Section III together with several details regarding its acquisition and annotation. Some samples are also given and visualized. Section IV presents some statistics and metrics expressing the variability of the dataset. Finally in Section V, we discuss possible interests of FRSign towards automation of the task of reading lateral signalling for train and present related specific challenges.

Ii Challenges of autonomous trains vs. autonomous cars

According to the International Association of Public Transport (UITP), there are four Grades of Automation (GoA) of trains [7]:

  1. GoA1: The first grade is manual train operation, where the train driver controls starting and stopping, operation of doors and handling of emergencies or sudden diversions.

  2. GoA2: The second grad handles train starting and stopping operations.

  3. GoA3: The third grade is driverless train operation where there are no drivers, but an attendant is onboard in order to take control in case of emergency.

  4. GoA4: Finally, the fourth grade corresponds to unattended train operation, which is true automation without any staff on board.

Technical progress has made train control systems capable more than ever before of many complex tasks such as supervising, operating and controlling the entire operational process making autonomous trains possible.

Even if it might be thought that the presence of railways renders the challenge of autonomous trains easier than autonomous cars, multiple factors make the train a unique problem, which cannot be solved by a simple transposition of the solutions found for other types of vehicles. Here are some illustrative examples of challenges for trains:

Fig. 2: Rail Signalization Principle
  1. One of the main difficulties lies in the complex interaction of the various subsystems when the train is running: monitoring the status of the railway track, the position of other trains and the physical integrity of the train, and determining the required space to brake safely. If any subsystem cannot judge the situation accurately, it will perform defensively by slowing or stopping, which hinders transport performance.

  2. The variability of use cases in the rail industry is much more important than for cars:

    1. Railway signalling is diverse and features multiple types of signals/state combinations. For example, a railway panel of type ‘H’ (cf. Section III-B) is configured to show up-to 18 different states, using eight light bulbs.

    2. There exists a plethora of train types with matching infrastructure. Thus, an autonomous system that applies to one type of trains may not necessarily generalize to another. While there is a will for unification, overhauling a country’s entire rail infrastructure is a daunting long-term project that comes at high cost.

  3. The stopping distance of a train is function of its body weight, cargo, and speed: a 10-car passenger train moving at 100 km/h requires about 500 meters to come to a halt. Therefore, it is imperative to detect obstacles and recognize the state of traffic lights well in advance before making a calculated stop.

  4. Due to the long stopping distances mentioned above, the railway signalling system is based on block sections protected by traffic lights. Contrary to road traffic where drivers must adapt the speed to anticipate changing state of the next visible traffic light (i.e. a driver adapts the braking effort to stop or not his/her vehicle at a traffic light depending on the speed and distance to the traffic light not to cross the red signal), rail signalization considers a succession of signals protecting successive block sections. The lengths of the block sections are defined so that any train respecting the signalization can stop at a stopping signal (red signal) safely. Typically, the train driver is informed by a yellow signal that the next signal is red. Thus, the train driver must brake and anticipate to stop at the next signal. Figure 2 illustrates this principle. Similarly, specific states of the traffic lights inform the driver in advance that a speed limit must be applied from the next signal.

  5. The railway signalization must strictly be respected no matter the weather conditions, even when visibility is very limited. An autonomous system must therefore demonstrate its capability to read signals in all conditions in a safe manner before the train crosses the signal.

  6. A special emphasis is given on passenger safety and system dependability. Without proof of the computer system’s reliability, security, and robustness, autonomous trains cannot be certified, let alone commercialized.

  7. Testing the system in situ requires access to railway infrastructure, which is not as trivial a matter compared to regular roads.

These bottlenecks may be holding GoA4 trains back today, but there is no doubt that we are on the brink of a breakthrough that will revolutionize public transportation as we know it. Both freight and passenger trains will benefit from full autonomy: driverless operations increase system availability, network capacity and operational efficiency.

One thing is certain: it is but a matter of time before we reach industrial maturity in this area. Indeed, autonomous trains are expected to mark the beginning of the third “rail revolution”, after electric traction and high-speed rail. Moreover, they will cement AI’s reputation for being the biggest disruption of the modern era.

Iii Data acquisition and labeling

The name of the dataset, FRSign, stands for "French Railway Signalling". The collection of the data released in FRSign took place on specific portions of railroads defined in Section III-A. We proceed by presenting the characteristics of French railway traffic lights in Section III-B. We finally end by describing how we collected the data found in FRSign (Section III-C), and how the images included in the dataset were annotated (Section III-D).

Iii-a Use Case Definition

For the purposes of our work, our team had access to a train, portrayed in Figure 9, that circulates twice per month ever since September 2017 on specific railways located between the towns Villeneuve Saint-Georges and Montereau, in the region of Ile-de-France in France, highlighted in orange in Figure 3. Most of the existing French railway panels can be found on these portions of railways, which is the reason why they were initially chosen for the use case.

Fig. 3: Use Case Definition

Iii-B French Railway Traffic Lights

In FRSign, we selected a subset of French railway panels that were the most recorded during our tests. The list hereafter presents the six types of French railway panels included in the dataset and describes their configuration:

  • ’Chassis A (3 feux verticaux)’: panel named A featuring three vertical lights (cf. Figure 4).

  • ’Chassis C (5 feux verticaux)’: panel named C featuring five vertical lights (cf. Figure 5).

  • ’Chassis F (6 & 1 feux en L inverse)’: panel named F featuring six vertical lights plus one light in an inverse L-shaped composition.

  • ’Chassis H (6 & 3 feux en S)’: panel named H featuring six vertical lights plus three lights in an S-shaped composition.

  • ’Chassis ID2 (2 feux horizontaux)’: panel named ID2 featuring two horizontal lights.

  • ’Chassis ID3 (3 feux horizontaux)’: panel named ID3 featuring three horizontal lights.

Table I contains the possible states that can be found in the dataset, ordered from most restrictive to most permissive. Note that these descriptions apply only to panels A, C, F and H.

State name in dataset Code State description
’Carre (2 feux rouges)’ C Full stop, two red lights
’Carre violet (1 feu violet)’ Cv Maintenance stop, single purple light
’Semaphore (1 feu rouge)’ S Stop, single red light
’Feu rouge clignotant (1 feu rouge clignotant)’ Scli Blinking stop, single blinking red light
’Feu blanc (1 feu blanc)’ M Maneuver
’Avertissement & rappel 30’ RR+A Warning (single yellow light) and speed limit 30.
’Feu jaune clignotant & rappel 30’ RR+Acli Blinking yellow light and speed limit 30.
’Rappel 30 (2 feux jaunes verticaux)’ RR Speed limit 30, two vertical yellow lights.
’Avertissement & rappel 60’ RRcli+A Warning (single yellow light) and speed limit 60.
’Feu jaune clignotant & rappel 60’ RRcli+Acli Blinking yellow light and speed limit 60.
’Rappel 60 (2 feux jaunes clignotants verticaux)’ RRcli Speed limit 60, two blinking vertical yellow lights.
’Avertissement (1 feu jaune)’ A Warning, single yellow light.
’Ralentissement 30 (2 feux jaunes horizontaux)’ R Slow down 30, two horizontal yellow lights.
’Feu jaune clignotant & ralentissement 60’ Rcli+Acli Yellow light and slow down 60
’Feu jaune clignotant (1 feu jaune clignotant)’ Acli Single blinking yellow light
’Ralentissement 60 (2 feux jaunes clignotants horizontaux)’ Rcli Slow down 60, two blinking horizontal yellow lights
’Feu vert clignotant (1 feu vert clignotant)’ VLcli Slow down 160, single blinking green light
’Feu vert (1 feu vert fixe)’ VL Go, single green light
TABLE I: Railway Traffic Light States for Panels A, C, F and H

As for panels ID2 and ID3, their function is not to regulate railway traffic, but to indicate directions. Their states are explained in Table II:

State name in dataset State description
’Feu blanc (1 feu blanc)’ Direction 1, single white light
’Feux blancs (2 feux blancs)’ Direction 2, two white lights
TABLE II: Railway Traffic Light States for Panels ID2 and ID3

All states do not apply to all panels. The possible light combinations for each panel are explained in figures 4, 5, 6, 7, and 8. In each of these figures, the symbol "+" corresponds to a fixed light, and the symbol "*" corresponds to a blinking light. "Cache" means that the light bulb is not being used or is hidden behind a blocker. Also, note that for each panel, we may have multiple possible color configurations: for instance, panel A may either have a violet, red, or yellow light bulb in "Position 1".

Fig. 4: Panel A Combinations
Fig. 5: Panel C Combinations
Fig. 6: Panel F Combinations
Fig. 7: Panel H Combinations
Fig. 8: Panel ID Combinations

Iii-C Data Acquisition

The train used for our work is equipped with multiple sensors that detect and capture the surrounding environment. For instance, it is equipped with a LiDAR fixed on top of the train’s engine (A in Figure 9). Most importantly, it is equipped with two cameras, located in the driver’s cabin (B in Figure 9), that capture the railway in front of the train. Therefore, these cameras film the railway from the train driver’s point of view. In the dataset, they are identified by unique identifiers (or sensor_id): camera_1 and camera_2. The specifications of the two cameras are summarized in Table III. The acquired images are then stored in an embarked lab in the test vehicle behind the locomotive (C in Figure 9).

Camera ID camera_1 camera_2
Megapixels 3.2 2.3
Sensor Format 1/1.8" 1/1.2"
Pixel Size 3.45 µm 5.86 µm
Resolution 2048x1536 1920x1200
Maximum Frame Rate 121 FPS 163 FPS
TABLE III: Cameras Specifications
Fig. 9: Train used to acquire the dataset

Iii-D Image Annotation

The recordings made on the train were subsequently annotated thanks to the software BeaverDam [6], which we have adapted to our use. More precisely, we used two levels for labeling: classes refer to the railway panel’s type, and subclasses refer to the panel’s current state. Therefore, we were able to annotate sequences of images, with each sequence corresponding to an individual state for the observed panel.

Iv Dataset content and structure

We define in this section the content and the structure of the released dataset, with an emphasis on the terminology used to differentiate sequences and images.

Iv-a Video Sequence vs. Images

In FRSign, we oppose two notions:

  • Video sequences: sequences of consecutive images showing an annotated video portion of a railway panel, continuously featuring the same state.

  • Images: individual images of railway panels.

Iv-B Bounding boxes

Annotations are implemented in the form of objects called "bounding boxes". A bounding box defines the region of interest in the acquired images. In our dataset, it delimits the railway traffic light we would like to detect, and is defined using four coordinates: .

Fig. 10: Bounding box implementation

As seen in Figure 10, the tuple designates the upper left corner of the bounding box. The remaining coordinates, and , define the width and the height of the rectangle drawn from the upper left corner.

Iv-C Content

The dataset FRSign contains two types of files:

  1. An HDF5 file called "frsign_v1.0.h5": this file lists all the images contained in the dataset with their corresponding metadata. The structure of the HDF5 file is explained hereafter.

  2. Image files: all the images have been saved in PNG format. Their descriptions can be found in the HDF5 file.

The HDF5 file "frsign_v1.0.h5" contains two dataframes named:

  1. /dataframe : dataframe which contains the metadata related to all video sequences.

  2. /images : dataframe with a double index that lists images according to their chronological order in a sequence as well as their corresponding bounding boxes.

Hereafter is the description of the columns found in /dataframe:

  • camera: Identifier of the camera that was used.

  • CameraInfo_bayerTileFormat: Bayer tile format.

  • CameraInfo_sensorResolution: Sensor resolution (width x height).

  • context: Context of the recording (train in our case).

  • datetime: Date and timestamp of the recording.

  • fps: Frame per second.

  • image_format: Image format (PNG8 in our case).

  • on_track: Boolean that indicates whether the railway panel is on the same track as the train.

  • optic: Selected optic for the acquisition.

  • sensor_id: Unique sensor identifier.

  • sensor_type: Type of sensor that was used (camera in our case).

  • state: State of the railway panel.

  • type: Type of the railway panel.

  • video_name: Name of the video file.

  • video: Video filepath.

The index of /dataframe creates a unique identifier for each video sequence found in the table.

Hereafter is the description of the columns found in /images:

  • fullpath : Image filepath.

  • x : Abscissa of the upper left corner of the bounding box.

  • y : Ordinate of the upper left corner of the bounding box.

  • w : Width of the bounding box.

  • h : Height of the bounding box.

The double index of /images serves to, first, identify the video sequence that contains the image, and second, create a unique identifier for the image.

V Statistics

In this section, we present various statistics on the data found in the dataset FRSign.

To start, FRSign is composed of 393 video sequences, which make up 105,352 individual images.

The horizontal bar charts found in Figures 11, 12, 13, 14, present the distribution of video sequences or individual images per panel type and state.

The displayed figures highlight the variability of the encountered railway traffic lights on the selected use case, respectively according to panel type and state.

Fig. 11: Number of video sequences per panel type
Fig. 12: Number of video sequences per panel state
Fig. 13: Number of images per panel type
Fig. 14: Number of images per panel state

Vi Conclusions and future work

In this paper, we introduced FRSign, a unique dataset containing more than 100,000 images of French railway signalling panels. We defined the terminology and the specifications used for French railway infrastructure such as panel types and their combinations.

Acquiring this data was not trivial. We faced multiple challenges on several levels:

  • Having access: having the necessary authorizations to access the railroads defined in our use case required a lot of preparation and organization.

  • Configuring the hardware: using the correct camera parameters is of high importance for acquiring images of good. Indeed, we tested multiple optics with regards to the distance to the panels in order to visualize them well. Also, it was critical to find the best spot to fix cameras: we wanted to be on the same level as the train driver’s eyes in order to have the same angle of view, and we wanted to avoid being near the engine, as it would make cameras vibrate.

  • Understanding the panels: most captured panels use LED lights which required rectified voltage with a frequency of 100 Hz. If the camera’s shutter speed is less than the LED’s frequency, the acquired video sequences would falsely show a blinking light. Therefore, we understood that we needed to set the exposure time more than or equal to the frequency.

This dataset can be used to learn automatic classification of French railway signalling panels, either by type or by state. It could also be used to detect panels in the images by comparing the prediction to the supplied bounding box.

This work is a first attempt to open-sourcing French railway signalling panels. It can be completed and improved in various ways:

  • Acquire images under multiple different weather conditions: rain, snow, fog…

  • Acquire images of all existing types of French railway signalling panels, as well as all their possible states, and reach a balanced distribution.

  • Acquire images on railroads across the entire country, to cover all settings and environments.

We hope to address these challenges in future works.

Acknowledgments. This work was done at IRT SystemX as part of the project TAS (Safe Autonomous Land Tranport), in partnership with SNCF and Alstom. We would like to thank our colleagues: Loïc Cantat, Pierre d’Aviau De Ternay and Jack Fazakerley for their help in designing and setting up the website.


  • [1] H. Caesar, V. Bankiti, A. H. Lang, S. Vora, V. E. Liong, Q. Xu, A. Krishnan, Y. Pan, G. Baldan, and O. Beijbom (2019) NuScenes: a multimodal dataset for autonomous driving. arXiv preprint arXiv:1903.11027. Cited by: §I.
  • [2] A. Geiger, P. Lenz, and R. Urtasun (2012) Are we ready for autonomous driving? the kitti vision benchmark suite. In

    Conference on Computer Vision and Pattern Recognition (CVPR)

    Cited by: §I.
  • [3] J. Janai, F. Güney, A. Behl, and A. Geiger (2017) Computer vision for autonomous vehicles: problems, datasets and state-of-the-art.. CoRR abs/1704.05519. External Links: Link Cited by: §I.
  • [4] T. Lin, M. Maire, S. Belongie, L. Bourdev, R. Girshick, J. Hays, P. Perona, D. Ramanan, C. L. Zitnick, and P. Dollár (2014) Microsoft coco: common objects in context. Note: cite arxiv:1405.0312Comment: 1) updated annotation pipeline description and figures; 2) added new section describing datasets splits; 3) updated author list External Links: Link Cited by: §I.
  • [5] S. Rangra, M. Sallak, W. Schön, and F. Belmonte (2018) RISK and safety analysis of main line autonomous train operation: context, challenges and solutions. In RISK AND SAFETY ANALYSIS OF MAIN LINE AUTONOMOUS TRAIN OPERATION: CONTEXT, CHALLENGES AND SOLUTIONS, pp. . Cited by: §I.
  • [6] A. Shen (2016-12) BeaverDam: video annotation tool for computer vision training labels. Master’s Thesis, EECS Department, University of California, Berkeley. External Links: Link Cited by: §III-D.
  • [7] UITP (2018) PRESS kit metro automation facts, figures and trends. In PRESS KIT METRO AUTOMATION FACTS, FIGURES AND TRENDS, External Links: Link Cited by: §II.
  • [8] F. Yu, W. Xian, Y. Chen, F. Liu, M. Liao, V. Madhavan, and T. Darrell (2018) BDD100K: a diverse driving video database with scalable annotation tooling. arXiv:1805.04687 , pp. . External Links: arXiv:1805.04687 Cited by: §I.
  • [9] O. Zendel, M. Murschitz, M. Zeilinger, D. Steininger, S. Abbasi, and C. Beleznai (2019) RailSem19: A dataset for semantic rail scene understanding. In IEEE Conference on Computer Vision and Pattern Recognition Workshops, CVPR Workshops 2019, Long Beach, CA, USA, June 16-20, 2019, pp. 0. External Links: Link Cited by: §I.