Update 'face_recognition/app/app.py'

This commit is contained in:
fabrice 2019-06-23 23:53:52 +00:00
parent beee682454
commit 5253e97800

View File

@ -42,7 +42,7 @@ def new_face():
print(img, flush=True)
imgdata = base64.b64decode(img)
with open('/tmp/'+str(id), 'wb') as file:
file.write(imgdata)
file.write(bytearray(imgdata))
minioClient.fput_object('users', str(id)+'.jpg', '/tmp/'+str(id))
face = face_recognition.load_image_file('/tmp/'+str(id))
face_encoding = face_recognition.face_encodings(face)[0]