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

Synced
Synced
Oct 11 · 3 min read

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.

SyncedReview

We produce professional, authoritative, and thought-provoking content relating to artificial intelligence, machine intelligence, emerging technologies and industrial insights.

Synced

Written by

Synced

AI Technology & Industry Review — syncedreview.com | Newsletter: goo.gl/Q4cP3B | Become Synced Insight Partner: goo.gl/ucXZDw | Twitter: @Synced_Global

SyncedReview

We produce professional, authoritative, and thought-provoking content relating to artificial intelligence, machine intelligence, emerging technologies and industrial insights.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade