Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for i in range(10):
- image_path = path + 'test/' + str(i + 1) + '.jpg'
- image = Image.open(image_path)
- data = np.array(image)
- resized = scipy.misc.imresize(data, [224, 224, 1])
- shape = resized.shape
- #print(shape)
- reshaped = resized.reshape([1, shape[2], shape[0], shape[1]])
- #print(reshaped.shape)
- print(vgg.predict(reshaped, True)[2][0])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement