'Projective transformations no longer available in TensorFlow 2.0 what can I do?

My team are switching to TensorFlow 2.0. I'm working on a data augmentation pipeline. TensorFlow 1.X had tf.contrib.image.transform that allows for projective transformations. TensorFlow doesn't have the transform function in tf.image and it certainly doesn't have a tf.contrib module.

I considered other options for data augmentation:

  • NVIDIA DALI allows only for affine transformations with 6 parameters.
  • Python package Augmentor supports projective transformations but it operates on PIL images and not tensors.


Solution 1:[1]

Functionality previous included in tf.contrib.image.transform is in the process of being upgraded to TF 2.0 and migrated to TensorFlow Addons (tfa.image). If you have an immediate need for a specific endpoint that has not yet been added, please file it as an issue in the Addons repo.

Migration, deprecation, and rename fates for tf.contrib endpoints are detailed in the TensorFlow organization RFC here.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 M.Innat