From 33bc475c5131aa2cf6b80b7e69b34acde9d959c6 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Fri, 22 Apr 2022 08:38:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=BA=E8=84=B8=E8=AF=86?= =?UTF-8?q?=E5=88=AB=E5=AE=B9=E5=BF=8D=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hb_server/apps/hrm/services.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hb_server/apps/hrm/services.py b/hb_server/apps/hrm/services.py index 180ea62..6241beb 100644 --- a/hb_server/apps/hrm/services.py +++ b/hb_server/apps/hrm/services.py @@ -17,7 +17,7 @@ class HRMService: f.write(base64_data) try: unknown_picture = face_recognition.load_image_file(filepath) - unknown_face_encoding = face_recognition.face_encodings(unknown_picture, num_jitters=2)[0] + unknown_face_encoding = face_recognition.face_encodings(unknown_picture)[0] os.remove(filepath) except: os.remove(filepath) @@ -30,7 +30,7 @@ class HRMService: face_datas = cache.get('face_datas') face_users = cache.get('face_users') results = face_recognition.compare_faces(face_datas, - unknown_face_encoding, tolerance=0.42) + unknown_face_encoding, tolerance=0.38) for index, value in enumerate(results): if value: # 识别成功