UG-Net: An Unsupervised-Guided Framework for Railway Foreign Object Detection
Zhuowen Tian, Jinbai Zou · Applied Sciences · 2026
Foreign object intrusion severely threatens railway safety. Existing methods struggle with open-set categories, high annotation costs, and poor label-efficient generalization. To address these issues, we propose UG-Net, an unsupervised-guided label-efficient detection framework. The core idea is a two-stage strategy: first, a masked autoencoder (MAE) learns “normality” priors from unlabeled data and generates a spatial attention mask via a deep feature difference strategy; then, this mask is fused as a fourth channel into a lightweight YOLOv8n detector. This approach effectively alleviates reliance on manual annotations. On a self-constructed railway dataset, UG-Net achieved 94.56% [email protected] using only 200 labeled samples, significantly outperforming the YOLOv8n baseline (86.91%). The framework provides a label-efficient solution for industrial anomaly detection.