Object-Aware Heatmap Refinement for Railway Train Foreign- Object Inspection Using Compact PatchBank Anomaly Scoring

Foreign objects attached to railway train components can threaten operational safety. Fully supervised detectors can localize such objects accurately when sufficient box-level annotations are available. However, foreign objects are sparse, diverse, and component-dependent, so training annotations rarely cover all of their appearances. Heatmap-based anomaly detection offers a way to use normal samples for industrial inspection. Yet raw anomaly heatmaps often highlight suspicious regions without capturing object extent, leading to oversized, fragmented, or background-driven boxes. This paper proposes a two-stage visual inspection method for railway train component images. First, a compact DINOv2 PatchBank estimates image-level anomaly scores and produces spatial anomaly heatmaps using a small normal reference bank. Second, an object-aware heatmap refiner, trained with foreign-object box annotations, combines the anomaly heatmap with the RGB component image to convert patch-level responses into foreground masks and bounding boxes. Experiments on a five-component railway train foreign-object inspection dataset under source-image-grouped five-fold cross-validation with internal validation show that the proposed PatchBank classifier achieves 0.9875 macro ROC AUC, 0.9867 macro PR AUC, and 0.9475 macro F1. For object-level localization, direct heatmap-to-box conversion performs poorly, whereas the proposed RGB-guided refiner reaches 0.981 AP0.5 and 0.504 AP[0.5:0.95] with a low false-positive rate on normal images; a fully supervised YOLOv8m reaches 0.994 and 0.907 and still gives tighter boxes. The input ablation shows that, compared with RGB-only input, the combined input localizes objects better at stricter IoU thresholds and gives fewer false detections on normal images. On 500 synthetic foreign objects with unfamiliar appearances, the refiner reaches 0.384 AP0.5 with a recall of 0.366, whereas YOLOv8m detects almost none of them. The results suggest that object-aware heatmap refinement is an effective bridge between anomaly scoring and practical foreign-object detection in railway train component inspection.

Authors

Institutions

Publication Details

Journal
Information
Published
2026-11-10
DOI
https://doi.org/10.3390/info17111126
Primary Topic
Industrial Vision Systems and Defect Detection
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

Object-Aware Heatmap Refinement for Railway Train Foreign- Object Inspection Using Compact PatchBank Anomaly Scoring

Yao Li, Ji Qiu, Ruijie Yang, Tianyi Chen et al.
Information
Industrial Vision Systems and Defect Detection
article

Object-Aware Heatmap Refinement for Railway Train Foreign- Object Inspection Using Compact PatchBank Anomaly Scoring

Yao Li, Ji Qiu, Ruijie Yang, Tianyi Chen, Kang Wang, Xiaodong Sun, Hongmei Shi
article en

Abstract

Foreign objects attached to railway train components can threaten operational safety. Fully supervised detectors can localize such objects accurately when sufficient box-level annotations are available. However, foreign objects are sparse, diverse, and component-dependent, so training annotations rarely cover all of their appearances. Heatmap-based anomaly detection offers a way to use normal samples for industrial inspection. Yet raw anomaly heatmaps often highlight suspicious regions without capturing object extent, leading to oversized, fragmented, or background-driven boxes. This paper proposes a two-stage visual inspection method for railway train component images. First, a compact DINOv2 PatchBank estimates image-level anomaly scores and produces spatial anomaly heatmaps using a small normal reference bank. Second, an object-aware heatmap refiner, trained with foreign-object box annotations, combines the anomaly heatmap with the RGB component image to convert patch-level responses into foreground masks and bounding boxes. Experiments on a five-component railway train foreign-object inspection dataset under source-image-grouped five-fold cross-validation with internal validation show that the proposed PatchBank classifier achieves 0.9875 macro ROC AUC, 0.9867 macro PR AUC, and 0.9475 macro F1. For object-level localization, direct heatmap-to-box conversion performs poorly, whereas the proposed RGB-guided refiner reaches 0.981 AP0.5 and 0.504 AP[0.5:0.95] with a low false-positive rate on normal images; a fully supervised YOLOv8m reaches 0.994 and 0.907 and still gives tighter boxes. The input ablation shows that, compared with RGB-only input, the combined input localizes objects better at stricter IoU thresholds and gives fewer false detections on normal images. On 500 synthetic foreign objects with unfamiliar appearances, the refiner reaches 0.384 AP0.5 with a recall of 0.366, whereas YOLOv8m detects almost none of them. The results suggest that object-aware heatmap refinement is an effective bridge between anomaly scoring and practical foreign-object detection in railway train component inspection.

InformationVol. 17(11)
Shanghai Medical College of Fudan University (CN), Beijing Jiaotong University (CN), Fudan University (CN), University of Malaya (MY), Zhejiang University (CN)
Industrial Vision Systems and Defect Detection
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon