Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- # Add directory holding utility functions to path to allow importing utility funcitons
- sys.path.append('/kaggle/input/python-utility-code-for-deep-learning-exercises/utils')
- from decode_predictions import decode_predictions
- from IPython.display import Image, display
- most_likely_labels = decode_predictions(my_preds, top=3, class_list_path='../input/resnet50/imagenet_class_index.json')
- for i, img_path in enumerate(image_paths):
- display(Image(img_path))
- print(most_likely_labels[i])
Add Comment
Please, Sign In to add comment