Skip to content

Commit

Permalink
kornia fix
Browse files Browse the repository at this point in the history
  • Loading branch information
eps696 committed Oct 28, 2021
1 parent 4acd1b6 commit 6d4cbe8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,9 @@ def inner(image_t):
center[..., 0] = (image_t.shape[3] - 1) / 2
center[..., 1] = (image_t.shape[2] - 1) / 2
try:
M = K.get_rotation_matrix2d(center, angle, scale).to(device)
M = kornia.geometry.transform.get_rotation_matrix2d(center, angle, scale).to(device)
except:
M = kornia.get_rotation_matrix2d(center, angle, scale).to(device)
M = kornia.get_rotation_matrix2d(center, angle, scale).to(device)
rotated_image = kornia.warp_affine(image_t.float(), M, dsize=(h, w))
return rotated_image
return inner
Expand Down

0 comments on commit 6d4cbe8

Please sign in to comment.