From 2d59864f650ec8d1ed25d9a5c6fef0153f2fd092 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Tue, 12 Sep 2023 08:49:37 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B8=85=E9=99=A4=E4=B8=8D=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E7=9A=84=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/hrm/services.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/hrm/services.py b/apps/hrm/services.py index 78569a92..576e2de8 100755 --- a/apps/hrm/services.py +++ b/apps/hrm/services.py @@ -362,7 +362,7 @@ class HrmService: @classmethod - def get_facedata_from_img(cls, img_path): + def get_facedata_from_img_x(cls, img_path): import face_recognition try: photo_path = settings.BASE_DIR + img_path @@ -418,6 +418,7 @@ class HrmService: global_face = cache.get('global_face') dfs = face_find(img_path=img_path, global_face=global_face) # dfs = DeepFace.find(img_path=img_path, db_path=db_path) + os.remove(img_path) df = dfs[0] if not df.empty: matched = df.iloc[0].identity