skillfed

kornia-rs

Low level implementations for computer vision in Rust

kornia-rs v0.1.14 3.2M downloads/30d#2,699 on PyPI693
Permissive license Active released

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-rs

uv

uv add kornia-rs

poetry

poetry add kornia-rs

Installing 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

Development Status :: 4 - BetaEnvironment :: GPUIntended Audience :: Science/ResearchLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Free Threading :: 3 - StableProgramming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyProgramming Language :: RustTopic :: Scientific/EngineeringTopic :: Scientific/Engineering :: Artificial IntelligenceTopic :: Scientific/Engineering :: Image Processing

Tags

rust computer vision libraryimage processing python rustfast image i/o jpegvideo capture and processingimage resize rotate cropthread-safe image operationsdeep learning image preprocessing
rust-bindingsimage-iovideo-processing

More Scientific/Engineering packages