fix: hrm face_data 字段
This commit is contained in:
parent
8fd85bed02
commit
6c10cb647f
|
@ -415,6 +415,7 @@ class HrmService:
|
|||
if face_df is None:
|
||||
from apps.hrm.tasks import update_global_face_pd
|
||||
face_df = update_global_face_pd()
|
||||
face_df = cache.get('global_face_df')
|
||||
dfs = face_find(img_path=img_path, global_df=face_df)
|
||||
# dfs = DeepFace.find(img_path=img_path, db_path=db_path)
|
||||
df = dfs[0]
|
||||
|
|
|
@ -132,5 +132,4 @@ def update_global_face_pd():
|
|||
facedata = Employee.objects.filter(face_data__isnull=False,
|
||||
user__is_active=True).values_list('id', 'face_data')
|
||||
face_df = pd.DataFrame(list(facedata), columns=["identity", "VGG-Face_representation"])
|
||||
cache.set('global_face_df', face_df, timeout=None)
|
||||
return face_df
|
||||
cache.set('global_face_df', face_df, timeout=None)
|
Loading…
Reference in New Issue