diff --git a/transforms.py b/transforms.py index fb6e05d..7ab3244 100644 --- a/transforms.py +++ b/transforms.py @@ -59,9 +59,10 @@ def inner(image_t): center[..., 1] = (image_t.shape[2] - 1) / 2 try: M = kornia.geometry.transform.get_rotation_matrix2d(center, angle, scale).to(device) + rotated_image = kornia.geometry.transform..warp_affine(image_t.float(), M, dsize=(h, w)) except: M = kornia.get_rotation_matrix2d(center, angle, scale).to(device) - rotated_image = kornia.warp_affine(image_t.float(), M, dsize=(h, w)) + rotated_image = kornia.warp_affine(image_t.float(), M, dsize=(h, w)) return rotated_image return inner