Kornia v0.4.0 Release Notes
Release Date: 2020-08-06 // over 3 years ago-
๐ Kornia 0.4.0 release
๐ In this release we are including the following main features:
- ๐ Support to PyTorch v1.6.0.
- Local descriptors matching, homography and epipolar geometry API.
- 3D augmentations and low level API to work with volumetric data.
Highlights
Local features matching
โ We include an
kornia.feature.matching
API to perform local descriptors matching such classical and derived version of the nearest neighbour (NN).- โ
match_nn
- โ
match_mnn
- โ
match_snn
โ
match_smnn
import torchimport kornia as Kdesc1 = torch.rand(2500, 128)desc2 = torch.rand(2500, 128)dists, idxs = K.feature.matching.match_nn(desc1, desc2) # 2500 / 2500x2
Homography and epipolar geometry
โ We also introduce
kornia.geometry.homography
including different functionalities to work with homographies and differentiable estimators based on the DLT formulation and the iteratively-reweighted least squares (IRWLS).import torchimport kornia as Kpts1 = torch.rand(1, 8, 2)pts2 = torch.rand(1, 8, 2)H = K.find\_homography\_dlt(pts1, pts2, weights=torch.rand(1, 8)) # 1x3x3
โ In addition, we have ported some of the existing algorithms from opencv.sfm to PyTorch under
kornia.geometry.epipolar
that includes different functionalities to work with Fundamental , Essential or Projection matrices, and Triangulation methods useful for Structure from Motion problems.3D augmentations and volumetric
๐ We expand the
kornia.augmentaion
with a series of operators to perform 3D augmentations for volumetric dataBxCxDxHxW
. In this release, we include the following first set of geometric 3D augmentations methods:- RandomDepthicalFlip3D (along depth axis)
- RandomVerticalFlip3D (along height axis)
- RandomHorizontalFlip3D (along width axis)
- RandomRotation3D
- RandomAffine3D
The API for 3D augmentation work same as with 2D image augmentations:
import torchimport kornia as Kx = torch.eye(3).repeat(3, 1, 1)aug = K.augmentation.RandomVerticalFlip3D(p=1.0)print(aug(x))tensor([[[[[0., 0., 1.], [0., 1., 0.], [1., 0., 0.]],\<BLANKLINE\> [[0., 0., 1.], [0., 1., 0.], [1., 0., 0.]],\<BLANKLINE\> [[0., 0., 1.], [0., 1., 0.], [1., 0., 0.]]]]])
โ Finally, we introduce also a low level API to perform 4D features transformations
kornia.warp_projective
and extending the filtering operators to support 3D kernelskornia.filter3D
.More 2d operators
We expand as well the list of the 2D image augmentations based on the paper
AutoAugment: Learning Augmentation Policies from Data
.Solarize
Posterize
Sharpness
Equalize
RandomSolarize
RandomPosterize
RandomShaprness
RandomEqualize
๐ Improvements
- โ add zca whitening (#458)
- โ add epipolar geometry package (#569)
- Jit warp perspective (#574)
- Autoaugment functions. (#571)
- Dog and fix features (#591)
- implement filter3D (#575)
- Implement warp_projective (#587)
- ๐ Feature matching and H/F/E estimation for SFM (#552)
- 3D augmentations (#592)
๐ฅ Breaking changes
๐ Bugs/Fixes
- ๐ fixed affine 2d shearing matrix translations (#612)
- ๐ป Now SIFTdesc throws and exception when the input parameters are incompatible (#598)
- back to group conv backend for filter2d (#600)
- โก๏ธ updates sosnet git paths (#606)
๐ Docs
- โก๏ธ Updated doc & example for augmentation (#583)
- ๐ fix Tversky equation (#579)
- โ clean docs warnings (#604)
- โ add kornia.geometry.homography docs (#608)
- create kornia.geometry.subpix (#610)
Dev