Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Couple of errors in get_embd.py #32

Open
AkhilAshref opened this issue Nov 14, 2019 · 0 comments
Open

Couple of errors in get_embd.py #32

AkhilAshref opened this issue Nov 14, 2019 · 0 comments

Comments

@AkhilAshref
Copy link

AkhilAshref commented Nov 14, 2019

Line 54: typo thresholdes(I assume this is threshold only)
Function load_image():
line 28:
line 37: doesn't have folder name before image name hence not reading
how I corrected it:-

def load_image(main_path, image_size):
    print('reading %s' % main_path)
    if os.path.isdir(main_path):
        paths = list(os.listdir(main_path))
        #print(paths)
    else:
        paths = [main_path]
    images = []
    images_f = []
    for path in paths:
        img = misc.imread(os.path.join(main_path, path))
        img = misc.imresize(img, [image_size, image_size])
        # img = img[s:s+image_size, s:s+image_size, :]
        img_f = np.fliplr(img)
        img = img/127.5-1.0
        img_f = img_f/127.5-1.0
        images.append(img)
        images_f.append(img_f)
    fns = [os.path.basename(p) for p in paths]
    print('done!')
    return (np.array(images), np.array(images_f), fns)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant