<jupyter_start><jupyter_text>Image Recognition VGG16<jupyter_code>from keras.preprocessing.image import load_img, img_to_array
from keras.applications.vgg16 import VGG16, preprocess_input, decode_predictions
m = VGG16()
image = load_img('Dolphin.jpg', target_size=(224,224))
image
image = img_to_array(image)
image.shape
image = image.reshape((1,224,224,3))
image = preprocess_input(image)
yhat = m.predict(image)
best_prediction = decode_predictions(yhat)
print(f'Our best guess is: {best_prediction[0]}')<jupyter_output>Our best guess is: [('n02074367', 'dugong', 0.5454146), ('n01491361', 'tiger_shark', 0.23390527), ('n01498041', 'stingray', 0.14827737), ('n01496331', 'electric_ray', 0.037027616), ('n01494475', 'hammerhead', 0.016891558)]
{'fraction_non_alphanumeric': 0.15188172043010753, 'fraction_numerical': 0.14650537634408603, 'mean_word_length': 9.205479452054794, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '203167', 'license': 'MIT', 'n_tokens_mistral': 358, 'n_tokens_neox': 290, 'n_words': 53, 'path': '12_ImageRecogniton.ipynb', 'repo_name': 'maximcondon/Project_MNIST_DeepLearning', 'size': '744'}