Community-made tutorials for the kornia computer vision library, from basic to advanced. Each tutorial is a Jupyter notebook in nbs/, rendered to a static website with Quarto.
Read them online: https://kornia.github.io/tutorials/
-
Install Quarto (on Linux,
make setup-quartodownloads and installs the binary for you). -
Create a virtual environment (Python 3.10+):
$ virtualenv venv -p python3.10 # or: conda create -p venv python=3.10 -
Install the dependencies:
$ pip install -r requirements.txt $ pip install -r requirements-dev.txt
-
Preview the site with auto-reload:
$ make preview
A tutorial is a regular Jupyter notebook (Python + Markdown cells) placed in nbs/. Quarto compiles it into a web page; see the Quarto docs for extra features.
To add one:
-
Create your notebook in
nbs/. -
Make its first cell a Markdown cell with this frontmatter, followed by a Colab badge:
--- title: "<TUTORIAL TITLE>" description: "<SHORT DESCRIPTION>" author: - "<YOUR NAME>" date: "<MM-DD-YYYY>" categories: - "<LEVEL: basic, intermediate or advanced>" - "<KORNIA MODULE: kornia.color, kornia.augmentation, ...>" - "<OTHER CATEGORIES: see the list below>" image: "../tutorials/assets/<THUMBNAIL FILENAME>.png" --- <a href="https://colab.sandbox.google.com/github/kornia/tutorials/blob/master/nbs/<NOTEBOOK FILENAME>.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open in google colab"></a> -
Add a thumbnail image to
tutorials/assets/. -
Pick categories from the list below; if you introduce a new one, add it to this README too.
Tutorial categories (click to expand)
By level: Basic, Intermediate, Advanced
By module: kornia.augmentation, kornia.feature, kornia.contrib, kornia.filters, kornia.color, kornia.io, kornia.geometry, kornia.enhance
By type: Data augmentation, Segmentation, Edge Detection, Labeling, Denoising, Color spaces, Local features, Filters, Blur, Line, Plane, Keypoints, Homography, Image matching, Image Registration, Warp image, Augmentation container, Augmentation Sequential, Line detection, Line matching, Rescale, Affine, 2D, Unsupervised, Self-supervised, Presets
By model / API name: SOLD2, KeyNet, Adalam, HardNet, DISK, Patches, LAF, LoFTR
New tutorials are very welcome, especially ones that fill coverage gaps. Good starting points:
- Tutorial coverage gaps (#115) — modules with no tutorial yet: depth/3D, camera models,
kornia.ioimage loading, ONNX export/deployment. - Open issues — tutorial requests and other ideas, e.g. image stitching (#98) or a LoFTR indoor example (#44).
Before committing, install the hooks with pre-commit install (or run pre-commit run --all-files) so notebook code style is applied automatically.