diff --git a/deepface/detectors/OpenCv.py b/deepface/detectors/OpenCv.py index 5c7c4eb..93d2492 100644 --- a/deepface/detectors/OpenCv.py +++ b/deepface/detectors/OpenCv.py @@ -57,9 +57,9 @@ class OpenCvClient(Detector): # eyes found in the detected face instead image itself # detected face's coordinates should be added if left_eye is not None: - left_eye = (x + left_eye[0], y + left_eye[1]) + left_eye = (int(x + left_eye[0]), int(y + left_eye[1])) if right_eye is not None: - right_eye = (x + right_eye[0], y + right_eye[1]) + right_eye = (int(x + right_eye[0]), int(y + right_eye[1])) facial_area = FacialAreaRegion( x=x, diff --git a/deepface/detectors/Ssd.py b/deepface/detectors/Ssd.py index c1cd32e..ae0a819 100644 --- a/deepface/detectors/Ssd.py +++ b/deepface/detectors/Ssd.py @@ -135,9 +135,9 @@ class SsdClient(Detector): # eyes found in the detected face instead image itself # detected face's coordinates should be added if left_eye is not None: - left_eye = (x + left_eye[0], y + left_eye[1]) + left_eye = (int(x + left_eye[0]), int(y + left_eye[1])) if right_eye is not None: - right_eye = (x + right_eye[0], y + right_eye[1]) + right_eye = (int(x + right_eye[0]), int(y + right_eye[1])) facial_area = FacialAreaRegion( x=x,