Esto es una prueba.
Welcome to WordPress. This is your first post. Edit or delete it, then start writing!
import matplotlib.pyplot as plt
fig=plt.figure(figsize=(16,16))
all_top_classes = []
# Loop through images run them through our classifer
for (i,file) in enumerate(file_names):
img = image.load_img(mypath+file, target_size=(224, 224))
x = image.img_to_array(img)
x = np.expand_dims(x, axis=0)
x = preprocess_input(x)
#load image using opencv
img2 = cv2.imread(mypath+file)
#imageL = cv2.resize(img2, None, fx=.5, fy=.5, interpolation = cv2.INTER_CUBIC)
# Get Predictions
preds = model.predict(x)
preditions = decode_predictions(preds, top=10)[0]
all_top_classes.append([x[1] for x in preditions])
# Plot image
sub = fig.add_subplot(len(file_names),1, i+1)
sub.set_title(f'Predicted {str(preditions)}')
plt.axis('off')
plt.imshow(cv2.cvtColor(img2, cv2.COLOR_BGR2RGB))
plt.show()
Hi, this is a comment.
To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard.
Commenter avatars come from Gravatar.