Most computer-vision toolkits sit outside the neural network: OpenCV warps an image or detects features, then hands a detached array back to your model, and the gradient chain stops cold there. Kornia's bet is to rebuild that classic toolkit so every operation is a plain differentiable tensor function — meaning a homography warp, a Sobel filter, or a camera-calibration step can sit inside the forward pass and receive gradients like any other layer.
What Sets It Apart
- Differentiable by construction — 500+ operators (filtering, morphology, homography warping, epipolar geometry, pose estimation) are all autograd-compatible and run on GPU, so geometry and photometry become trainable rather than frozen preprocessing.
- Tensor-native, batched, device-agnostic — everything operates on
(B, C, H, W)tensors, so a whole batch of augmentations or warps runs on the same device as your model with no NumPy round-trips. - CV primitives, not just augmentation — beyond AutoAugment/RandAugment-style pipelines, it ships feature matching (LoFTR, local descriptors), face detection, and multi-view geometry, work that usually means stitching several libraries together.
Great Fit If / Look Elsewhere If
Great fit if you're building end-to-end pipelines where the camera model or a geometric step needs gradients — self-supervised depth, differentiable rendering, robotics, spatial AI. Look elsewhere if you just need fast classic CV on CPU with no training loop: OpenCV is lighter and broader there. Differentiability and the PyTorch dependency are the price of admission, and some half-precision paths carry documented limits.