Search code examples
pythontensorflowpytorchtensorflow-addons

PyTorch equivalent function for tfa.image.transform


I want to perform an image transformation using a transformation matrix in PyTorch. My previous code was implemented in TensorFlow, so I wonder if there is any PyTorch equivalent function for tfa.image.transform ?

Thank you.


Solution

  • Projective image transformations can be done using kornia library's kornia.geometry.transform.warp_affine function. The API maynot be a drop in replacement of tfa.image.transform. For details refer https://kornia.readthedocs.io/en/latest/geometry.transform.html#kornia-geometry-transform

    Below is the image from kornia transformation.

    Affine transformation from kornia