Update 'face_recognition/app/app.py'
This commit is contained in:
parent
edb85e9976
commit
e9c62eba7d
@ -48,7 +48,7 @@ def new_face():
|
|||||||
save_img(img.encode(), '/tmp/'+str(id)+'.jpg')
|
save_img(img.encode(), '/tmp/'+str(id)+'.jpg')
|
||||||
#to debug send img
|
#to debug send img
|
||||||
minioClient.fput_object('users', str(id)+'.jpg', '/tmp/'+str(id)+'.jpg')
|
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]
|
face_encoding = face_recognition.face_encodings(face)[0]
|
||||||
with open('/tmp/'+str(id)+'.pkl', 'wb') as file:
|
with open('/tmp/'+str(id)+'.pkl', 'wb') as file:
|
||||||
pickle.dump(face_encoding, file)
|
pickle.dump(face_encoding, file)
|
||||||
|
Loading…
Reference in New Issue
Block a user