Key takeaways

  • A PyTorch library with 1,200+ public operators for images, camera geometry and feature matching, most with no torchvision equivalent.
  • Pass different settings for each image in one batched call, where torchvision's functional ops apply one parameter per call.
  • The project's own benchmarks show about 10× to 70× over per-image OpenCV on the CPU, and it publishes where it is slower.
  • Augment images, masks, boxes and keypoints together, then export over 1,000 operators to ONNX.
  • The catches: half precision still has recorded failures, none covered on CUDA in CI, and the maintainers are volunteers.

What it is

Kornia describes itself as a differentiable computer vision library that provides image processing and geometric vision algorithms. It is open source under the Apache-2.0 licence, and the code is on GitHub at kornia/kornia.

The problem it solves

Researchers and engineers who train vision models in PyTorch often end up hand-writing geometry or looping over images. The README says Kornia pays off where a hand-written version gets long or fragile, or where the alternatives leave the GPU.

One example it gives: torchvision's functional ops apply one parameter per call, whereas Kornia accepts per-sample parameters in one batched call.

What you get

  • Breadth: 1,200+ public operators, most with no torchvision equivalent, so fewer hand-rolled routines.
  • Batching: different parameters for each sample in a single call.
  • Consistent augmentation: one sampled transform is applied to images, masks, boxes and keypoints together.
  • Local features on the GPU, including SIFT, DISK, LoFTR and LightGlue.
  • Deployment routes: nearly all probed configurations run under torch.compile and match eager, and over 1,000 operators export to ONNX.

How it compares

These figures are the project's own, from its published 0.9.0 benchmarks on an RTX 4090. At batch 32, many filters, warps, matching steps and metrics run about 10× to 70× faster in eager mode than per-image OpenCV or scikit-image on the CPU, and torch.compile takes several past 100×.

The README is candid about the other side. Against torchvision on the small overlap, eager Kornia is slower, and OpenCV wins single-image uint8 CPU work. It adds that results vary with hardware and workload.

The catches

  • Half precision: the README records 243 float16 and 256 bfloat16 failures on CPU, counted as test cases rather than unsupported functions.
  • No CI job covers CUDA or MPS half precision, so CPU results do not establish support there.
  • Small jobs: for one fixed-parameter blur or resize, a few lines of PyTorch or torchvision are just as good.
  • Maintenance: the project is run by volunteers who say they have limited time and cannot promise to review every proposal.
  • Direction: the stated priority is conventions, conformance tests and honest benchmarks over API growth.

What we did not test

We did not install Kornia, run any benchmark, check the ONNX exports or look for telemetry. Every claim here comes from a literal quote in the project's README or the GitHub API, and the performance figures are the project's own.

Verdict

Editors' view: this suits people training or deploying vision models in PyTorch who need batched geometry, augmentation or feature matching on a GPU. If you only resize and crop single images, you probably do not need it. Anyone relying on half precision should read the failure tables first.

Repository
kornia/kornia
Python · Apache-2.0
View on GitHub ↗

Sources

Need help adopting this, or have a software project in mind?

Tell us what you are building. The initial consultation is free. Email [email protected] or follow @zolnaltd.

Start a conversation →