From e03872744bb309ad887c11eb90bdfad92e034144 Mon Sep 17 00:00:00 2001 From: Sefik Ilkin Serengil Date: Fri, 15 Jan 2021 10:24:01 +0300 Subject: [PATCH] preprocess face instead of detectface --- tests/face-recognition-how.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/face-recognition-how.py b/tests/face-recognition-how.py index deb201f..11aa398 100644 --- a/tests/face-recognition-how.py +++ b/tests/face-recognition-how.py @@ -21,10 +21,12 @@ print("model output shape: ", model.layers[-1].input_shape[-1]) #---------------------------------------------- #load images and find embeddings -img1 = functions.detectFace("dataset/img1.jpg", input_shape) +#img1 = functions.detectFace("dataset/img1.jpg", input_shape) +img1 = functions.preprocess_face("dataset/img1.jpg", input_shape) img1_representation = model.predict(img1)[0,:] -img2 = functions.detectFace("dataset/img3.jpg", input_shape) +#img2 = functions.detectFace("dataset/img3.jpg", input_shape) +img2 = functions.preprocess_face("dataset/img3.jpg", input_shape) img2_representation = model.predict(img2)[0,:] #---------------------------------------------- @@ -81,4 +83,4 @@ plt.colorbar() plt.show() -#---------------------------------------------- \ No newline at end of file +#----------------------------------------------