--- license: mit tags: - slam - monocular-slam - visual-localization - geometric-foundation-models - pytorch thumbnail: ./teaser.png ---

LeanGate

Accelerating Transformer-Based Monocular SLAM via Geometric Utility Scoring

Project Page | Code | Paper Coming Soon

## Overview LeanGate is a lightweight frame-gating model for transformer-based monocular SLAM. It predicts the geometric utility of an incoming frame before expensive dense reconstruction, allowing the system to skip redundant frames early and significantly reduce computation. ## Highlights - Filters out more than 90% of redundant frames before heavy SLAM processing - Reduces tracking FLOPs by more than 85% - Achieves around 5x end-to-end throughput speedup - Maintains competitive tracking and mapping accuracy ## Model - Checkpoint: `model.pt` - Framework: PyTorch - Task: frame utility scoring for monocular SLAM - Input: current frame and reference/keyframe features or paired image representation - Output: geometric utility score used for frame gating ## Method

## Quick Start This release lets you download the public LeanGate checkpoint, run LeanGate on prepared `TUM`, `7SCENES`, or `EUROC` scenes, export sparse RGB manifests, and optionally launch MASt3R-SLAM on the filtered sequence. ### 1. Install Use `python3` and install a PyTorch version matching your CUDA runtime first. ```bash pip install -e . pip install -e third_party/MASt3R-SLAM/thirdparty/mast3r pip install -e third_party/MASt3R-SLAM/thirdparty/in3d pip install --no-build-isolation -e third_party/MASt3R-SLAM ``` ### 2. Download the released checkpoint The public LeanGate checkpoint is hosted at: - Repo: `ShawnX98/LeanGate` - URL: `https://huggingface.co/ShawnX98/LeanGate` - File: `leangate.pt` Download it with: ```bash python3 scripts/download_checkpoints.py --output-root checkpoints --repo-id ShawnX98/LeanGate ``` This will place the checkpoint at: ```text checkpoints/leangate.pt ``` ### 3. Run LeanGate on a prepared benchmark dataset Example for `TUM`: ```bash python3 scripts/generate_rgb_lists.py \ --dataset-type TUM \ --dataset-root /data/tum \ --output-root outputs/predictions \ --device cuda:0 ``` Supported benchmark inputs: - `TUM` - `7SCENES` - `EUROC` Expected dataset layouts are documented in [`docs/dataset_layouts.md`](docs/dataset_layouts.md). ### 4. Run the plain RGB folder demo For a simple folder of RGB frames: ```bash ./demo.sh \ --folder /data/my_rgb_frames \ --output-root outputs/demo \ --device cuda:0 ``` This processes frames in sorted filename order and writes the filtered manifest to: ```text outputs/demo/leangate/.txt ``` ### 5. Optional: launch MASt3R-SLAM on the sparse sequence Single scene: ```bash python3 scripts/run_slam_scene.py \ --dataset-type TUM \ --dataset-root /data/tum \ --scene-id rgbd_dataset_freiburg1_desk \ --predictions-root outputs/predictions \ --output-root outputs/slam ``` Full dataset: ```bash python3 scripts/run_slam_dataset.py \ --dataset-type TUM \ --dataset-root /data/tum \ --predictions-root outputs/predictions \ --output-root outputs/slam ``` ### Outputs LeanGate inference produces: - `outputs/predictions//leangate/.txt` - `outputs/predictions//leangate/scores/_scores.csv` Optional MASt3R-SLAM outputs include: - `outputs/slam//leangate//trajectory_keyframes.tum` - `outputs/slam//leangate//reconstruction.ply` - `outputs/slam//leangate//run_metadata.json` - `outputs/slam//leangate/summary.csv` - `outputs/slam//leangate/summary.json`