mirror of
https://github.com/serengil/deepface.git
synced 2025-06-07 03:55:21 +00:00
eyes can be none
This commit is contained in:
parent
71bea587da
commit
87a95dc2ae
@ -56,8 +56,10 @@ class OpenCvClient(Detector):
|
||||
|
||||
# eyes found in the detected face instead image itself
|
||||
# detected face's coordinates should be added
|
||||
left_eye = (x + left_eye[0], y + left_eye[1])
|
||||
right_eye = (x + right_eye[0], y + right_eye[1])
|
||||
if left_eye is not None:
|
||||
left_eye = (x + left_eye[0], y + left_eye[1])
|
||||
if right_eye is not None:
|
||||
right_eye = (x + right_eye[0], y + right_eye[1])
|
||||
|
||||
facial_area = FacialAreaRegion(
|
||||
x=x,
|
||||
|
@ -134,8 +134,10 @@ class SsdClient(Detector):
|
||||
|
||||
# eyes found in the detected face instead image itself
|
||||
# detected face's coordinates should be added
|
||||
left_eye = (x + left_eye[0], y + left_eye[1])
|
||||
right_eye = (x + right_eye[0], y + right_eye[1])
|
||||
if left_eye is not None:
|
||||
left_eye = (x + left_eye[0], y + left_eye[1])
|
||||
if right_eye is not None:
|
||||
right_eye = (x + right_eye[0], y + right_eye[1])
|
||||
|
||||
facial_area = FacialAreaRegion(
|
||||
x=x,
|
||||
|
Loading…
x
Reference in New Issue
Block a user