Streaming 3DFMs need a harness. A strong model matters. So does how we use it.
Map2SLAM schedules a frozen streaming 3D foundation model (LingBot-Map) to track the present and re-observe the past, enabling real-time SLAM with revisable state while encoding each image only once.
kitti05-system-web.mp4
Requirements: Linux with 1 or 2 CUDA-capable NVIDIA GPUs (24 GB+ VRAM per GPU), Python 3.11, PyTorch 2.5.1 (cu121), CUDA toolkit 12.8, and GPU compute capabilities 8.9 (sm89) or 9.0 (sm90). Build tools required: cmake, ninja, git, curl, a C++ compiler, and Boost development libraries.
Run the following commands from the repository root.
conda env create -f environment.yml
conda activate map2slam
pip install -e '.[eval,viz]'Set CUDA_HOME and PATH to your CUDA toolkit location, then build SageAttention and the GTSAM/RiSAM bindings:
CUDA_HOME=/usr/local/cuda-12.8 \
PATH=/usr/local/cuda-12.8/bin:$PATH \
bash scripts/install/build_sage_attention.sh
bash scripts/install/build_gtsam_bindings.shmap2slam verifyThis checks the environment, bundled retrieval head, and native extensions.
The default LingBot-Map checkpoint (robbyant/lingbot-map) is downloaded automatically from Hugging Face Hub on the first run and cached locally.
Run on your own video or image folder (no camera calibration required):
CUDA_VISIBLE_DEVICES=0,1 map2slam run \
--config configs/generic.yaml \
--input /path/to/frames-or-video \
--output outputs/my-sequenceRun on a benchmark sequence (e.g., KITTI Odometry sequence 05):
CUDA_VISIBLE_DEVICES=0,1 map2slam run \
--config configs/kitti.yaml \
--set dataset.root=/path/to/kitti/dataset \
--set dataset.sequence=05 \
--output outputs/kitti/05- Single GPU vs. Dual GPU: Use
CUDA_VISIBLE_DEVICES=0to run on a single GPU, orCUDA_VISIBLE_DEVICES=0,1for dual-GPU execution (recommended for higher throughput). - Overrides: Pass
--set KEY.SUB=VALUEto override any YAML field (e.g.,--set dataset.target_fps=15for video inputs).
Each run writes:
outputs/kitti/05/
config.yaml # Effective configuration
trajectory.csv # Camera-to-world poses for all input frames
reference.csv # Reference poses, when available
keyframes/ # Poses, intrinsics, RGB, depth, and confidence
run.json # Frame counts, tracking FPS, and computation time
For each dataset, use the corresponding configuration with dataset.root and dataset.sequence set to your downloaded data.
Download the color images, timestamps, and reference poses from the
official dataset.
Use configs/kitti.yaml with this layout:
dataset/
sequences/05/
image_2/000000.png ...
times.txt
poses/05.txt
Set dataset.root=dataset/ and select a sequence with --set dataset.sequence=XX.
The evaluation set contains sequences 00β10.
Download the processed RGB archive
provided by LoGeR.
Use configs/vbr.yaml with this layout:
vbr/
campus_train1_processed_aligned/
rgb/*.png
camera_pose.txt
Set dataset.root=vbr/ and dataset.sequence to the sequence name, such as campus_train1.
Download calibration files and sequences from the official dataset:
oxford_spires_dataset/
calibration/cam0.yaml
calibration/cam-lidar-imu.yaml
sequences/2024-03-12-keble-college-02/
raw/images.zip
processed/trajectory/gt-tum.txt
ground_truth_map/ # Optional, for point-cloud evaluation
Prepare the dataset for configs/oxford.yaml (dataset.root=data/oxford):
# Images and poses
python scripts/data/prepare_oxford.py \
--dataset-dir /path/to/oxford_spires_dataset \
--output-dir data/oxford
# With GT point clouds and valid masks
python scripts/data/prepare_oxford.py \
--dataset-dir /path/to/oxford_spires_dataset \
--output-dir data/oxford \
--with-gt-geometryEvaluate a single run:
map2slam eval outputs/kitti/05Run and evaluate a full benchmark suite:
# KITTI
CUDA_VISIBLE_DEVICES=0,1 python scripts/benchmark.py kitti /path/to/kitti/dataset outputs/kitti-exp
map2slam eval outputs/kitti-exp
# VBR
CUDA_VISIBLE_DEVICES=0,1 python scripts/benchmark.py vbr /path/to/vbr outputs/vbr-exp
map2slam eval outputs/vbr-exp
# Oxford Spires
CUDA_VISIBLE_DEVICES=0,1 python scripts/benchmark.py oxford data/oxford outputs/oxford-exp
map2slam eval outputs/oxford-expPass --gt-cloud (single run) or --gt-cloud-dir (benchmark batch) to evaluate dense map geometry. map2slam eval automatically uses valid_masks/ beside each ground-truth cloud when present.
# Single run
map2slam eval outputs/oxford/keble-college-05 --gt-cloud data/oxford/keble-college-05/ground_truth.ply
# Full benchmark (runs SLAM + evaluates both trajectory and point clouds)
CUDA_VISIBLE_DEVICES=0,1 python scripts/benchmark.py oxford data/oxford outputs/oxford-exp --gt-cloud-dir data/oxford
map2slam eval outputs/oxford-exp
# Or evaluate point clouds on an existing benchmark output without re-running SLAM
map2slam eval outputs/oxford-exp --gt-cloud-dir data/oxfordPlot the aligned trajectory and the reconstructed 3D scene from a completed run:
mkdir -p figures
map2slam plot trajectory \
--run outputs/kitti/05 \
--output figures/kitti05-trajectory.png
map2slam plot scene \
--run outputs/kitti/05 \
--output figures/kitti05-map.pngUse record instead of run to capture online trajectory and map updates:
CUDA_VISIBLE_DEVICES=0,1 map2slam record \
--config configs/kitti.yaml \
--set dataset.root=/path/to/kitti/dataset \
--set dataset.sequence=05 \
--output outputs/kitti/05-recordedRender the system replay and trajectory animation:
mkdir -p videos
map2slam viz system \
--run outputs/kitti/05-recorded \
--output videos/kitti05-system.mp4 \
--speed 1 \
--fps 30
map2slam viz trajectory \
--run outputs/kitti/05-recorded \
--output videos/kitti05-trajectory.mp4 \
--duration 10kitti05-trajectory.mp4
KITTI05 trajectory evolution over 10 seconds of frame progress.
Use profile instead of run to record component activity and GPU memory, then plot the timeline:
CUDA_VISIBLE_DEVICES=0,1 map2slam profile \
--config configs/kitti.yaml \
--set dataset.root=/path/to/kitti/dataset \
--set dataset.sequence=05 \
--output outputs/kitti/05-profile
mkdir -p figures
map2slam plot profile \
--run outputs/kitti/05-profile \
--output figures/kitti05-profile.pngUse map2slam run when measuring throughput, as record and profile add logging overhead.
How do I use a local or offline checkpoint?
- Offline (cached): Set
HF_HUB_OFFLINE=1to reuse the cachedrobbyant/lingbot-mapcheckpoint without network access. - Local file: Pass
--set model.checkpoint_path=/path/to/lingbot-map.pt. - Alternate Hub file: Pass
--set model.checkpoint_path=robbyant/lingbot-map:<filename>.
How do I reduce CPU memory usage?
The default memory mode keeps historical data in CPU RAM. For long sequences on memory-constrained machines, switch to file mode:
--set runtime.storage_mode=fileThis stores historical features, images, and dense observations in temporary files on disk and cleans them up automatically after the run. Use a local SSD (override the temporary directory with --set runtime.cache_dir=/path/to/ssd).
If you find Map2SLAM useful in your research, please cite:
@article{gao2026map2slam,
title = {Map2SLAM: From Streaming Map Prediction to Real-Time SLAM},
author = {Jian Gao and Lin-Zhuo Chen and Yihang Chen and Jiagang Chen and Jiacheng Dong and Xun Cao and Nan Xue and Yinghao Xu and Yao Yao},
journal = {arXiv preprint arXiv:2611.11169},
year = {2026}
}We thank the authors of LingBot-Map, SALAD, SageAttention, GTSAM, and evo for making their work available.
Project contributions use Apache-2.0. Third-party components retain their own licenses, including GPL-3.0-only for the adapted SALAD source and CC-BY-NC-SA-4.0 for the Oxford visibility filter. See Third-Party Notices for attribution and terms.



