mirror of
https://github.com/serengil/deepface.git
synced 2025-06-09 21:07:09 +00:00
some comments
This commit is contained in:
parent
f3caa18b6a
commit
91aa422677
@ -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]
|
||||
|
Loading…
x
Reference in New Issue
Block a user