From beea6f3f5412be74e650c87501fe1386c07fa8ab Mon Sep 17 00:00:00 2001 From: caoqianming Date: Sat, 16 Sep 2023 17:55:24 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=BF=98=E6=98=AF=E4=BD=BF=E7=94=A8face?= =?UTF-8?q?=5Frecongnition2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/auth1/views.py | 2 +- requirements.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/auth1/views.py b/apps/auth1/views.py index b181a010..a7071778 100755 --- a/apps/auth1/views.py +++ b/apps/auth1/views.py @@ -265,7 +265,7 @@ class FaceLoginView(CreateAPIView): """ from apps.hrm.services import HrmService base64_data = base64.urlsafe_b64decode(tran64(request.data.get('base64').replace(' ', '+'))) - ep, msg = HrmService.face_find_from_base64(base64_data) + ep, msg = HrmService.face_compare_from_base64(base64_data) if ep: if ep.user and ep.user.is_active and ep.user.is_deleted is False: user = ep.user diff --git a/requirements.txt b/requirements.txt index b6540c25..838fb4d5 100755 --- a/requirements.txt +++ b/requirements.txt @@ -30,4 +30,5 @@ xlwt==1.3.0 openpyxl==3.1.0 cron-descriptor==1.2.35 pymysql==1.0.3 +face-recognition==1.3.0 # deepface==0.0.79