AI Card Bao AICARDBAO.COM
Home / 开源 / LingBot-Map 2.0
AI TOOL / #12869

LingBot-Map 2.0

The geometric streaming basic model open-sourced by Robbyant allows for the estimation of pose and the construction of 3D maps simply by inputting video data, effectively mitigating the issue of cumulative drift during robot movement.

Introduction

LingBot-Map 2.0 · Geometric Streaming Base Model (without GCR)

Robbyant Team

📰 News

  • 2026-11-30 — Launched the online interactive demo on Hugging Face Spaces.
  • 2026-11-23 — Added the evaluation benchmark with dataset preparation and evaluation instructions.
  • 2026-11-21 — Released the causal streaming inference code. See Quick Start to load the Geometric Streaming Base Model.

https://github.com/user-attachments/assets/57b41dfa-0281-4b09-8b57-e2cddf8cb659

Watch the 1080p demo on Hugging Face


🗺️ Meet LingBot-Map 2.0!

LingBot-Map 2.0 predicts camera poses and dense geometry from incoming RGB sequences. This repository provides the geometric streaming base model (without GCR) from the technical report, trained for causal Online Streaming.

  • Streaming Reconstruction: Predict camera poses, intrinsics, depth and confidence from incoming RGB frames.
  • Flexible Integration: Run reconstruction from the command line or integrate frame-by-frame inference and keyframe selection into your application.

Compared to LingBot-Map (V1), LingBot-Map 2.0 substantially reduces long-trajectory drift in causal online streaming across multi-kilometer benchmarks (sequence-averaged Sim(3)-aligned ATE (m) ↓, Technical Report Table 2):

MethodSettingKITTI (m) ↓VBR (m) ↓Oxford Spires (m) ↓
VGGT-ΩOffline122.1965.6510.11
LingBot-Map (V1)Streaming24.0731.128.25
LingBot-Map 2.0 (Online Streaming)Streaming17.5617.016.17

Sequence-averaged Sim(3)-aligned ATE (m, lower is better) from Table 2 of the technical report across all 11 KITTI, 7 VBR, and 10 Oxford Spires full-timeline trajectories (VGGT-Ω is evaluated on Uniform480 keyframes with interpolation; LingBot-Map 2.0 (Online Streaming) corresponds to Ours (Online) under causal online inference).


📑 Table of Contents

Click to expand

  • News
  • Demo Video
  • TODO
  • Installation
  • Quick Start
  • Example Code
  • Interactive Demo (demo.py)
  • Streaming Inference (infer.py)
  • Benchmarks
  • Resources
  • Manual Checkpoint Download (Optional)
  • License
  • Citation
  • Acknowledgments

📋 TODO

  • ✅ Release model weights
  • ✅ Release streaming inference code
  • ✅ Release interactive demos and example sequences
  • ✅ Release evaluation benchmarks

⚙️ Installation

1. Create a conda environment

conda create -n lingbot-map2 python=3.11 -y
conda activate lingbot-map2

2. Install PyTorch (CUDA 12.8)

A BF16-capable CUDA GPU and PyTorch 2.8 or later are required. For a CUDA 12.8 environment:

pip install torch==2.8.0 --index-url https://download.pytorch.org/whl/cu128

3. Install the LingBot-Map 2.0 Geometric Streaming Base Model

Clone or download this repository, then run from its root directory:

pip install -e .

FlashInfer is included in the package dependencies declared in pyproject.toml. If your package mirror does not carry it, install it with pip install --index-url https://pypi.org/simple flashinfer-python before installing this package.

4. Install benchmark dependencies (optional)

pip install -e ".[benchmark]"

5. Install visualization dependencies (optional)

pip install -e ".[vis]"

This installs the CPU build of ONNX Runtime for sky segmentation. To run --mask-sky on CUDA, replace it with the GPU build in the same environment after installing .[vis]:

python -m pip uninstall -y onnxruntime
python -m pip install onnxruntime-gpu
python -c "import onnxruntime as ort; print(ort.get_available_providers())"

Look for CUDAExecutionProvider in the output. See the ONNX Runtime CUDA requirements for compatible CUDA and cuDNN versions.


🚀 Quick Start

Start with GCRStream.from_pretrained() to load the released model from Hugging Face. The first load downloads the configuration and Safetensors weights. Subsequent loads reuse the Hub cache. For offline use after the first download, pass local_files_only=True.

Example Code

Run the Geometric Streaming Base Model on a folder containing at least eight RGB images in capture order. Streaming inference requires a BF16-capable CUDA GPU.

from lingbot_map2 import GCRStream
from lingbot_map2.utils.load_fn import image_paths, uniform_keyframe_ids

# Setup
model = GCRStream.from_pretrained("robbyant/lingbot-map-v2-base-streaming").to("cuda").eval()

# Load images in natural filename order and select frames for the KV cache.
paths = image_paths("path/to/rgb", None)
keyframes = set(uniform_keyframe_ids(len(paths), prefix=model.config.scale_frames))

# Run online inference on every image.
with model.create_stream() as stream:
    for index, path in enumerate(paths):
        prediction = stream.online(path, persistent=index in keyframes)
        if prediction is None:
            continue  # The first seven frames are buffered for initialization.
        poses = prediction["poses_c2w"]
        depth = prediction["depth"]
        print(poses.shape, depth.shape)

The eighth call returns poses and depth maps for the first eight frames. Each subsequent call returns one frame. Predictions also include intrinsics and depth_conf. See Inputs and Outputs for shapes and coordinate conventions.

Command Line

Run streaming reconstruction on a folder of RGB images. The CLI loads the released model from the Hugging Face Hub by default.

python infer.py \
    --images path/to/rgb \
    --output outputs/sequence

Images are processed in natural filename order. The CLI retains Uniform320 keyframes while predicting every input frame; --keyframe-interval 1 retains every frame. Predictions include original raw_indices and are saved as .npz files containing poses, intrinsics, depth and confidence, alongside a run manifest. Use --image-list frames.json to supply an explicit input order.


🖥️ Interactive Demo (demo.py)

Online Demo: Try LingBot-Map 2.0 directly in your browser on Hugging Face Spaces without local setup.

To run the Viser demo locally, first install the viewer dependencies. For faster sky masking on long sequences, follow the CUDA setup in that step.

python demo.py \
    --images path/to/rgb --mask-sky

Open http://localhost:8080. The viewer mirrors LingBot-Map's interactive Viser interface: Video Display (current RGB frame preview), Reset up direction, Reset Defaults, and Reset View Direction presets (Look At Scene Center, Overview, Front/Back/Top/Left/Right, First Camera), 3D / 4D mode switching, Playback timeline and FPS controls, display sliders (Focal Length, Point Size, Camera Size, Downsample Factor, Show Camera, Visibility Threshold, Camera Downsample Factor), Screenshot, Export GLB (Points/Spheres with optional cameras and trajectory), and Video Saving (FFmpeg export of point cloud and original RGB videos; pip install -e ".[vis]" bundles imageio-ffmpeg, or a system ffmpeg binary on PATH is used if available). The viewer stays open until you press Ctrl+C in the terminal.

Example reconstructions

Online streaming reconstructions produced by demo.py:

Courthouse

University

The Bund

Apartment

KITTI 08

Oxford Keble College 05

Your image sequences

The four original example sequences are documented in example/: courthouse, university, bund, and apartment (1,570 images, 0.918 GiB). Download the original images from the Hugging Face example dataset. View all-time dataset downloads.

pip install -U huggingface_hub
hf download robbyant/lingbot-map-v2-examples --repo-type dataset \
    courthouse.tar university.tar bund.tar apartment.tar --local-dir example
(cd example && for scene in courthouse university bund apartment; do tar -xf "$scene.tar" || exit 1; done)

KITTI 08 and Oxford Keble College 05 are two additional long-trajectory examples built from official datasets. For KITTI, extract the fixed frames from the official ZIP. For Oxford, download the ready-to-use keyframes:

# KITTI 08 (321 preselected keyframes)
python example/prepare_kitti08.py /path/to/data_odometry_color.zip
python demo.py --images example/kitti08 \
    --width 512 --height 288 --keyframe-interval 1 --depth-stride 1

# Oxford Keble College 05 (320 preselected keyframes from the 11,544-frame sequence)
hf download robbyant/lingbot-map-v2-examples --repo-type dataset oxford_keble_college_05.tar --local-dir example
tar -xf example/oxford_keble_college_05.tar -C example
python demo.py --images example/oxford_keble_college_05 \
    --width 512 --height 384 --keyframe-interval 1 --depth-stride 1 --mask-sky

The interval of 1 retains every supplied keyframe. See the example README for the ordered manifest, image checksums and attribution.

Use --images path/to/rgb for your own image folder, or provide an ordered list with --image-list frames.json. --model_path and --image_folder are accepted aliases. demo.py uses the same preprocessing as infer.py and caps persistent KV-cache keyframes with --num-keyframes (default 320, keeping the initialization prefix plus uniformly spaced frames through the final frame so non-keyframes are predicted without entering the KV cache; inputs with up to 320 frames keep all frames, while setting --num-keyframes equal to the 8-frame initialization prefix retains only the initialization frames). Pass --keyframe-interval to use a fixed interval instead.

View saved predictions

You can also display a completed infer.py run without loading a model or using CUDA:

python demo.py --predictions outputs/sequence --mask-sky

The run must include depth and its original images must remain accessible at the paths recorded in manifest.json. The viewer uses the recorded processed image size to align RGB colors with predicted depth.

Display options

  • Point cloud. Increase --conf-threshold (default 1.5) to hide low-confidence points. By default, --downsample-factor 10 shows every tenth remaining point. Adjust marker sizes with --point-size (default 0.00001) and --camera-size (default 0.01).
  • Depth display. --depth-stride N displays depth from every Nth frame (default 1). Camera poses and RGB previews are shown for every frame.
  • Sky masking. --mask-sky uses CUDA when the ONNX Runtime GPU provider is available and falls back to CPU otherwise. Use --sky-cpu to save GPU memory at the cost of speed.
  • Low GPU memory. The demo automatically enables --low-vram to keep the KV cache on CPU. Use --no-low-vram to override it.

For a remote demo, forward the default port and open http://localhost:8080 locally.

ssh -L 8080:127.0.0.1:8080 user@host

🎬 Streaming Inference (infer.py)

Select an Input Sequence

Use --images for a naturally sorted image folder, or provide a JSON list of image paths with --image-list:

python infer.py \
    --image-list frames.json \
    --output outputs/sequence

Relative image paths in the list are resolved against the JSON file. Use a new output directory for each run.

Streaming with Keyframes

After initialization, choose whether each frame enters persistent memory:

prediction = stream.online(rgb_frame, persistent=is_keyframe)

All initialization frames must be keyframes. For an external selector:

with model.create_stream() as stream:
    for rgb, is_keyframe in arrivals:
        prediction = stream.online(rgb, persistent=not stream.ready or is_keyframe)
        if prediction is not None:
            consume(prediction)

After initialization, non-keyframes produce predictions without changing persistent KV, Camera state or the committed clock. frame_indices identifies committed positions, so a non-keyframe position can be reused by the next arrival. Keep raw input IDs in the caller; the CLI records these separately as raw_indices.

One active stream owns a model. Use the context manager or stream.close() to release its state; the synchronous API is not thread-safe. Closing before the full prefix arrives discards the pending frames.

Inference Options

ArgumentDefaultDescription
--checkpointHugging Face HubOptional local model weights
--config.json for local weightsMatching configuration when using --checkpoint
--width, --heightFrom configurationInput size; each dimension must be divisible by 16
--devicecuda:0Inference device
--compile / --no-compileEnabledCompiled or eager streaming computation
--depth / --no-depthEnabledInclude depth and confidence, or return pose-only outputs
--keyframe-intervalceil(N/320)Retain the prefix, then every N-th frame; all frames produce outputs
--max-framesFrom configurationMaximum number of persistent frames

The example configuration uses 512×288 input, an eight-frame prefix and a 64-frame sliding window. Image paths and RGB arrays are resized and center-cropped automatically.

Inputs and Outputs

stream.online() accepts one image path, an HWC uint8 RGB array, or a preprocessed float32 [3,H,W] tensor. Paths and RGB arrays use float32 AREA cover-resize, center crop and division by 255. Tensor inputs must already contain RGB values in [0,1] at the configured size. Width and height must be positive multiples of 16; changing the aspect ratio changes the crop and field of view.

FieldShapeMeaning
poses_c2w[N,4,4]Camera-to-world poses
intrinsics[N,3,3]Intrinsics for the processed image size
pose_enc[N,9]Translation, quaternion and field-of-view encoding
depth[N,H,W,1]Depth, when enabled
depth_conf[N,H,W]Depth confidence, when enabled
frame_indices[N]Committed-clock positions

N is the prefix size on initialization and one afterward. Coordinates use x-right, y-down, z-forward. Depth and translation have arbitrary scene scale. Outputs are owned CPU NumPy arrays by default; use model.create_stream(output_device="cuda") for device tensors. Returned storage remains valid across subsequent arrivals. Use load_model(..., depth=False) for pose-only inference.

The CLI saves one .npz per prediction group, using raw input positions in filenames. progress.json tracks written frames; manifest.json records source paths, persistent raw IDs and completed outputs on completion or a caught failure. Existing output directories are rejected to prevent overwriting predictions.


📊 Benchmarks

Evaluate the geometric streaming base model on the datasets used in the technical report:

TaskDatasets
Camera trajectoryKITTI, VBR, Oxford Spires
Scene poseCroCoDL, Tanks and Temples, Princeton365
Dense reconstructionCroCoDL, EuRoC, Oxford Spires

Follow the Benchmark README to download and prepare the data. Set the dataset and checkpoint paths in the YAML configuration, then run:

cd benchmark
python prepare.py  --config configs/kitti.yaml
python run.py      --config configs/kitti.yaml
python evaluate.py --config configs/kitti.yaml

Use the same workflow with another dataset configuration. The benchmark guide includes data preparation, configuration and evaluation metrics.


🔗 Resources

Public resource links will be added here as they become available.

Visits:1 Updated:2026-12-02 AI tools

Related

ResourceLinkDescription
Technical ReportRead the PDFReconsolidatable Streaming 3D Reconstruction
arXiv2611.36099 (PDF)Preprint and technical report
Project WebsiteWebsiteProject overview and visual results
Hugging FaceGeometric Streaming Base ModelGeometric streaming base model checkpoint and configuration
ModelScopeGeometric Streaming Base ModelGeometric streaming base model checkpoint mirror
Online DemoHugging Face SpaceInteractive browser-based 3D reconstruction demo
Demo VideoWatch on Hugging FaceEnglish streaming reconstruction demo