diff --git a/hb_server/apps/system/views.py b/hb_server/apps/system/views.py index c424b7f..cc9842d 100644 --- a/hb_server/apps/system/views.py +++ b/hb_server/apps/system/views.py @@ -386,8 +386,8 @@ class FaceLogin(CreateAPIView): my_face_encoding = face_recognition.face_encodings(picture_of_me)[0] unknown_picture = face_recognition.load_image_file(filepath) unknown_face_encoding = face_recognition.face_encodings(unknown_picture)[0] - results = face_recognition.compare_faces([my_face_encoding], unknown_face_encoding) - # os.remove(filepath) + results = face_recognition.compare_faces([my_face_encoding], unknown_face_encoding, tolerance=0.2) + os.remove(filepath) if results[0] == True: return Response('这是曹前明') else: