Skip to content

Instantly share code, notes, and snippets.

@cobanov
Created February 14, 2019 10:09
Show Gist options
  • Save cobanov/a94041e837a7da588de1a25272a79b78 to your computer and use it in GitHub Desktop.
Save cobanov/a94041e837a7da588de1a25272a79b78 to your computer and use it in GitHub Desktop.
model = VGG16(weights='imagenet')
img_path = 'images/bird.jpg'
img = image.load_img(img_path, target_size=(224, 224))
x = image.img_to_array(img)
x = np.expand_dims(x, axis=0)
x = preprocess_input(x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment