Journals / Demiryolu Mühendisliği / 2026 / Sayı: 25

Label Scarcity in Rail Surface Defect Detection: Comparison of Unsupervised Anomaly Detection and Supervised Deep Learning Approaches under a Common Protocol

Ray Yüzeyi Kusurlarının Tespitinde Etiket Kıtlığı: Denetimsiz Anomali Tespiti ve Denetimli Derin Öğrenme Yaklaşımlarının Ortak Protokol Altında Karşılaştırılması

Ahmet Akkaya(BANDIRMA ONYEDİ EYLÜL ÜNİVERSİTESİ)0000-0003-4836-2310
Pages
—
Publication Date
2026-09-03
🏛️Bibliographic metadata and full text access for this article are provided via DergiPark.
DergiPark Record ↗
✨

AI Summary & Key Takeaways

AI Insight
⚡ TL;DR(Too Long; Didn't Read)

The results suggest that unsupervised anomaly detection can be a promising alternative under limited labeling budgets, with broader generalization to be tested on more diverse datasets.

📌 3 Key Takeaways

🎯
Objective & Hypothesis:Although deep learning methods achieve high performance in image-based inspection of railway tracks, most of them require a sufficient number of labeled defect samples; in field conditions, however, defective samples are rare and labeling is costly.
📊
Key Findings & Data:In the unsupervised arm, PaDiM, PatchCore, FastFlow and EfficientAD are trained using only healthy images; in the supervised arm, ResNet50, MobileNetV3 and EfficientNet-B0 are trained with 100%, 25% and 10% of the available defect labels.
💡
Conclusion & Impact:The results suggest that unsupervised anomaly detection can be a promising alternative under limited labeling budgets, with broader generalization to be tested on more diverse datasets.
🔬Design:Modeling & Simulation
📍Scope:Comprehensive Sample
⚙️Variables:Ray kusur tespiti · Denetimsiz anomali tespiti · Derin öğrenme

Abstract

Although deep learning methods achieve high performance in image-based inspection of railway tracks, most of them require a sufficient number of labeled defect samples; in field conditions, however, defective samples are rare and labeling is costly. In this study, unsupervised anomaly detection and supervised classification approaches for detecting rail surface and fastener defects are compared under a common protocol in which both families are evaluated on exactly the same test set. In the unsupervised arm, PaDiM, PatchCore, FastFlow and EfficientAD are trained using only healthy images; in the supervised arm, ResNet50, MobileNetV3 and EfficientNet-B0 are trained with 100%, 25% and 10% of the available defect labels. All experiments are repeated with three random seeds, and performance is reported in terms of AUROC, PR-AUC, F1 and MCC together with parameter counts and inference times. The findings show that unsupervised methods reach an AUROC of 0.79 with zero defect labels, and that the superiority of supervised models emerges only at and above the 25% label level. In addition, a prevalence analysis in which the defect ratio of the test set is systematically varied quantifies the misleading nature of the accuracy metric under imbalanced conditions. The results suggest that unsupervised anomaly detection can be a promising alternative under limited labeling budgets, with broader generalization to be tested on more diverse datasets.

Özet

Demiryolu hatlarının görüntü tabanlı muayenesinde derin öğrenme yöntemleri yüksek başarım sağlamakla birlikte, bu yöntemlerin büyük bölümü yeterli sayıda etiketli kusur örneği gerektirmektedir; oysa saha koşullarında kusurlu örnekler nadirdir ve etiketleme maliyetlidir. Bu çalışmada, ray yüzeyi ve bağlantı elemanı kusurlarının tespitinde denetimsiz anomali tespiti ile denetimli sınıflandırma yaklaşımları, birebir aynı test kümesinde ölçüldükleri ortak bir protokol altında karşılaştırılmıştır. Denetimsiz kolda PaDiM, PatchCore, FastFlow ve EfficientAD yöntemleri yalnızca sağlam görüntülerle; denetimli kolda ResNet50, MobileNetV3 ve EfficientNet-B0 mimarileri kusur etiketlerinin %100'ü, %25'i ve %10'u ile eğitilmiştir. Tüm deneyler üç farklı rastgele tohumla tekrarlanmış; başarım AUROC, PR-AUC, F1 ve MCC metrikleriyle birlikte parametre sayısı ve çıkarım süresi üzerinden raporlanmıştır. Bulgular, denetimsiz yöntemlerin sıfır kusur etiketiyle 0,79 AUROC düzeyine ulaştığını ve denetimsiz PatchCore'un %10 etiketli denetimli modellerle denk kaldığını, denetimli üstünlüğün ancak %25 etiket düzeyi ve üzerinde belirginleştiğini göstermektedir. Ayrıca test kümesindeki kusur oranının sistematik olarak değiştirildiği prevalans analiziyle, doğruluk metriğinin dengesiz koşullardaki yanıltıcılığı nicel olarak gösterilmiştir. Sonuçlar, etiket bütçesinin kısıtlı olduğu koşullarda denetimsiz anomali tespitinin umut verici bir alternatif olabileceğine işaret etmektedir.

🔖

Cite This Article

Akkaya, A. (2026). Label Scarcity in Rail Surface Defect Detection: Comparison of Unsupervised Anomaly Detection and Supervised Deep Learning Approaches under a Common Protocol. Demiryolu Mühendisliği, Sayı: 25. https://doi.org/10.47072/demiryolu.2002891

📄 Full Text PDF Viewer

📄

PDF görüntüleyici hazırlanıyor...

References (42)

  1. Q. Li and S. Ren, “A visual detection system for rail surface defects,” IEEE Transactions on Systems, Man, and Cybernetics, Part C (Applications and Reviews), vol. 42, no. 6, pp. 1531–1542, Nov. 2012, doi: 10.1109/TSMCC.2012.2198814
  2. J. Gan, Q. Li, J. Wang, and H. Yu, “A hierarchical extractor-based visual rail surface inspection system,” IEEE Sensors Journal, vol. 17, no. 23, pp. 7935–7944, Dec. 2017, doi: 10.1109/JSEN.2017.2761858
  3. L. Kou, “A review of research on detection and evaluation of the rail surface defects,” Acta Polytechnica Hungarica, vol. 19, no. 3, pp. 167–186, 2022
  4. S. Faghih-Roohi, S. Hajizadeh, A. Núñez, R. Babuska, and B. De Schutter, “Deep convolutional neural networks for detection of rail surface defects,” in 2016 International Joint Conference on Neural Networks (IJCNN), Vancouver, Canada, 2016, pp. 2584–2589
  5. Y. Santur, M. Karaköse, and E. Akın, “A new rail inspection method based on deep learning using laser cameras,” in 2017 International Artificial Intelligence and Data Processing Symposium (IDAP), Malatya, Türkiye, 2017, pp. 1–6
  6. İ. Aydın, E. Akın, and M. Karaköse, “Defect classification based on deep features for railway tracks in sustainable transportation,” Applied Soft Computing, vol. 111, 107706, 2021
  7. M. A. Elmuhammedcebben, İ. Aydın, and M. Sevi, “Demiryolu ortamında nesne tespiti için derin öğrenme yöntemlerinin geliştirilmesi ve Zed kamerası ile mesafe ölçümü,” Demiryolu Mühendisliği, no. 22, pp. 10–24, Jul. 2025, doi: 10.47072/demiryolu.1645019
  8. İ. Aydın, M. Sevi, and E. Akın, “Bulanık modelleme ve CNN-BILSTM ağı kullanılarak ray yüzeyi kusurlarının tespiti ve sınıflandırılması için kararlı iki aşamalı yaklaşım,” Demiryolu Mühendisliği, no. 22, pp. 58–75, Jul. 2025, doi: 10.47072/demiryolu.1719591
  9. S. Uluskan, “Mini drone ile demiryollarında engel ve kurp algılaması için görüntü işlemede doğrusal Hough dönüşümü yaklaşımı,” Demiryolu Mühendisliği, no. 22, pp. 147–158, Jul. 2025
  10. H. He and E. A. Garcia, “Learning from imbalanced data,” IEEE Transactions on Knowledge and Data Engineering, vol. 21, no. 9, pp. 1263–1284, Sep. 2009, doi: 10.1109/TKDE.2008.239
  11. J. M. Johnson and T. M. Khoshgoftaar, “Survey on deep learning with class imbalance,” Journal of Big Data, vol. 6, no. 1, art. 27, 2019
  12. A. Akkaya, “Aşırı sınıf dengesizliği altında ince doğrusal yapıların segmentasyonu: Demiryolu veri setlerinde doğruluk paradoksu ve mimari verimlilik,” Demiryolu Mühendisliği, no. 24, Apr. 2026, doi: 10.47072/demiryolu.1910383
  13. D. Chicco and G. Jurman, “The advantages of the Matthews correlation coefficient (MCC) over F1 score and accuracy in binary classification evaluation,” BMC Genomics, vol. 21, art. 6, 2020, doi: 10.1186/s12864-019-6413-7
  14. T. Saito and M. Rehmsmeier, “The precision-recall plot is more informative than the ROC plot when evaluating binary classifiers on imbalanced datasets,” PLOS ONE, vol. 10, no. 3, e0118432, Mar. 2015, doi: 10.1371/journal.pone.0118432
  15. L. Ruff et al., “A unifying review of deep and shallow anomaly detection,” Proceedings of the IEEE, vol. 109, no. 5, pp. 756–795, May 2021, doi: 10.1109/JPROC.2021.3052449
  16. G. Pang, C. Shen, L. Cao, and A. van den Hengel, “Deep learning for anomaly detection: A review,” ACM Computing Surveys, vol. 54, no. 2, art. 38, Mar. 2021, doi: 10.1145/3439950
  17. P. Bergmann, M. Fauser, D. Sattlegger, and C. Steger, “MVTec AD – A comprehensive real-world dataset for unsupervised anomaly detection,” in IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Long Beach, CA, USA, Jun. 2019, pp. 9592–9600, doi: 10.1109/CVPR.2019.00982
  18. T. Defard, A. Setkov, A. Loesch, and R. Audigier, “PaDiM: A patch distribution modeling framework for anomaly detection and localization,” in Pattern Recognition. ICPR International Workshops and Challenges, 2021, pp. 475–489, Springer
  19. K. Roth, L. Pemula, J. Zepeda, B. Schölkopf, T. Brox, and P. Gehler, “Towards total recall in industrial anomaly detection,” in IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), New Orleans, LA, USA, Jun. 2022, pp. 14318–14328, doi: 10.1109/CVPR52688.2022.01392
  20. J. Yu et al., “FastFlow: Unsupervised anomaly detection and localization via 2D normalizing flows,” 2021, arXiv:2111.07677
  21. K. Batzner, L. Heckler, and R. König, “EfficientAD: Accurate visual anomaly detection at millisecond-level latencies,” in IEEE/CVF Winter Conference on Applications of Computer Vision (WACV), Waikoloa, HI, USA, Jan. 2024, pp. 128–138, doi: 10.1109/WACV57701.2024.00020
  22. S. Akcay, D. Ameln, A. Vaidya, B. Lakshmanan, N. Ahuja, and U. Genc, “Anomalib: A deep learning library for anomaly detection,” in IEEE International Conference on Image Processing (ICIP), Bordeaux, France, 2022, pp. 1706–1710
  23. K. He, X. Zhang, S. Ren, and J. Sun, “Deep residual learning for image recognition,” in IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, Jun. 2016, pp. 770–778, doi: 10.1109/CVPR.2016.90
  24. A. Howard et al., “Searching for MobileNetV3,” in IEEE/CVF International Conference on Computer Vision (ICCV), Seoul, South Korea, Oct. 2019, pp. 1314–1324
  25. M. Tan and Q. Le, “EfficientNet: Rethinking model scaling for convolutional neural networks,” in International Conference on Machine Learning (ICML), Long Beach, CA, USA, Jun. 2019, pp. 6105–6114, PMLR
  26. J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei, “ImageNet: A large-scale hierarchical image database,” in IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Miami, FL, USA, Jun. 2009, pp. 248–255
  27. H. Zhang, X. Jin, Q. M. J. Wu, Y. Wang, Z. He, and Y. Yang, “Automatic visual detection system of railway surface defects with curvature filter and improved Gaussian mixture model,” IEEE Transactions on Instrumentation and Measurement, vol. 67, no. 7, pp. 1593–1608, Jul. 2018
  28. M. Nieniewski, “Morphological detection and extraction of rail surface defects,” IEEE Transactions on Instrumentation and Measurement, vol. 69, no. 9, pp. 6870–6879, Sep. 2020, doi: 10.1109/TIM.2020.2975454
  29. L. Zhuang, H. Qi, and Z. Zhang, “The automatic rail surface multi-flaw identification based on a deep learning powered framework,” IEEE Transactions on Intelligent Transportation Systems, vol. 23, no. 8, pp. 12133–12143, Aug. 2022
  30. Y. Wu, Y. Qin, Y. Qian, F. Guo, Z. Wang, and L. Jia, “Hybrid deep learning architecture for rail surface segmentation and surface defect detection,” Computer-Aided Civil and Infrastructure Engineering, vol. 37, no. 2, pp. 227–244, 2022
  31. O. Zendel, M. Murschitz, M. Zeilinger, D. Steininger, S. Abbasi, and C. Beleznai, “RailSem19: A dataset for semantic rail scene understanding,” in IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), Long Beach, CA, USA, Jun. 2019, pp. 1221–1229
  32. M. Dursunlar and Z. Taş, “Ray bağlantı elemanlarının deneysel ve yapay zekâ destekli korozyon direncinin incelenmesi,” Demiryolu Mühendisliği, no. 21, pp. 83–95, Jan. 2025, doi: 10.47072/demiryolu.1582533
  33. D. F. Çömez and Ö. Akbayır, “Elle taşlama yöntemiyle rayların yüzey kusurlarının iyileştirilmesi ve profil düzeltilmesi: Uygulama sonuçları,” Demiryolu Mühendisliği, no. 23, pp. 49–59, Jan. 2026, doi: 10.47072/demiryolu.1829770
  34. S. Akcay, A. Atapour-Abarghouei, and T. P. Breckon, “GANomaly: Semi-supervised anomaly detection via adversarial training,” in Asian Conference on Computer Vision (ACCV), Perth, Australia, 2018, pp. 622–637, Springer
  35. N. Cohen and Y. Hoshen, “Sub-image anomaly detection with deep pyramid correspondences,” 2020, arXiv:2005.02357
  36. M. Rudolph, B. Wandt, and B. Rosenhahn, “Same same but DifferNet: Semi-supervised defect detection with normalizing flows,” in IEEE/CVF Winter Conference on Applications of Computer Vision (WACV), Jan. 2021, pp. 1907–1916
  37. J. Jeong, Y. Zou, T. Kim, D. Zhang, A. Ravichandran, and O. Dabeer, “WinCLIP: Zero-/few-shot anomaly classification and segmentation,” in IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Vancouver, Canada, Jun. 2023, pp. 19606–19616
  38. S. S. Kırat and İ. Aydın, “Açıklanabilir yapay zekâ tabanlı denetimsiz öğrenme ile ray kusur tespiti,” Demiryolu Mühendisliği, no. 18, pp. 1–13, Jan. 2023, doi: 10.47072/demiryolu.1231751
  39. M. Niu, K. Song, L. Huang, Q. Wang, Y. Yan, and Q. Meng, “Unsupervised saliency detection of rail surface defects using stereoscopic images,” IEEE Transactions on Industrial Informatics, vol. 17, no. 3, pp. 2271–2281, Mar. 2021, doi: 10.1109/TII.2020.3004397
  40. S. Eunus, “Railway track fault detection,” Kaggle, 2021. [Online]. Available: https://www.kaggle.com/datasets/salmaneunus/railway-track-fault-detection [Accessed July 17, 2026]
  41. I. Loshchilov and F. Hutter, “Decoupled weight decay regularization,” in International Conference on Learning Representations (ICLR), New Orleans, LA, USA, 2019, arXiv:1711.05101
  42. A. Adnan, S. Hossain, R. Shihab, and S. Ibne, "Railway track fault detection dataset-2 (fastener)," Kaggle, 2021. [Online]. Available: https://www.kaggle.com/datasets/ashikadnan/railway-track-fault-detection-dataset2fastener [Accessed Agu. 22, 2026]. İlişkili yayın: S. I. Eunus et al., "ECARRNet: An efficient LSTM-based ensembled deep neural network architecture for railway fault detection," AI, vol. 5, no. 2, pp. 482–503, 2024, doi: 10.3390/ai5020024