Kornia
Differentiable computer vision library for PyTorch with geometric vision, filtering, and augmentation operators.
About
Kornia brings classical computer vision into PyTorch as differentiable operators, so image filtering, color conversion, geometric transforms, epipolar geometry, depth estimation, and feature matching can sit inside a neural network and propagate gradients end to end. The library covers more than 500 operations, from edge detection and morphology to homography estimation, camera models, and GPU-friendly data augmentation that runs batched on tensors instead of one image at a time on the CPU. Recent releases add pretrained models for tasks such as face detection, segmentation, and local feature matching, plus ONNX support and experimental multi-framework backends through Ivy. Installation is a plain pip install kornia on top of PyTorch 2.0 or newer, and a GPU is optional, though most workloads benefit from CUDA. Everything ships under the Apache 2.0 license, so commercial use is fine. Researchers and production teams use it as a differentiable replacement for OpenCV style pipelines, and the project has grown past 11,000 GitHub stars with an active contributor community.
Should you use Kornia?
Pick it when
Pick Kornia when classical vision ops must live inside a PyTorch graph: differentiable warps, filters, homographies or camera models trained end to end, or batched GPU augmentation that keeps the CPU out of the data loop.
Look elsewhere when
Skip it for plain image I/O, video capture, or deployment outside Python and PyTorch, where OpenCV covers far more with C++ and mobile builds. If you just need pretrained backbones, timm is the better starting point.
Alternatives to Kornia
- OpenCV
Broader, C++ native and deployed on Android and iOS with a DNN module, but its operations are not differentiable and do not batch on tensors.
- timm
Pretrained backbones, training scripts and Mixup or RandAugment augmentation, but no differentiable geometry, filtering or camera models.
- CoTracker
Tracks points densely through whole videos and occlusions, where Kornia matches features between image pairs, but CC-BY-NC limits it to non-commercial use.
Reviews (0)
Leave a Review
No reviews yet. Be the first to review!
Details
- Price
- Free
- Platform
- Local/Desktop
- Difficulty
- Intermediate (3/5)
- License
- Apache-2.0
- Added
- Jul 29, 2026