rsasaki0109/visloc-rs
حول
SfM, MVS, visual-inertial SLAM, 3D Gaussian Splatting and map-based localization in Rust
الذكاء الاصطناعي وتعلّم الآلةالنمو المقاس للنجوم
- خلال 24 ساعة
- +٥
- خلال 7 أيام
- +٧٥
- خلال 15 يومًا
- +١٧٠
- خلال شهر
- جارٍ جمع السجل
تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.
README.md
الأصلvisloc-rs
Structure from Motion, visual-inertial SLAM, 3D Gaussian Splatting and map-based localization — in pure Rust.

Visual-inertial odometry on LaMAria sequence_1_19: Project Aria glasses, 1.0 km city walk, 15 min, both SLAM cameras + IMU, no loop closure. LaMAria Score (official evaluator, higher is better): visloc-rs 50.0, OpenVINS 49.9 (estimate shipped with the LaMAria demo), Basalt with its upstream configuration 7.7 (run through this repository's parity-verified Basalt port). Trajectories are Sim(3)-aligned to the pseudo ground truth as the evaluator does. Details and the other training sequences.

One VI-SLAM config in seven field environments: a boreal forest in snow and at night in rain (FoMo), a racing drone at up to 9 m/s (UZH-FPV), a fast indoor drone (EuRoC), a car in a parking garage (4Seasons), and an ROV in a harbor and over a wreck 390 m deep (AQUALOC). 42 runs, none diverge (Basalt's EuRoC config loses 3). Blue: VIO. Magenta: the same run with loop closure (EuRoC 0.067 → 0.027 m, racing drone 0.20 → 0.04 m, harbor 0.21 → 0.045 m). Details.

Map-based localization: EuRoC MH_02 in a map that the stereo-inertial SLAM saved from MH_01, a different flight. The map fixes correct the VIO into the map frame, so every frame gets a map pose (orange): 3,039 of the 3,040 frames, at 1.9 cm RMSE against ground truth. Green: the keypoints that matched the map, searched around where the corrected VIO predicts each landmark (98% of the images match; 81% when each image is matched alone), and rays to those landmarks. The same runs in real time as ROS 2 nodes. Details and the other EuRoC queries.

Multi-session mapping: three KITTI raw drives (4.9 km, 30 Sep and 3 Oct 2011), each mapped on its own, merged by basalt_map_merge into one district map: 1.1 m RMSE against the OXTS ground truth over all three, about the base drive's own SLAM error. Each covers its own part of the district and they share a few streets, so only the merge makes the whole. Colours from the colour cameras, brightened for display. Data CC BY-NC-SA 3.0, and so is this GIF. Details.

5,822 photos of a city block → 5,583 camera poses → 4.7M-gaussian splat → 5.9M-triangle mesh in 2.5 h, one gsplat_photos command, no COLMAP or Python, orbited from high above where no input photo was taken. Details.
In a nutshell
visloc-rs turns camera images (optionally with an IMU) into camera poses, 3D maps and photorealistic scenes, and localizes new images against those maps. Everything is Rust: no C++, OpenCV or CUDA toolchain to build. GPU work runs on any GPU through wgpu. Models are read and written in COLMAP format.
Performance at a glance
Measured on public real data. ATE / error: lower is better.
| Task | Dataset | visloc-rs | Baseline |
|---|---|---|---|
| Photo SfM | ETH3D Electro, 1,200 images | 3.50 cm, mapper 3.46× faster | COLMAP 3.9 CPU 4.68 cm |
| GPU SfM | EuRoC MH_05, 200 frames | 2.58 cm, 102 s | COLMAP 4.1 CUDA 193.7 cm, 764 s |
| Stereo-inertial SLAM | EuRoC, 11 sequences (mean ATE) | 0.031 m, real time on 11/11 | ORB-SLAM3 0.035 m (wins 2/11) |
| Field VI-SLAM | 5 datasets, 42 runs | 0 diverged | Basalt's EuRoC config: 3 diverged |
| Egocentric VI-SLAM | LaMAria test set (Score, higher is better) | 57.8 (sixth) | Aria's SLAM 75.9 |
| Photos → 3DGS | 5 benchmark scenes | faster on 5/5, PSNR within 0.05 dB on 4/5 | brush 0.3 |
| Map localization | EuRoC MH_02 in an MH_01 map | 3,039 / 3,040 frames, 1.9 cm | — |
| Stereo VO | KITTI 00 / 09 | 1.23 m / 2.07 m | ORB-SLAM2 1.3 m / 3.2 m |
Where it still loses: COLMAP CUDA is more accurate on 3/8 EuRoC sequences; ORB-SLAM3 wins MH_04 and MH_05; five methods are ahead on LaMAria's test set. All tables, figures and the sensor-support matrix are in docs/results.md.
Try it
In the browser, nothing to install: photo SfM, VIO and a Gaussian splat viewer.
Locally (Rust 1.88+ only; datasets are not bundled):
# Photos -> camera poses, Gaussian splat and mesh (GPU via wgpu)
cargo run --release -p visloc-gsplat-train --features gpu,euroc --example gsplat_photos -- \
--images /path/to/my_photos --out runs/my-scene
# Stereo-inertial VI-SLAM on a EuRoC sequence
cargo run --release --example basalt_euroc_online_slam_demo --features basalt-lm-workspace-reuse -- \
--euroc-dir /path/to/MH_01_easy \
--calibration configs/basalt/variants/official_euroc_ds/euroc_ds_calib.json \
--config configs/basalt/variants/official_euroc_ds/euroc_config.json \
--out-dir target/basalt_mh01_online
# Smallest end-to-end check: localize a synthetic query, no data needed
cargo run --example localize_dummy
scripts/check.sh runs the full local quality gate (fmt, clippy, test, doc).
- Rust library:
cargo add visloc-rs(crates.io, API docs) - Python:
pip install visloc(bindings) - ROS 2: VIO and map-localization nodes, no ROS install needed to build (ros2/visloc-ros2), with Nav2 integration (navigation)
- Prebuilt binaries:
gsplat_photos,visloc_mvs,colmap_incremental_mapperandvisloc_webfor Linux, Windows and macOS on each release, or the container imageghcr.io/rsasaki0109/visloc-rs(docker)
Sensor support
| Sensor setup | Tasks | Status |
|---|---|---|
| Monocular photos / video | SfM, 3DGS, mesh, dense MVS | Benchmarked (MVS experimental) |
| Monocular + IMU | VIO + mapping | Experimental |
| Stereo, RGB-D | VO / SLAM | Benchmarked |
| Stereo + IMU | VIO + mapping, map save / localize | Benchmarked |
| Multi-camera rig | SfM, relocalization | Experimental / Benchmarked |
| Wheel odometry, GNSS | Corrected into a map frame / pose-graph fusion | Experimental |
LiDAR is not supported. Headline numbers and entry points per setup: full sensor matrix.
Structure from Motion
A COLMAP incremental-mapper port with GPU SIFT and matching. On the 13 ETH3D DSLR training scenes, with the same COLMAP features and matches for all three mappers:
| Mapper (4 threads) | Mean AUC@1° / 3° / 5° | Registered | Mapper time |
|---|---|---|---|
| visloc-rs | 50.9 / 75.5 / 82.1 | 445 / 454 | 28.4 s |
| COLMAP 4.2 incremental | 50.4 / 75.2 / 81.7 | 445 / 454 | 200.7 s |
| COLMAP 4.2 global (GLOMAP) | 51.6 / 75.5 / 81.7 | 454 / 454 | 184.4 s |

EuRoC MH_05, same 200 frames, same GPU: COLMAP 4.1 CUDA breaks (193.7 cm, 764 s), visloc-rs stays at 2.58 cm in 102 s.
Details: SfM results, EuRoC vs COLMAP.
Visual-inertial SLAM
A faithful Rust port of Basalt (stereo-inertial VIO plus a keyframe / loop-closure mapper), matching native Basalt's ATE to within 0.1% on all 11 EuRoC sequences. With the online mapper it runs in real time on all 11 and beats ORB-SLAM3 on 9 of them:
One field config also covers forest, night, drones, a parking garage and underwater (42 runs, none diverge), and runs in real time on 2 x86 cores. Details: VI-SLAM results, field, LaMAria.
Photos to splat and mesh
One gsplat_photos command runs SfM, trains a 3D Gaussian Splatting scene on
hand-written wgpu passes (faster than brush 0.3 on 5/5 benchmark scenes) and
fuses a mesh. --equirect takes 360° panoramas.

COLMAP's south-building, 128 raw JPGs: each photo next to the trained splat and the mesh, all registered, held-out PSNR 22.77, 37 min end to end.
Details: photos to splat and mesh.
Localize against a map
The stereo-inertial SLAM saves its map as a COLMAP model, and another session localizes in it without running SLAM again:
# 1. Map MH_01 and save the map
cargo run --release --example basalt_euroc_online_slam_demo -- \
--euroc-dir /path/to/MH_01_easy \
--calibration configs/basalt/variants/official_euroc_ds/euroc_ds_calib.json \
--config configs/basalt/variants/official_euroc_ds/euroc_config.json \
--out-dir target/mh01_slam --save-map target/mh01_map
# 2. Localize MH_02 against it
cargo run --release --example basalt_euroc_localize_demo -- \
--map target/mh01_map --euroc-dir /path/to/MH_02_easy --out-dir target/mh02_on_mh01
With --vio, the VIO is corrected into the map frame and every frame gets a
map pose. Maps of several sessions merge with basalt_map_merge, and the
ROS 2 nodes publish map -> odom for Nav2. Details:
localization results,
navigation.
Documentation
- Results in detail: every table, figure and run command
- Demo index and archived README details
- Feature matrix, API stability, COLMAP compatibility, migration notes
- Reproducibility contract
- Roadmap, contributing, security, changelog
License
Licensed under either of Apache License, Version 2.0 or MIT license, at your option.
استكشف مشاريع مشابهة ومرتبطة
جارٍ التحميل…