feat: 清除不需要的数据
This commit is contained in:
parent
6e06a9ea1d
commit
2d59864f65
|
@ -362,7 +362,7 @@ class HrmService:
|
||||||
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_facedata_from_img(cls, img_path):
|
def get_facedata_from_img_x(cls, img_path):
|
||||||
import face_recognition
|
import face_recognition
|
||||||
try:
|
try:
|
||||||
photo_path = settings.BASE_DIR + img_path
|
photo_path = settings.BASE_DIR + img_path
|
||||||
|
@ -418,6 +418,7 @@ class HrmService:
|
||||||
global_face = cache.get('global_face')
|
global_face = cache.get('global_face')
|
||||||
dfs = face_find(img_path=img_path, global_face=global_face)
|
dfs = face_find(img_path=img_path, global_face=global_face)
|
||||||
# dfs = DeepFace.find(img_path=img_path, db_path=db_path)
|
# dfs = DeepFace.find(img_path=img_path, db_path=db_path)
|
||||||
|
os.remove(img_path)
|
||||||
df = dfs[0]
|
df = dfs[0]
|
||||||
if not df.empty:
|
if not df.empty:
|
||||||
matched = df.iloc[0].identity
|
matched = df.iloc[0].identity
|
||||||
|
|
Loading…
Reference in New Issue