kornia-slam · v0.1 · early release

Visual-inertial SLAM, written in Rust

Camera pose and a map of the space around it, from a single camera, a stereo pair or a camera with an IMU. Built on kornia-rs, with no C++ SLAM backend underneath.

git clone https://github.com/kornia/kornia-slam
The kornia-slam mascot: a rusty orange stereo camera with two lenses and a Kornia cube

See it run

Watch the map build in a terminal or in Rerun

The kornia-slam terminal UI: a bird's-eye trajectory, camera position and heading, keyframe and map-point counts, and memory and CPU use
The terminal UI, on by default: a bird's-eye view of the trajectory, the camera pose, map size and resource use.
A Rerun view of a kornia-slam run on EuRoC: the estimated trajectory over a sparse point cloud, beside the camera image with its tracked ORB features
Stream to Rerun for the 3D view: the trajectory, the sparse map and the tracked features on each frame.

What it does

A complete SLAM stack

Tracking

Monocular, stereo and visual-inertial ORB tracking. KLT optical flow carries map points from frame to frame, and robust PnP estimates the pose.

Local mapping

Keyframes, map points and local bundle adjustment. It runs on its own thread by default, or in step with tracking.

Visual-inertial

IMU preintegration, inertial initialisation with gyro-bias estimation, and a visual-inertial BA with robust kernels on every residual.

Loop closure opt-in

DBoW2 place recognition finds candidate loops. Verified loops correct the live map through pose-graph optimisation. Needs a metric map from stereo or an IMU.

Sources

EuRoC and Hilti-Trimble datasets, MCAP recordings from Bubbaloop, a live OAK-D, and any UVC webcam.

Evaluation

Aligns the trajectory to ground truth and reports ATE, RPE and drift, with the raw and aligned trajectories saved as CSV.

How it is built

A library runtime, with apps around it

The kornia-slam crate owns the runtime. The app only connects a source to it and sends the results to the outputs, so the same pipeline runs on a dataset, a recording or a live camera.

kornia-slam architecture Frame sources feed SlamSystem, which runs tracking, mapping, initialization and loop closing over a shared map. The pose and map go to the terminal UI, Rerun, evaluation and Bubbaloop. SOURCES EuRoC · Hilti MCAP recording OAK-D stereo + IMU UVC webcam kornia-slam-app SLAMSYSTEM · kornia-slam Tracking Mapping Initialization Loop closing Map keyframes · map points · covisibility kornia-sensors (IMU) · kornia-rs (geometry, ORB, BoW) OUTPUTS Terminal UI Rerun ATE / RPE Bubbaloop pose + map kornia-slam architecture Frame sources feed SlamSystem, which runs tracking, mapping, initialization and loop closing over a shared map. The pose and map go to the terminal UI, Rerun, evaluation and Bubbaloop. SOURCES · kornia-slam-app EuRoC · Hilti MCAP recording OAK-D + IMU UVC webcam SLAMSYSTEM · kornia-slam Tracking Mapping Initialization Loop closing Map keyframes · map points · covisibility OUTPUTS · pose + map Terminal UI Rerun ATE / RPE Bubbaloop
  • Rust-native core. The whole estimation stack is Rust, and the core crate has no unsafe blocks.
  • Built on kornia-rs. Solvers, camera models and image ops come from kornia-rs, and general-purpose code moves upstream into it.
  • Modules that own their concern. Tracking, mapping, initialization and loop closing each live in their own module. Splitting SlamSystem into swappable subsystems is on the roadmap.

Quick start

Run it on EuRoC in two commands

Download a EuRoC MAV sequence in ASL format (Machine Hall MH_01 is a good first run), then:

# monocular
cargo run --release -p kornia-slam-app -- euroc --data /path/to/MH_01_easy

# stereo + IMU, evaluated against ground truth
cargo run --release -p kornia-slam-app -- euroc --data /path/to/MH_01_easy --stereo --imu --evaluate
Sources and the modes they support
SourceCommandMonoStereoIMUEvaluation
EuRoC MAVeurocyesyesyesyes
Hilti-Trimble 2026hiltiyes, fisheye–yesyes
MCAP (Bubbaloop)mcapyeswith --calib––
OAK-D, liveoakdyeswith --calib––
UVC webcam, liveuvcyes–––

oakd and uvc are behind the oakd and uvc cargo features. The default build needs no extra system dependencies. Add --rerun-stream for the 3D viewer, or --vocab ORBvoc.txt --apply-pgo to turn on loop closure. Every flag is in the app README.

Where it stands

What works today, and what is next

v0.1 is an early release, and the API will change between minor versions. We publish accuracy and timing numbers only after measuring them against a fixed benchmark protocol, so this page does not show any yet.

Works now

  • End-to-end stereo-inertial runs on EuRoC
  • A public SlamSystem runtime that owns the orchestration
  • Local mapping on its own thread or in step with tracking
  • Visual-inertial BA with robust kernels
  • Opt-in loop detection and metric loop correction

Not yet

  • Relocalization after tracking is lost
  • Sim(3) loop closure to fix monocular scale
  • Features other than ORB (only ORB is wired in today)
  • GPU acceleration: today's runs are CPU only
  • A frozen accuracy comparison against ORB-SLAM3

Roadmap

Where it is going

The roadmap sets a direction, not a commitment. The full version is in ROADMAP.md.

  1. Complete the SLAM stack

    GPU acceleration of the per-frame hot paths, starting with a KLT frontend. Relocalization that holds up across day, night and lighting changes. Metric scale for monocular maps through Sim(3) loop closure and AprilTag anchoring. Matching ORB-SLAM3 on accuracy and robustness.

  2. Library structure

    Pluggable features such as XFeat, and pluggable place recognition with learned descriptors such as DINOv3. Multi-camera rigs. Atlas, a factor-graph foundation for BA and pose-graph optimisation. SlamSystem split into its subsystems.

  3. Tooling and integrations

    Pixi environments for reproducible cross-platform builds, and ROS 2 through ros2_rust.

  4. Sensors, maps, agents experimental

    RGB-D, LiDAR and GNSS estimators; dense, TSDF, voxel and Gaussian-splat maps; a map server over MCP; agents that watch the subsystems at runtime and tune them.

Recent changes

From the news

  • Recent kornia-slam news is on the news page.

Build it with us

Issues, design discussion and review all happen in the open on GitHub. Ask in Discord before starting a large change.