Kornia remap function

Hey everyone,

I’m trying to convert a code that uses cv2 to a diffrentiable pytorch one.
that code uses cv2.remap function with the following parameters:
src.shape - (3, 418, 818)
map_x.shape - (256,256)
map_y.shape - (256,256)

I tried to use the same parameters with kornia.geomtry.remap (from my understanding the functions should do the same operation), however, the kornia code crushes with the following error:
ValueError: Inputs last two dimensions must match.
which means kornia doesn’t accept different image and maps shapes, unlike cv2.

Is there any workaround?

@Alon_Zolfi thanks for the feedback.

Definitely we can support that from kornia side. We just need to remove an assertion in the input.

Would you mind to open a ticket in kornia or a quick PR addressing that ?