some comments

This commit is contained in:
Sefik Ilkin Serengil 2021-04-29 21:04:08 +03:00
parent f3caa18b6a
commit 91aa422677

View File

@ -129,6 +129,8 @@ def preprocess_face(img, target_size=(224, 224), grayscale = False, enforce_dete
img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
img = cv2.resize(img, target_size)
#TODO: resize causes transformation on base image, you should add black pixels to rezie it to target_size
img_pixels = image.img_to_array(img)
img_pixels = np.expand_dims(img_pixels, axis = 0)
img_pixels /= 255 #normalize input in [0, 1]