kornia/kornia-slam
About
Real-time visual-inertial SLAM in Rust, built on kornia-rs.
AI & Machine LearningWhat you can do
- Monocular, stereo, and visual-inertial ORB SLAM
- Local bundle adjustment, including visual-inertial BA
- Place recognition (DBoW2) and loop closure with pose-graph optimization
- Sources: EuRoC, Hilti, MCAP, OAK-D, UVC webcams
Measured star growth
- in 24h
- 0
- in 7 days
- +4
- in 15 days
- +4
- in 1 month
- +7
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Originalv0.1 — early release. The API will change between minor versions.
![]() |
![]() |
| EuRoC MH_01_easy | EuRoC V1_01_easy |
Stereo + IMU at 2× speed. Each shows the map and trajectory, the left camera with its ORB keypoints, and a follow view.
Features
- Monocular, stereo, and visual-inertial ORB SLAM
- Local bundle adjustment, including visual-inertial BA
- Place recognition (DBoW2) and loop closure with pose-graph optimization
- Sources: EuRoC, Hilti, MCAP, OAK-D, UVC webcams
- Terminal UI, Rerun streaming, TUM trajectory output scored by
scripts/eval/evaluate.py
See ROADMAP.md for what's next.
Install
Prebuilt binaries (v0.1.0)
Linux x86_64 and aarch64 builds need glibc 2.35+ (Ubuntu 22.04+, Jetson JetPack 6):
TARGET=x86_64-unknown-linux-gnu # or aarch64-unknown-linux-gnu
NAME=kornia-slam-v0.1.0-$TARGET
curl -L --remote-name-all https://github.com/kornia/kornia-slam/releases/download/v0.1.0/$NAME.tar.gz{,.sha256}
sha256sum -c $NAME.tar.gz.sha256
tar -xzf $NAME.tar.gz
# stereo + IMU on an EuRoC sequence, scored against ground truth
./$NAME/kornia-slam euroc --data /path/to/MH_01_easy --stereo --imu --trajectory-out traj.txt
# the scorer lives in the repository (not in the archive):
# git clone https://github.com/kornia/kornia-slam && pip install -r kornia-slam/scripts/eval/requirements.txt
python kornia-slam/scripts/eval/evaluate.py /path/to/MH_01_easy traj.txt
The archive holds the binary, README.md, CHANGELOG.md and LICENSE.
The v0.1.0 binary predates run files: it takes a source subcommand and flags
(kornia-slam --help, kornia-slam euroc --help) rather than the --config
run files described below. Global options go before the subcommand, e.g. loop
closing with the vocabulary from Quick start:
kornia-slam --vocab /path/to/ORBvoc.txt --apply-pgo euroc ….
It is built with the default features: Rerun streaming (--rerun-stream, which
needs the rerun 0.29.2 viewer on PATH, e.g. pip install rerun-sdk==0.29.2)
is in, live OAK-D and UVC cameras are not. Build from source with
--features oakd-vendored or --features uvc for those; OAK-D has extra prerequisites,
see apps/kornia-slam-app.
From source
The app needs Rust 1.91+ (the libraries 1.89+). Build and run with Cargo as in Quick start, or with Pixi, which provides the toolchain:
pixi run rust-run -- --config configs/euroc.ron
pixi run rust-lint
pixi run rust-test
Quick start
Download a EuRoC
sequence (ASL format) to data/euroc/MH_01_easy, or edit the data path in
the run file, then:
# monocular
cargo run --release -p kornia-slam-app -- --config configs/euroc.ron
# stereo + IMU with loop closing, scored against ground truth
cargo run --release -p kornia-slam-app -- --config configs/euroc-stereo-imu-loop.ron --trajectory-out traj.txt
pip install -r scripts/eval/requirements.txt # once: evo and its dependencies
python scripts/eval/evaluate.py /path/to/MH_01_easy traj.txt
Loop closing needs ORB-SLAM3's vocabulary: extract Vocabulary/ORBvoc.txt.tar.gz
from ORB-SLAM3 to weights/ORBvoc.txt.
A run file names the source and the system to run on it; see apps/kornia-slam-app.
More sources and options: apps/kornia-slam-app.
To run and score benchmark series on EuRoC and TUM-VI, see scripts/eval.
Library
A system configuration and the source's calibrated rig build a SlamSystem,
which then takes IMU samples and images as they arrive and returns poses. Feature extraction,
stereo matching and frame history are the system's; sources supply
synchronized, calibrated (and, for stereo, rectified) images.
use kornia_slam::{CameraSelection, SensorSelection, SlamSystem, SystemConfig};
let config = SystemConfig {
sensors: SensorSelection { cameras: CameraSelection::Stereo, imu: true },
..SystemConfig::default()
};
let mut system = SlamSystem::build(config, rig)?; // rig: kornia_slam::SensorRig
for (idx, frame) in frames.enumerate() {
system.process_imu(&frame.imu);
let result = system.process_stereo(frame.timestamp_sec, &frame.left, &frame.right)?;
println!("{idx}: {:?} {:?}", result.status, result.pose_world_to_cam);
}
With the serde feature, SystemConfig::from_ron_file reads the same settings
from a RON file, the system section of a run file.
Integrations
- Copper: stereo visual-inertial odometry as Copper tasks via cu-kornia-vio. See INTEGRATIONS.md for setup, graph wiring and timing requirements.
Development
With Pixi, which sets up the toolchain for you:
pixi run rust-lint # fmt + clippy + check
pixi run rust-test # workspace tests
pixi shell # drop into the environment
Or with a Rust toolchain (1.91+; the library crates alone need 1.89) installed yourself:
cargo fmt --all -- --check
cargo clippy --all-targets -- -D warnings
cargo test --workspace
Paper
Kornia-SLAM: An End-to-End Visual-Inertial SLAM System in Rust
Christie J. Purackal, Edgar Riba, Astik Srivastava.
Rust for Robotics workshop at IROS 2026 (preprint).
Paper (PDF) · Poster (PDF)
The paper's EuRoC results come from the August 2026 code, before v0.1.0. To cite kornia-slam, use GitHub's "Cite this repository" button, which reads CITATION.cff.
License
Apache-2.0
Explore related projects
Loading…


