Kornia
Open-source differentiable computer vision library for PyTorch with GPU-accelerated image processing, geometry, feature matching and augmentation operators.
At a Glance
Kornia core library released under the Apache 2.0 license; free to use, modify and distribute.
Engagement
Available On
Alternatives
Listed Nov 2026
About Kornia
Kornia is an open-source, Apache-2.0 licensed differentiable computer vision library built on PyTorch. It provides image processing, geometric vision, augmentation and pretrained-model operators that run on the device where the input tensor lives. The project documents version 0.9.0 as its latest release and describes itself as a non-profit maintained by a small team.
What It Is
Kornia is a Python library installed with pip that brings classical and learned computer vision operations into PyTorch workflows. Its documentation lists 1,200+ differentiable operators, available as functions and nn.Module layers, covering geometry, feature matching, filtering, color, augmentation, losses and pretrained models. Operators are batched and device-agnostic, so a whole batch can be processed in one call on CPU or GPU, and gradients flow through them so they can sit inside a model or a loss.
Core Capabilities
The geometry module covers cameras, homographies, Lie groups, RANSAC and depth-to-3D conversion. Feature tools include detectors and matchers such as KeyNet, DISK, ALIKED, LightGlue and LoFTR, alongside classical SIFT and HardNet. Filtering and enhancement include Canny, Sobel, Gaussian, bilateral, morphology, CLAHE and histogram equalization. AugmentationSequential applies one sampled transform consistently to images, masks, boxes and keypoints in 2D. Pretrained models include YuNet face detection, RT-DETR object detection and SAM segmentation.
Export and Deployment
Kornia modules can be exported to ONNX with torch.onnx.export, and the ONNXSequential utility chains Hub-hosted operators or models with local ONNX files into one graph. The README states that nearly all probed operator configurations run under torch.compile and that over 1,000 export to ONNX. A companion project, kornia-rs, targets edge devices.
Performance and Precision Notes
The project publishes benchmarks and says results vary by hardware and workload. It states that eager Kornia is slower than torchvision on their small overlap, and that OpenCV wins single-image uint8 CPU work. Half-precision support is documented per module, with recorded CPU float16 and bfloat16 failures tracked openly, and no CI job covers CUDA or MPS half precision.
Direction
The README says Kornia is becoming a reference implementation and executable specification for differentiable computer vision and geometry in the PyTorch ecosystem. It also states the model zoo is frozen for expansion while maintainers focus on the geometry core.
Community Discussions
Be the first to start a conversation about Kornia
Share your experience with Kornia, ask questions, or help others learn from your insights.
Pricing
Open Source
Kornia core library released under the Apache 2.0 license; free to use, modify and distribute.
- Apache License 2.0
- 1,200+ public operators
- GPU-accelerated differentiable computer vision on PyTorch
- Developed and maintained by volunteers; sponsorship welcome
Capabilities
Key Features
- 1,200+ differentiable operators as functions and nn.Module layers
- Batched GPU-accelerated image processing
- Differentiable geometry: cameras, homographies, Lie groups, depth-to-3D
- Batched minimal solvers and RANSAC robust estimation
- Feature detection and matching (DISK, ALIKED, LightGlue, LoFTR, SIFT, HardNet)
- Filters, edge detection, morphology and image enhancement
- AugmentationSequential for images, masks, boxes and keypoints
- Pretrained models: YuNet, RT-DETR, SAM, DexiNed
- ONNX export and ONNXSequential model chaining
- torch.compile support
- Image losses and metrics such as SSIM and PSNR
- Browser playground for trying operators
