basic hack for osx

This commit is contained in:
jkennedyvz 2022-05-22 18:02:03 -07:00
parent 0d19d8ec8e
commit 8aadbfef4a
3 changed files with 6 additions and 5 deletions

View file

@ -143,7 +143,7 @@ def gen_warp_params (w, flip=False, rotation_range=[-10,10], scale_range=[-0.5,
################
#random transform
random_transform_mat = cv2.getRotationMatrix2D((w // 2, w // 2), rotation, scale)
random_transform_mat = cv2.getRotationMatrix2D((int(w // 2), int(w // 2)), rotation, scale)
random_transform_mat[:, 2] += (tx*w, ty*w)
params = dict()
@ -178,4 +178,4 @@ def warp_by_params (params, img, can_warp, can_transform, can_flip, border_repli
img = img[...,None]
if can_flip and params['flip']:
img = img[:,::-1,...]
return img
return img