siamese/evaluate.py

14 lines
499 B
Python
Raw Normal View History

import tensorflow.keras as keras
from PIL import Image
import numpy as np
import pdb
model = keras.models.load_model('./siamese_checkpoint')
image1 = np.asarray(Image.open('../towards/data/fruits-360/Training/Avocado/r_254_100.jpg').convert('RGB').resize((100,
100))) / 255
image2 = np.asarray(Image.open('../towards/data/fruits-360/Training/Avocado/r_250_100.jpg').convert('RGB').resize((100,
100))) / 255
output = model.predict([np.array([image2]), np.array([image1])])
pdb.set_trace()