GLIDE-Net
Full PyTorch checkpoint for Global-Local Interaction and Detail Enhancement Network for RGB-D Rail Surface Defect Detection.
Code and installation instructions: Jerry050512/GLIDE-Net.
Model
GLIDE-Net uses a Transformer–CNN hybrid encoder with a frozen SAM2 Hiera-L backbone and trainable adapters, Cross-Modal Fusion (CMF), and a Multi-Scale Detail Enhancement and Fusion (MSDEF) decoder.
glide_net_6440647.pth contains the complete model state, including the frozen
backbone and batch normalization buffers. It requires no separate SAM2
checkpoint for inference. File size: 968,608,466 bytes.
This is a custom PyTorch model; use the implementation in the linked GitHub
repository to load it.
Download and inference
pip install -U huggingface_hub
hf download jerry050512/GLIDE-Net glide_net_6440647.pth --local-dir checkpoints
git clone https://github.com/Jerry050512/GLIDE-Net.git
cd GLIDE-Net
# Install dependencies as described in the repository README.
python test.py \
--data_path /path/to/NEU-RSDDS-AUG \
--checkpoint /path/to/checkpoints/glide_net_6440647.pth \
--device cpu --cpu_threads 4 --num_workers 0 \
--save_path ./results/pred
python eval.py \
--pred_path ./results/pred \
--gt_path /path/to/NEU-RSDDS-AUG/GT_test
The dataset must contain aligned RGB BMP, depth TIFF and GT PNG files in
Image_test/, Depth_test/ and GT_test/. Use the original dataset inputs,
rather than JPEG/PNG visualization copies. Input resolution is 352×352.
CPU inference is supported; GPU inference is faster.
Results
The original experiment's saved predictions on the 362-image NEU RSDDS-AUG test set yield:
| S-measure | MAE | max-E | max-F |
|---|---|---|---|
| 0.8718 | 0.0501 | 0.9475 | 0.9129 |
max-F uses the maximum of the averaged F-measure curve with beta=0.3; max-E uses the maximum of the averaged E-measure curve. The original experiment used the test split for checkpoint selection.
The checkpoint was selected at epoch 27 and migrated from experiment commit
64406472f9c90dbf30f4ba44115c1e3a62167699 by renaming all 991 state tensors
without changing their values. Three sampled old/release CPU model outputs
matched exactly at all decoder scales. An 85-image CPU check matched historical
prediction metrics at four decimal places; some pixels differed by one uint8
gray level. This is a subset verification, not a full CPU rerun of 362 images.
Intended use and limitations
The model is intended for research on RGB-D rail surface defect segmentation. Performance on other cameras, depth sensors or datasets has not been established. It has not been validated for autonomous safety-critical rail inspection.
License and attribution
Released under Apache-2.0; see LICENSE. The included frozen backbone derives from Meta's SAM2, also Apache-2.0. Copyright (c) Meta Platforms, Inc. and affiliates. All rights reserved. Dataset rights remain with the original dataset authors.
The checksum of the uploaded checkpoint is provided in SHA256SUMS.txt.
Formal citation details will be added after publication.