Intelligent Railway Foreign Object Detection: A Semi-supervised Convolutional Autoencoder Based Method

Tiange Wang, Zijun Zhang, Fangfang Yang, Kwok-Leung TsuiarXiv 2021

Abstract

Automated inspection and detection of foreign objects on railways is important for rail transportation safety as it helps prevent potential accidents and trains derailment. Most existing vision-based approaches focus on the detection of frontal intrusion objects with prior labels, such as categories and locations of the objects. In reality, foreign objects with unknown categories can appear anytime on railway tracks. In this paper, we develop a semi-supervised convolutional autoencoder based framework that only requires railway track images without prior knowledge on the foreign objects in the training process. It consists of three different modules, a bottleneck feature generator as encoder, a photographic image generator as decoder, and a reconstruction discriminator developed via adversarial learning. In the proposed framework, the problem of detecting the presence, location, and shape of foreign objects is addressed by comparing the input and reconstructed images as well as setting thresholds based on reconstruction errors. The proposed method is evaluated through comprehensive studies under different performance criteria. The results show that the proposed method outperforms some well-known benchmarking methods. The proposed framework is useful for data analytics via the train Internet-of-Things (IoT) systems.

Introduction

Railway safety relies heavily on detecting foreign objects—ranging from maintenance tools and trash to pedestrians—on the tracks. Traditional computer vision approaches usually rely on supervised learning, which requires thousands of labeled images for every possible type of obstacle. However, the real world is unpredictable; it is impossible to pre-define every possible object that might fall onto a track. Furthermore, "abnormal" data (images with objects) is extremely rare compared to the hours of "normal" track footage available. This research addresses the "insufficient samples" problem by shifting the focus from object recognition to anomaly detection using a semi-supervised approach.

Methodology

The proposed framework utilizes a Convolutional Autoencoder (CAE) enhanced by Adversarial Training. The architecture is designed to learn the distribution of "normal" track images so that any deviation can be flagged as an anomaly.

  1. The Architecture: The model consists of three parts: an Encoder ($E_\theta$) that compresses the input into a bottleneck feature $z$, a Decoder ($G_\phi$) that reconstructs the image, and a Discriminator ($D_\omega$) that forces the decoder to produce highly authentic results through adversarial learning.
  2. Semi-supervised Training: The model is trained exclusively on "normal" images. It learns to perfectly reconstruct the geometry of rails, bolts, and sleepers.
  3. Inference and Detection: When the model encounters a foreign object, it fails to reconstruct the unknown object and instead attempts to reconstruct the "normal" track underneath it. By comparing the input image to this reconstruction, the system generates an anomaly score $A(x, \hat{x})$.
The proposed CAE-based architecture showing the training phase with adversarial learning and the test phase for anomaly detection.

Experimental Results

The study utilized a custom dataset from the Hong Kong Metro Corporation (MTR), captured by cameras mounted on the bottom of a train. The training set included 6,656 normal images, while the test set contained 316 abnormal images with various objects like phones and bags.

The proposed method achieved an AUROC of 85.66% and an AUPRC of 87.72%, significantly outperforming traditional benchmarks like One-Class SVM (67.49% AUROC) and standard GANs (62.73% AUROC). Beyond binary classification, the model successfully generated pixel-level masks to localize the detected objects.

Visual results of the reconstruction process and object localization across normal and abnormal test samples.

Conclusion

The semi-supervised CAE framework provides a robust solution for railway safety by identifying unknown obstacles without requiring prior labels. By acting as a "normality filter," the model effectively isolates foreign objects through reconstruction error. Future work will explore the use of temporal video data to further reduce false positives and the application of this architecture to rail surface defect detection.

Summary updated

BibTeX
@misc{wang2021intelligent,
  author = {Tiange Wang and Zijun Zhang and Fangfang Yang and Kwok-Leung Tsui},
  title = {{Intelligent Railway Foreign Object Detection: A Semi-supervised Convolutional Autoencoder Based Method}},
  year = {2021},
  eprint = {2108.02421},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2108.02421},
}
Figure