Merge pull request #2 from Xu-jianwen/dev

~~
This commit is contained in:
Xu-jianwen 2021-08-10 22:28:02 +08:00 committed by GitHub
commit 0892c1a4e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -12,6 +12,7 @@ model = VGGFace.loadModel()
#model = Facenet.loadModel()
#model = OpenFace.loadModel()
#model = FbDeepFace.loadModel()
model.summary()
input_shape = model.layers[0].input_shape[1:3]
@ -22,11 +23,11 @@ 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.preprocess_face("dataset/img1.jpg", input_shape)
img1 = functions.preprocess_face("test/dataset/img1.jpg", input_shape)
img1_representation = model.predict(img1)[0,:]
#img2 = functions.detectFace("dataset/img3.jpg", input_shape)
img2 = functions.preprocess_face("dataset/img3.jpg", input_shape)
img2 = functions.preprocess_face("test/dataset/img3.jpg", input_shape)
img2_representation = model.predict(img2)[0,:]
#----------------------------------------------
@ -53,7 +54,7 @@ img2_graph = np.array(img2_graph)
distance_graph = np.array(distance_graph)
#----------------------------------------------
#plotting
# plotting
fig = plt.figure()

1
video_stream_infer.py Normal file
View File

@ -0,0 +1 @@
import torch