From 6830303df480e8831f61585a6ac344114094dd05 Mon Sep 17 00:00:00 2001 From: Vadim Epstein Date: Thu, 28 Oct 2021 20:18:39 +0300 Subject: [PATCH] kornia fix --- transforms.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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