Practical overview
When it fits
Use Sam Road when a research or mapping workflow needs road-network graphs from aerial imagery and can provide the required GPU, checkpoint and dataset setup.
Who it is for
- Remote-sensing and computer-vision researchers working on road extraction
- Mapping teams exploring graph-based road-network extraction from aerial imagery
- Developers who can run Python model code with a CUDA-capable Nvidia GPU
Documented uses
- Train a road-extraction model on CityScale or SpaceNet data.
- Produce road-network graph predictions, masks and visualizations from aerial imagery.
- Evaluate road-network outputs using APLS and TOPO.
Requirements & limits
The repository is public and lists an MIT license. The code is run in a local or server environment; the documented requirements include an Nvidia GPU with CUDA.
- The documented installation requires an Nvidia GPU with CUDA and its driver.
- Training and inference depend on a ViT-B SAM checkpoint and prepared CityScale or SpaceNet data.
- The README specifies Go for APLS evaluation; this requirement is separate from the stated model inference command.
- The workflow uses PyTorch, PyTorch Lightning and Weights & Biases.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Run inference with a prepared checkpoint
Generate road-network inference results and visualizations from a prepared dataset workflow.
Before you start
- The Sam Road codebase and its documented PyTorch dependencies
- An Nvidia GPU with CUDA and driver
- A prepared dataset and a trained or otherwise available checkpoint
- The configuration corresponding to the checkpoint
Steps
Select the configuration used for training, such as config/toponet_vitb_512_cityscale.yaml or config/toponet_vitb_256_spacenet.yaml.
Run python inferencer.py --config=path_to_the_same_config_for_training --checkpoint=path_to_ckpt, replacing the placeholders with the matching configuration and checkpoint paths.
Expected outcome
Inference results and visualizations are saved by the script.
Guide limitations
- The README requires the configuration to match the training workflow.
- The command assumes the checkpoint and dataset setup are already available.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 16 October 2026
- Original website title
- htcr/sam_road · Official homepage title · retained in its source language

