kornia: Embedding 1,200+ Operators Directly into PyTorch Graphs

kornia/kornia

·2026.11.02 12:42

It is a differentiable computer vision library based on PyTorch. It provides over 1,200 operators for image filtering, geometric transformations, and data augmentation, with most supporting automatic differentiation and GPU acceleration. Unlike existing torchvision, which is limited to simple resizing or cropping, it broadly covers camera modeling, epipolar geometry, RANSAC-based least squares solutions, and feature point matching.

A key feature is handling per-sample parameters in a single call during batch processing. It accepts batch tensors for parameters such as Gaussian blur sigma, rotation angles, and affine transformation matrices, executing them in parallel on the GPU. This minimizes synchronization between the host and device, and when torch.compile is applied, it recorded a speed improvement of up to 100 times or more compared to CPU-based OpenCV on an RTX 4090.

It supports differentiable geometric operations that preserve gradients with respect to depth, pose, and camera parameters. It directly executes the latest local feature point algorithms, such as SIFT, LoFTR, and LightGlue, on the GPU, and has verified compatibility with ONNX export and torch.compile. It is suitable for batch operations repeated within complex deep learning pipelines rather than fixed-parameter tasks on single images.

GitHub
GitHub repository

kornia/kornia

🐍 Geometric Computer Vision Library for Spatial AI

Python

This introduction was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report errors, attribution issues, or removal requests via Contact.