preprocess face instead of detectface

This commit is contained in:
Sefik Ilkin Serengil 2021-01-15 10:24:01 +03:00 committed by GitHub
parent 286d48395d
commit e03872744b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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()
#----------------------------------------------
#----------------------------------------------