OpenCV-Inspired Kornia Is a Differentiable Computer Vision Library for PyTorch

Synced
SyncedReview
Published in
3 min readOct 11, 2019

OpenCV is today’s most popular image processing library, covering everything from classic image processing algorithms to cutting-edge deep learning pretrained models. However because OpenCV is not differentiable it mainly focuses on pre-processing tasks and cannot be embedded in an entire training process. That shortcoming motivated OpenCV.org research scientist Edgar Riba to propose a new differentiable computer vision library, “Kornia,” which has now been open-sourced on GitHub.

Inspired by OpenCV, Kornia is based on PyTorch and designed to solve generic computer vision problems. It contains a set of routines for performing color space conversions, and differentiable modules for performing tasks such as image filtering and edge detection. Kornia’s core code can efficiently define and compute the gradient of complex functions with reverse-mode auto-differentiation.

How Kornia deals with differentiation processing

Kornia consists of subset packages containing operators which can be inserted into neural networks to enable models to perform tasks such as image transformations, epipolar geometry, and depth estimation.

Main components of the Kornia library

Kornia is easy to use, and its API documentation and tutorials are available on the Kornia project page.

The Kornia project also offers a number of Jupyter Notebooks that showcase various use cases. The following example shows the steps involved in extracting image features for local descriptors using Kornia:

  • Input an image (similar to OpenCV or other image processing libraries).
  • Load the predefined detection features.
  • Extract image patches based on the features and prepare for subsequent processing.
  • The extracted image patches can be used to further construct tensors using the SIFT method.

One of the main Kornia contributors, Dmytro Mishkin from the Faculty of Electrical Engineering at the Czech Technical University, says the research team welcomes feedback from the AI community to help expand and improve Kornia and its various filters, geometry, and local features.

The paper Kornia: An Open Source Differentiable Computer Vision Library for PyTorch is on arXiv.

Author: Herin Zhao | Editor: Michael Sarazen

We know you don’t want to miss any stories. Subscribe to our popular Synced Global AI Weekly to get weekly AI updates.

Need a comprehensive review of the past, present and future of modern AI research development? Trends of AI Technology Development Report is out!

2018 Fortune Global 500 Public Company AI Adaptivity Report is out!
Purchase a Kindle-formatted report on Amazon.
Apply for Insight Partner Program to get a complimentary full PDF report.

--

--

Synced
SyncedReview

AI Technology & Industry Review — syncedreview.com | Newsletter: http://bit.ly/2IYL6Y2 | Share My Research http://bit.ly/2TrUPMI | Twitter: @Synced_Global