Update 'face_recognition/app/app.py'

This commit is contained in:
fabrice 2019-06-24 12:44:01 +00:00
parent edb85e9976
commit e9c62eba7d

View File

@ -48,7 +48,7 @@ def new_face():
save_img(img.encode(), '/tmp/'+str(id)+'.jpg')
#to debug send img
minioClient.fput_object('users', str(id)+'.jpg', '/tmp/'+str(id)+'.jpg')
face = face_recognition.load_image_file('/tmp/'+str(id))
face = face_recognition.load_image_file('/tmp/'+str(id)+'.jpg')
face_encoding = face_recognition.face_encodings(face)[0]
with open('/tmp/'+str(id)+'.pkl', 'wb') as file:
pickle.dump(face_encoding, file)