From bf8a965586dad9edad31408fef758bf75c9b3975 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Tue, 7 Sep 2021 12:18:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E8=84=B8=E8=AF=86=E5=88=AB=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hb_server/apps/system/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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: