Cv2 remap in pytorch?

@thehappyidiot Any updates on this?

I also had the same observation recently. Basically, the output from grid_sample() looks different from what cv2.remap() produces in that the former appears “scaled” compared to the latter. Best I can describe this scaled effect is what this question has mentioned.. I see that depending on the inputs, the output from cv2.remap() leaves the invalid areas of pixel values unpopulated, whereas grid_sample() appears have scaled the image in a way that these areas do not exist.

Not sure how to replicate the behavior of cv2.remap() using grid_sample(). Maybe this difference is intended and there’s no way around it…?