mirror of
https://github.com/serengil/deepface.git
synced 2025-06-07 12:05:22 +00:00
preprocess face instead of detectface
This commit is contained in:
parent
286d48395d
commit
e03872744b
@ -21,10 +21,12 @@ print("model output shape: ", model.layers[-1].input_shape[-1])
|
|||||||
#----------------------------------------------
|
#----------------------------------------------
|
||||||
#load images and find embeddings
|
#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,:]
|
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,:]
|
img2_representation = model.predict(img2)[0,:]
|
||||||
|
|
||||||
#----------------------------------------------
|
#----------------------------------------------
|
||||||
@ -81,4 +83,4 @@ plt.colorbar()
|
|||||||
|
|
||||||
plt.show()
|
plt.show()
|
||||||
|
|
||||||
#----------------------------------------------
|
#----------------------------------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user