Understanding Flow SPTransform
YoussefFathi opened this issue · comments
YoussefFathi commented
I would appreciate it if you can clarify for me the following points related to specific parts of the "sp_transforms.py" file :
-
In transform_flow() , what is the purpose of the following block of code ?
` # inverse transform coords x0, y0 = self.inverse_transform_coords( width=width, height=height, thetas=theta1) x1, y1 = self.inverse_transform_coords( width=width, height=height, thetas=theta2, offset_x=u, offset_y=v) # subtract and create new flow u = x1 - x0 v = y1 - y0 new_flow = torch.stack([u, v], dim=1)`
-
Why didn't you use only the following part of the code to transform the optical flow just like the transform_image() function ?
` # transform coords xq, yq = self.transform_coords(width=width, height=height, thetas=theta1) # interp2 transformed = self._flow_interp2(new_flow, xq, yq)`
-
What is the difference between the functionality of inverse_transform_coords() and transform_coords() ?
Liang Liu commented