From 91aa42267780d3290c6395a96ee7a20ac82f09d7 Mon Sep 17 00:00:00 2001 From: Sefik Ilkin Serengil Date: Thu, 29 Apr 2021 21:04:08 +0300 Subject: [PATCH] some comments --- deepface/commons/functions.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/deepface/commons/functions.py b/deepface/commons/functions.py index c993cf4..004c798 100644 --- a/deepface/commons/functions.py +++ b/deepface/commons/functions.py @@ -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]