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: # 识别成功