add missing param "warp_rnd_state=None"

This commit is contained in:
JanFschr 2021-11-22 18:46:55 +01:00 committed by GitHub
commit e36c299e81
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -104,7 +104,7 @@ def gen_pts(W, H, rnd_state=None):
return pts1, pts2
def gen_warp_params (w, flip=False, rotation_range=[-2,2], scale_range=[-0.5, 0.5], tx_range=[-0.05, 0.05], ty_range=[-0.05, 0.05], rnd_state=None ):
def gen_warp_params (w, flip=False, rotation_range=[-2,2], scale_range=[-0.5, 0.5], tx_range=[-0.05, 0.05], ty_range=[-0.05, 0.05], rnd_state=None, warp_rnd_state=None):
if rnd_state is None:
rnd_state = np.random
if warp_rnd_state is None:
@ -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