--- id: kornia-rs version: "0.1.14" license: unclear license_treatment: permissive maintenance: active --- # kornia-rs — Low level implementations for computer vision in Rust License: permissive · Maintenance: active · Downloads: 3.2M/mo ## 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 above — 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 pip install kornia-rs uv add kornia-rs 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_current - Install friction: medium - Maintenance: active - Downloads: 3.2M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags rust computer vision library, image processing python rust, fast image i/o jpeg, video capture and processing, image resize rotate crop, thread-safe image operations, deep learning image preprocessing, rust-bindings, image-io, video-processing [View on SkillFed](https://skillfed.io/packages/kornia-rs) · [View on PyPI](https://pypi.org/project/kornia-rs/)