API reference#

One page per kornia module, grouped by what you are trying to do. Image operators take batched (B, C, H, W) float tensors in [0, 1] and follow the conventions (points, boxes, local features and camera matrices have their own layouts, documented on their pages); most functions also have an nn.Module counterpart.

Image processing#

kornia.color

Color space conversions, color maps and Bayer RAW processing.

kornia.filters

Blurring, edge detection, thresholding and custom kernels.

kornia.enhance

Intensity adjustments, histogram equalization, normalization and a differentiable JPEG codec.

kornia.morphology

Dilation, erosion, opening, closing, gradient, top hat and bottom hat.

Geometry & 3D#

kornia.geometry

Warps, camera models, conversions, epipolar geometry, Lie groups, RANSAC and more.

kornia.sensors

Experimental camera model API.

Training#

kornia.augmentation

Random and deterministic augmentations for images, masks, boxes, keypoints and video, with transform tracking and inversion.

kornia.losses

Reconstruction, segmentation, distribution and morphology losses.

kornia.metrics

Classification, segmentation, detection, image quality, flow, stereo and pose metrics.

Features & matching#

kornia.feature

Local feature detectors, descriptors and matchers, classical and learned.

Models#

kornia.models

Builders for the pretrained detection, edge detection, segmentation and tracking models.

kornia.contrib

Experimental operators and model wrappers: face detection, object detection, visual prompting, image stitching, KMeans.

kornia.tracking

Homography tracking.

Data & deployment#

kornia.io

Load and save images as tensors.

kornia.image

Image container, drawing, tensor/NumPy conversion.

kornia.onnx

Run and chain ONNX models with ONNX Runtime.

kornia.core

Tensor wrapper and shared utilities.