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.

    kornia_medical

    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 data BxCxDxHxW. 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 kernels kornia.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

    • ๐Ÿ‘€ Create kornia.enhance submodule (#614) -> see details in here

    ๐Ÿ› 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

    • ๐Ÿ‘Œ improve conftest fixtures and remove device, dtype imports (#568)
    • โœ… pin versions for pytest plugins and fix flake8 issues (#580)
    • made kornia versions explicit to pytorch version (#597)