OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Models

Sam Road

Sam Road is an open-source Python computer-vision codebase built around Segment Anything Model for extracting road-network graphs and masks from aerial imagery. It includes workflows for training on CityScale or SpaceNet, running inference, and evaluating results with APLS and TOPO metrics.

Independent OpenViST project profile, based on linked sources.

Sam Road — OpenViST project profile in AI Models.
OpenViST project illustration. See the linked sources for product details.
Understand the project

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.
Before you choose

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.

Source-based practical guide

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

  1. Select the configuration used for training, such as config/toponet_vitb_512_cityscale.yaml or config/toponet_vitb_256_spacenet.yaml.

  2. 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.
Evidence and transparency

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