Advertisement
Guest User

Untitled

a guest
Dec 13th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. for i in range(10):
  2. image_path = path + 'test/' + str(i + 1) + '.jpg'
  3. image = Image.open(image_path)
  4. data = np.array(image)
  5. resized = scipy.misc.imresize(data, [224, 224, 1])
  6. shape = resized.shape
  7. #print(shape)
  8. reshaped = resized.reshape([1, shape[2], shape[0], shape[1]])
  9. #print(reshaped.shape)
  10. print(vgg.predict(reshaped, True)[2][0])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement