You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feature request:
A transform that map the input to the output in tf.contrib.image
In current tf.contrib.image.transform, it says "The transforms are inverted compared to the transform mapping input points to output points".
This is counter-intuitive to me. Why would you define a function that applies a transform converting the output to the input? Isn't input -> transform matrix -> output more straight forward?
We don't want to invert the transformation in the normal code path, since it adds extra complexity (the matrix could not be invertible). Internally, we need to loop over each output pixel and determine the transformed input pixel, so we do need the reverse transformation.
Normally, I think rotate() is used more often, which is negated compared to the usual transformation matrix to avoid needing to use the linalg ops. We also expose the rotation matrix through another function for the user to compose other transformations, and that matrix should be consistent with the one used internally (it should be a reverse transform).
We could add an option to transform(), maybe "forward" that defaults to False, but will invert the matrix if True.
feature request:
A transform that map the input to the output in tf.contrib.image
In current tf.contrib.image.transform, it says "The transforms are inverted compared to the transform mapping input points to output points".
This is counter-intuitive to me. Why would you define a function that applies a transform converting the output to the input? Isn't input -> transform matrix -> output more straight forward?
Update:
I believe this should be easy to implement.
You can check the the source code here.
Under
def transform
, it says:To make the inverted transform work, people have to use it with
tf.linalg.inv
.My request is to change it to a normal transform, which maps the input point to the output point, so that we don't have to bother with
tf.linalg.inv
.System information
The text was updated successfully, but these errors were encountered: