mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-07-06 13:02:15 -07:00
fix SampleProcessor
This commit is contained in:
parent
6aa585fa33
commit
5d5718704d
1 changed files with 6 additions and 2 deletions
|
@ -195,8 +195,12 @@ class SampleProcessor(object):
|
|||
chance, kernel_max_size = gaussian_blur
|
||||
chance = np.clip(chance, 0, 100)
|
||||
|
||||
if np.random.randint(100) < chance:
|
||||
img = cv2.GaussianBlur(img, ( np.random.randint( kernel_max_size )*2+1 ,) *2 , 0)
|
||||
rnd_state = np.random.RandomState (sample_rnd_seed+1)
|
||||
gblur_rnd_chance = rnd_state.randint(100)
|
||||
gblur_rnd_kernel = rnd_state.randint(kernel_max_size)*2+1
|
||||
|
||||
if gblur_rnd_chance < chance:
|
||||
img = cv2.GaussianBlur(img, (gblur_rnd_kernel,) *2 , 0)
|
||||
|
||||
if is_face_sample:
|
||||
target_ft = SampleProcessor.SPTF_FACETYPE_TO_FACETYPE[target_face_type]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue