Unsupervised anomaly segmentation model for rail damage based on image-inpainting and cold diffusion
Document Type
Journal Article
Publication Date
2025
Subject Area
mode - rail, infrastructure - track, infrastructure - maintainance
Keywords
Railway engineering, Rail defects, Structural health monitoring, Diffusion model, Semantic segmentation, Unsupervised anomaly detection
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.
Rights
Permission to publish the abstract has been given by Elsevier, copyright remains with them.
Recommended Citation
Han, C., Dong, Y., Gao, M. Y., Dong, L., & Yang, Y. (2025). Unsupervised anomaly segmentation model for rail damage based on image-inpainting and cold diffusion. Automation in Construction, 177, 106342.

Comments
Automation in Construction Home Page:
http://www.sciencedirect.com/science/journal/09265805