a guest May 19th, 2019 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- import numpy as np
- import glob
- import matplotlib.pyplot as plt
- import matplotlib.image as mpimg
- from tensorflow.keras.preprocessing import image
- for file in glob.glob('./test2/*'):
- test_image = image.load_img(file, target_size=(64,64))
- test_image = image.img_to_array(test_image)
- test_image = np.expand_dims(test_image, axis=0)
- result = classifier.predict(test_image)
- if result >= 0.5:
- prediction = 'dasha'
- prediction = 'cara'
RAW Paste Data