人脸识别bug
This commit is contained in:
parent
f075b119ee
commit
a2c025cdf2
|
@ -28,8 +28,11 @@ class HRMService:
|
|||
face_users = cache.get('face_users')
|
||||
if face_datas is None:
|
||||
update_all_user_facedata_cache()
|
||||
|
||||
results = face_recognition.compare_faces(face_datas, unknown_face_encoding, tolerance=0.5)
|
||||
try:
|
||||
results = face_recognition.compare_faces(face_datas,
|
||||
unknown_face_encoding, tolerance=0.5)
|
||||
except:
|
||||
return None, '识别失败'
|
||||
for index, value in enumerate(results):
|
||||
if value:
|
||||
# 识别成功
|
||||
|
|
Loading…
Reference in New Issue