TF 2.0 is out! Get hands-on practice at TF World, Oct 28-31. Use code TF20 for 20% off select passes. Register now


View source on GitHub

Converts tf.contrib.image projective transforms to affine matrices.


Note that the output matrices map output coordinates to input coordinates. For the forward transformation matrix, call tf.linalg.inv on the result.


  • transforms: Vector of length 8, or batches of transforms with shape (N, 8).


3D tensor of matrices with shape (N, 3, 3). The output matrices map the output coordinates (in homogeneous coordinates) of each transform to the corresponding input coordinates.


  • ValueError: If transforms have an invalid shape.