mirror of
https://github.com/serengil/deepface.git
synced 2025-06-06 11:35:21 +00:00
nose and mouth unavailable case covered
This commit is contained in:
parent
f7eb2d7873
commit
0ec185721e
@ -42,16 +42,19 @@ class RetinaFaceClient(Detector):
|
||||
# retinaface sets left and right eyes with respect to the person
|
||||
left_eye = identity["landmarks"]["left_eye"]
|
||||
right_eye = identity["landmarks"]["right_eye"]
|
||||
nose = identity["landmarks"]["nose"]
|
||||
mouth_right = identity["landmarks"]["mouth_right"]
|
||||
mouth_left = identity["landmarks"]["mouth_left"]
|
||||
nose = identity["landmarks"].get("nose")
|
||||
mouth_right = identity["landmarks"].get("mouth_right")
|
||||
mouth_left = identity["landmarks"].get("mouth_left")
|
||||
|
||||
# eyes are list of float, need to cast them tuple of int
|
||||
left_eye = tuple(int(i) for i in left_eye)
|
||||
right_eye = tuple(int(i) for i in right_eye)
|
||||
nose = tuple(int(i) for i in nose)
|
||||
mouth_right = tuple(int(i) for i in mouth_right)
|
||||
mouth_left = tuple(int(i) for i in mouth_left)
|
||||
if nose is not None:
|
||||
nose = tuple(int(i) for i in nose)
|
||||
if mouth_right is not None:
|
||||
mouth_right = tuple(int(i) for i in mouth_right)
|
||||
if mouth_left is not None:
|
||||
mouth_left = tuple(int(i) for i in mouth_left)
|
||||
|
||||
confidence = identity["score"]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user