mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-07-12 08:07:03 -07:00
basic hack for osx
This commit is contained in:
parent
0d19d8ec8e
commit
8aadbfef4a
3 changed files with 6 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue