Created
December 18, 2022 08:36
-
-
Save Sachin-crypto/bf20ad28ef5806b51cf58053d1035e21 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 preprocess_img(img_path): | |
open_img = image.load_img(img_path, target_size=(224, 224)) | |
img_arr = image.img_to_array(open_img)/255.0 | |
img_reshape = img_arr.reshape(1, 224,224,3) | |
return img_reshape |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment