feat: 清除不需要的数据

This commit is contained in:
caoqianming 2023-09-12 08:49:37 +08:00
parent 6e06a9ea1d
commit 2d59864f65
1 changed files with 2 additions and 1 deletions

View File

@ -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