Skip to main content

Open Source Differentiable Computer Vision Library for PyTorch

Project description

https://circleci.com/gh/arraiyopensource/kornia/tree/master.svg?style=svg https://codecov.io/github/arraiyopensource/kornia/branch/master/graph/badge.svg https://badge.fury.io/py/kornia.svg Documentation Status

Kornia is a differentiable computer vision library for PyTorch.

It consists of a set of routines and differentiable modules to solve generic computer vision problems. At its core, the package uses PyTorch as its main backend both for efficiency and to take advantage of the reverse-mode auto-differentiation to define and compute the gradient of complex functions.

Overview

Inspired by OpenCV, this library is composed by a subset of packages containing operators that can be inserted within neural networks to train models to perform image transformations, epipolar geometry, depth estimation, and low level image processing such as filtering and edge detection that operate directly on tensors.

At a granular level, Kornia is a library that consists of the following components:

Component

Description

kornia

a Differentiable Computer Vision library like OpenCV, with strong GPU support

kornia.color

a set of routines to perform color space conversions

kornia.contrib

a compilation of user contrib and experimental operators

kornia.feature

a module to perform feature detection

kornia.filters

a module to perform image filtering and edge detection

kornia.geometry

a geometric computer vision library to perform image transformations, 3D linear algebra and conversions using different camera models

kornia.losses

a stack of loss functions to solve different vision tasks

kornia.utils

image to tensor utilities and metrics for vision problems

Installation

From pip:

pip install kornia

From source:

python setup.py install

From source using pip:

pip install git+https://github.com/arraiyopensource/kornia

Quick Usage

import torch
import kornia

x_rad = kornia.pi * torch.rand(1, 3, 3)
x_deg = kornia.rad2deg(x_rad)

torch.allclose(x_rad, kornia.deg2rad(x_deg))  # True

Examples

Run our Jupyter notebooks examples to learn to use the library.

Cite

If you are using kornia in your research-related documents, it is recommended that you cite the poster.

@misc{Arraiy2018,
 author    = {E. Riba, M. Fathollahi, W. Chaney, E. Rublee and G. Bradski}
 title     = {torchgeometry: when PyTorch meets geometry},
 booktitle = {PyTorch Developer Conference},
 year      = {2018},
 url       = {https://drive.google.com/file/d/1xiao1Xj9WzjJ08YY_nYwsthE-wxfyfhG/view?usp=sharing}
}

Contributing

We appreciate all contributions. If you are planning to contribute back bug-fixes, please do so without any further discussion. If you plan to contribute new features, utility functions or extensions, please first open an issue and discuss the feature with us. Please, consider to read the CONTRIBUTING notes. The participation in this open source project is subject to Code of Conduct.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kornia-0.1.4.tar.gz (79.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kornia-0.1.4-py2.py3-none-any.whl (108.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file kornia-0.1.4.tar.gz.

File metadata

  • Download URL: kornia-0.1.4.tar.gz
  • Upload date:
  • Size: 79.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for kornia-0.1.4.tar.gz
Algorithm Hash digest
SHA256 adef1af92165bb15055beaca27182da6ec745aacbaf57fd78e265e85a2dbc92e
MD5 614d3ef42b9ee0858add1861f49ff4b8
BLAKE2b-256 1700309cb94d760b0769a3b4fc3f8874512ed0ec93b4c263045e54ed6bbf4174

See more details on using hashes here.

File details

Details for the file kornia-0.1.4-py2.py3-none-any.whl.

File metadata

  • Download URL: kornia-0.1.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 108.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for kornia-0.1.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2e92cdd75984e8b1b65ade6d413cf33dc8c63d0aa5cb20b21aaef7a307b6d6f8
MD5 bb734de0acb546c50de168878388c385
BLAKE2b-256 ad1f43e703cb65d253cbbdc5c0a630639673d5c0d575a4047f9734fb04ad7011

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page