Xing, Zeyu (2025) Generative models for unsupervised anomaly detection in temporal data. PhD thesis, University of York.
Abstract
Line-scan imagery has become a core sensing modality in automated railway inspection, enabling high-resolution, continuous monitoring of track structures. Unlike conventional 2D images, line-scan images are constructed row-by-row as the camera moves along the track, forming temporally ordered sequences where the vertical axis encodes time and the horizontal axis represents spatial cross-sections. This spatiotemporal structure introduces unique challenges for anomaly detection, including subtle structural deviations, periodic object patterns, and high-frequency, non-informative background textures.
To address these challenges, this thesis proposes two complementary generative frameworks for unsupervised anomaly detection in railway line-scan imagery. The first is a VAE-GAN model trained to predict future segments of track sequences based on temporal continuation. By learning normal structural dynamics, the model can identify deviations that violate expected continuity. A confidence-aware auxiliary decoder assigns pixel-wise certainty scores to guide the anomaly score, improving robustness against stochastic background textures such as ballast.
The second approach leverages Stable Diffusion as a high-fidelity reconstruction model. By fine-tuning a pretrained latent diffusion inpainting model using LoRA (Low-Rank Adaptation), we adapt the generative process to grayscale, line-scan railway images. To localize anomalies, we introduce a segmentation-guided pipeline using FastSAM to detect object-level differences between original and inpainted images. Regions exhibiting significant structural changes, as measured by Intersection over Union (IoU), are flagged as anomalous.
Both methods are evaluated on synthetic and real-world datasets, demonstrating their effectiveness in detecting structural faults under minimal supervision. The thesis concludes by comparing the two approaches, discussing their respective advantages, and proposing future directions for hybrid modeling. Overall, this work highlights the potential of generative modeling in addressing the unique demands of industrial inspection tasks involving line-scan imagery.
Metadata
| Supervisors: | Smith, William and Mehmood, Owais |
|---|---|
| Awarding institution: | University of York |
| Academic Units: | The University of York > Computer Science (York) |
| Date Deposited: | 10 Mar 2026 11:46 |
| Last Modified: | 10 Mar 2026 11:46 |
| Open Archives Initiative ID (OAI ID): | oai:etheses.whiterose.ac.uk:38256 |
Download
Examined Thesis (PDF)
Filename: Zeyu Xing_207056419_CorrectedThesisClean.pdf
Licence:

This work is licensed under a Creative Commons Attribution NonCommercial NoDerivatives 4.0 International License
Export
Statistics
You do not need to contact us to get a copy of this thesis. Please use the 'Download' link(s) above to get a copy.
You can contact us about this thesis. If you need to make a general enquiry, please see the Contact us page.