Skip to content
Snippets Groups Projects
Commit b1f1e416 authored by Rony Abecidan's avatar Rony Abecidan
Browse files

Update create_domains.py

parent 7916b449
Branches
No related tags found
No related merge requests found
......@@ -52,7 +52,7 @@ def return_filenames(folder_name):
img_folder='img'
addrs=return_filenames(img_folder)
def is_real(mask):
def is_genuine(mask):
m = np.sum(mask)
return (m==0)
......@@ -123,7 +123,7 @@ def extract_patches_for_classification(fake_path,mask_path,real,fake,position,wi
patch_mask = mask[i:i+windows[0],j:j+windows[1]]
if is_real(patch_mask) and (np.random.random()<(nb_patch_max/(H*W))):
if is_genuine(patch_mask) and (np.random.random()<(nb_patch_max/(H*W))):
real[nb_patch_max*position+cpt_real]=patch_img
cpt_real+=1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment