Skip to content

Instantly share code, notes, and snippets.

@adriaciurana
Created January 22, 2019 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adriaciurana/3b9faa625d1bbe508477c788250f3e44 to your computer and use it in GitHub Desktop.
Save adriaciurana/3b9faa625d1bbe508477c788250f3e44 to your computer and use it in GitHub Desktop.
Articulo Medium: Parte 5c
# Cargamos la imagen/imagenes
if os.path.isdir(args.image):
path_images = []
for ext in ['jpg', 'jpeg', 'tiff', 'png', 'gif']:
path_images += glob.glob(os.path.join(args.image, "*." + ext))
else:
path_images = [args.image]
images = []
for path_im in path_images:
images.append(np.float32(cv2.resize(cv2.imread(path_im), (32, 32))[..., ::-1]/255.0))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment