Unsupervised anomaly segmentation model for rail damage based on image-inpainting and cold diffusion

Chengjia Han, Yiqing Dong, Maggie Y. Gao, Liwei Dong*, Yaowen Yang

*Corresponding author for this work

Research output: Contribution to journalArticlepeer-review

Abstract

Ensuring structural health of rail tracks is critical for safe train operations. While deep learning-based vision models are widely used for rail damage detection, supervised methods suffer from limited generalization due to scarce and diverse annotated data. Unsupervised models often experience missed detections and false positives when handling complex and variable rail background textures, as well as rail damage with significant intra-class variability. To address these limitations, this paper proposes an unsupervised pixel-level rail damage segmentation model based on a cold diffusion framework, called InpRailDiffusion. It introduces inpainting-based noise and uses a Mamba-enhanced, time-conditioned U-Net for progressive noise removal. Damage segmentation is achieved by analyzing pixel-wise differences between generated and original images with adaptive thresholding. A multi-scale masking strategy fuses reconstruction features at various spatial resolutions, reducing false positives and missed detections. Evaluated on RSDDs-I and RSDDs-II, InpRailDiffusion outperformed state-of-the-art baselines with MIoU/F1-Scores of 0.864/0.844 and 0.845/0.814, respectively.

Original languageEnglish
Article number106342
JournalAutomation in Construction
Volume177
DOIs
Publication statusPublished - Sept 2025
Externally publishedYes

Bibliographical note

Publisher Copyright:
© 2024

ASJC Scopus Subject Areas

  • Control and Systems Engineering
  • Civil and Structural Engineering
  • Building and Construction

Keywords

  • Diffusion model
  • Rail defects
  • Railway engineering
  • Semantic segmentation
  • Structural health monitoring
  • Unsupervised anomaly detection

Cite this