kornia-rs
Low level implementations for computer vision in Rust
What it is and what it does
kornia-rs is a Rust-based computer vision library with Python bindings that handles image I/O, processing, and video capture. It reads and writes multiple image formats (JPEG via libjpeg-turbo, PNG, WebP, TIFF, and others), performs operations like resizing, cropping, rotation, color conversion, and normalization, and supports video frame capture. The library is designed for efficiency and thread safety, making it suitable for integration into machine learning pipelines and data-science workflows.
The package exposes a subset of its Rust API through Python, including a PIL-style Image class that natively supports uint16 for depth maps and scientific imagery. It includes both high-level convenience functions and lower-level encoder/decoder objects for JPEG workflows. The library is actively maintained, supports Python 3.8 through 3.13 (including the free-threaded build), and provides precompiled wheels for common platforms, reducing installation friction.
Use it for:
- Load and preprocess images for deep learning training pipelines with minimal overhead.
- Read and write depth maps or scientific imagery in uint16 format losslessly via PNG.
- Capture video frames from cameras and process them in real time with thread safety.
- Convert image formats and apply basic transformations (resize, grayscale, normalize) in batch workflows.
- Integrate efficient image I/O into machine learning applications.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
kornia-rs provides low-level computer vision operations—image I/O, resizing, color conversion, and video capture—implemented in Rust with Python bindings for efficient, thread-safe processing.
Yes, if you need fast, thread-safe image I/O and basic processing in a Python environment. The Rust backend, prebuilt wheels, and support for modern Python versions make it a low-friction choice for ML pipelines. No runtime dependencies required for core functionality. Consider it especially if you work with depth maps (uint16) or need video capture; for simple image operations, alternatives may suffice.
Install
kornia-rs on PyPI
pip
pip install kornia-rsuv
uv add kornia-rspoetry
poetry add kornia-rsInstalling kornia-rs
Before you install
Medium install friction due to compiled wheels; prebuilt binaries available for Python 3.8–3.13 across Linux (amd64/arm64), macOS, and Windows. Active maintenance with recent releases; no runtime dependencies required.
License in practice
Permissive license treatment allows use in commercial and proprietary projects without restriction.
Quickstart
pip install kornia-rs
import kornia_rs as K
img = K.read_image_jpeg("dog.jpeg")
resized = K.resize(img, (128, 128))
Optional system dependencies (clang, nasm, libgstreamer) only needed if using v4l, turbojpeg, or gstreamer features; basic image I/O works without them.
Verify before relying
- Performance benchmarks vs. alternatives for common operations (resize, color conversion).
- Completeness of the Python API surface relative to the full Rust library.
- Free-threaded Python 3.13 build stability and real-world concurrency patterns.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 87 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,212,425/month — #2,699 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: kornia_rs-0.1.14-cp310-cp310-macosx_10_12_x86_64.whl; kornia_rs-0.1.14-cp310-cp310-macosx_11_0_arm64.whl; kornia_rs-0.1.14-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; kornia_rs-0.1.14-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; kornia_rs-0.1.14-cp310-cp310-win_amd64.whl; kornia_rs-0.1.14-cp311-cp311-macosx_10_12_x86_64.whl; kornia_rs-0.1.14-cp311-cp311-macosx_11_0_arm64.whl; kornia_rs-0.1.14-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; kornia_rs-0.1.14-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; kornia_rs-0.1.14-cp311-cp311-win_amd64.whl; kornia_rs-0.1.14-cp312-cp312-macosx_10_12_x86_64.whl; kornia_rs-0.1.14-cp312-cp312-macosx_11_0_arm64.whl; kornia_rs-0.1.14-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; kornia_rs-0.1.14-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; kornia_rs-0.1.14-cp312-cp312-win_amd64.whl; kornia_rs-0.1.14-cp313-cp313-macosx_10_12_x86_64.whl; kornia_rs-0.1.14-cp313-cp313-macosx_11_0_arm64.whl; kornia_rs-0.1.14-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; kornia_rs-0.1.14-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; kornia_rs-0.1.14-cp313-cp313t-macosx_10_12_x86_64.whl
Keywords: augmentation, camera, computer vision, deep-learning, image-processing, machine-learning, opencv-alternative, pytorch, rust, tensor, video-processing
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
py-rattlerpy-rattler provides Python bindings to…
permissive · top 15,000 on PyPI
vegafusionVegaFusion provides Rust-backed tools for…
permissive · top 15,000 on PyPI
moviepilot-rustProvides Rust-accelerated parsing and filtering…
unclear · top 15,000 on PyPI
epaper-ditheringConverts images to dithered output optimized…
permissive · top 15,000 on PyPI
graspologic-nativeProvides a high-performance Rust implementation…
permissive · top 15,000 on PyPI
rustworkxA high-performance graph library for Python,…
permissive · top 5,000 on PyPI
WillowWillow provides a unified API for image…
permissive · top 5,000 on PyPI
albucoreAlbucore provides optimized atomic image…
permissive · top 5,000 on PyPI
cohere-melodyParses and renders templated text for Cohere…
permissive · top 15,000 on PyPI