in case of eyes null

This commit is contained in:
Sefik Ilkin Serengil 2024-06-02 21:12:30 +01:00
parent 5f98932ac2
commit 6d3b7aa4c4

View File

@ -156,8 +156,10 @@ def detect_faces(
x = x - width_border
y = y - height_border
# w and h will not change
left_eye = (left_eye[0] - width_border, left_eye[1] - height_border)
right_eye = (right_eye[0] - width_border, right_eye[1] - height_border)
if left_eye is not None:
left_eye = (left_eye[0] - width_border, left_eye[1] - height_border)
if right_eye is not None:
right_eye = (right_eye[0] - width_border, right_eye[1] - height_border)
result = DetectedFace(
img=detected_face,