-
-
Save AMZzee/37d6aab56ace4081d434ac31b40ff162 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def prepare_image(file): | |
img = image.load_img(img_path + file, target_size=(IMAGE_SIZE, IMAGE_SIZE)) | |
img_array = image.img_to_array(img) | |
img_array_expanded_dims = np.expand_dims(img_array, axis=0) | |
return keras.applications.mobilenet.preprocess_input(img_array_expanded_dims) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment