-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpredict.py
31 lines (28 loc) · 815 Bytes
/
predict.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
from PIL import Image
from facenet import Facenet
#
# if __name__ == "__main__":
# model = Facenet()
# while True:
# image_1 = input('Input image_1 filename:')
# try:
# image_1 = Image.open(image_1)
# except:
# print('Image_1 Open Error! Try again!')
# continue
#
# image_2 = input('Input image_2 filename:')
# try:
# image_2 = Image.open(image_2)
# except:
# print('Image_2 Open Error! Try again!')
# continue
#
# probability = model.detect_image(image_1,image_2)
# print(probability)
if __name__ == "__main__":
model = Facenet()
image_1 = 'img/1_001.jpg'
image_1 = Image.open(image_1)
probability = model.get_embedding(image_1)
print(probability)