Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def image_array(pgm):
- pic = image.load_img(pgm, target_size=(224, 224))
- x = image.img_to_array(pic)
- x = np.expand_dims(x, axis=0)
- x = preprocess_input(x)
- npfeatures = np.array(x)
- return npfeatures
- image = cv2.imread('C:/Users/N/Desktop/Test.jpg')
- gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement