Skip to content
Projekte

Über uns

SfM, MVS, visual-inertial SLAM, 3D Gaussian Splatting and map-based localization in Rust

KI und maschinelles Lernen

So werden diese Zahlen gemessen

Gemessener Sternzuwachs

in 24h
+10
in 7 days
+74
in 15 days
+169
in 1 month
Verlauf wird gesammelt

Nettoänderungen in überlappenden Zeiträumen, keine Tagessummen. Fehlende Messwerte bleiben leer. Sterne zeigen Interesse, nicht Qualität.

README.md

Original

visloc-rs

Structure from Motion, visual-inertial SLAM, 3D Gaussian Splatting and map-based localization — in pure Rust.

CI status Rust 1.88+ License: MIT OR Apache-2.0 No mandatory ML runtime

Visual-inertial SLAM on LaMAria sequence_1_19 (Project Aria glasses, 1.0 km city walk). Left: both Aria SLAM cameras with the points the VIO is tracking. Right: top-down trajectories growing in time against the pseudo ground truth: visloc-rs (blue) and OpenVINS (orange) stay on the route, Basalt with its upstream configuration (red) drifts away.
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.

Seven tiles, one per environment, each with the camera image and its tracked points on the left and the estimated trajectory (blue) growing against ground truth (grey) on the right: a boreal forest in January snow, the same forest at night in rain, a racing drone, an indoor drone in a Vicon room, a car in a three-level parking garage, an ROV in a murky harbor, and an ROV over a wreck 390 m deep.
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 on EuRoC: the 3D landmarks of a map saved by the stereo-inertial SLAM from the MH_01 flight, with the MH_02 flight's visual-inertial odometry corrected into its frame. Inset: the current camera image with the keypoints that matched the map in green. In the map: the current camera in red with green rays to the landmarks it matched, and its map-frame trajectory so far in orange, unbroken, tracing the flight's loops through the machine hall.
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.

Three KITTI raw drives through one residential district, recorded on two days, each mapped by its own stereo-inertial SLAM session in its own frame, then merged one at a time into one map of the district, and a drive at street level along a street two of them share, past parked cars and houses.
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.

One continuous orbit camera circling a whole city block (Hierarchical 3DGS SmallCity) from high above the rooftops, a viewpoint no input photo has: the sparse SfM point cloud of the surrounding streets and the 5,583 recovered camera frustums tracing the bicycle's path around the block pop in, dissolve into the photoreal 3D Gaussian splat rendered with visloc-rs's own Rust + wgpu renderer, streets and parked cars included, then dissolve into the extracted mesh.
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_mapper and visloc_web for Linux, Windows and macOS on each release, or the container image ghcr.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: COLMAP 4.1 GPU trajectory breaks (ATE 193.7 cm, 764 s) while visloc-rs stays on ground truth (2.58 cm, 102 s), then a 3D Gaussian Splatting flythrough trained from the visloc-rs poses
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:

Bar chart of full-trajectory SE(3) ATE, visloc-rs online VI-SLAM vs measured ORB-SLAM3, across all 11 EuRoC sequences

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.

south-building: each raw input photo next to the trained Gaussian splat and the extracted mesh rendered from the same recovered pose
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

License

Licensed under either of Apache License, Version 2.0 or MIT license, at your option.

Ähnliche Projekte entdecken

Wird geladen…