From 7e14fc875dc5b6cde4150b3cba7bfa8bd4ef5cd8 Mon Sep 17 00:00:00 2001 From: Dries Verachtert Date: Sun, 25 Feb 2024 10:21:26 +0100 Subject: [PATCH] Correct info about returned types for extract_faces --- deepface/DeepFace.py | 4 +++- deepface/modules/detection.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/deepface/DeepFace.py b/deepface/DeepFace.py index 9b24928..e1a7292 100644 --- a/deepface/DeepFace.py +++ b/deepface/DeepFace.py @@ -458,7 +458,9 @@ def extract_faces( - "face" (np.ndarray): The detected face as a NumPy array. - - "facial_area" (List[float]): The detected face's regions represented as a list of floats. + - "facial_area" (Dict[str, Any]): The detected face's regions as a dictionary containing: + - keys 'x', 'y', 'w', 'h' with int values + - keys 'left_eye', 'right_eye' with a tuple of 2 ints as values - "confidence" (float): The confidence score associated with the detected face. """ diff --git a/deepface/modules/detection.py b/deepface/modules/detection.py index a1c97b6..e3042e4 100644 --- a/deepface/modules/detection.py +++ b/deepface/modules/detection.py @@ -66,7 +66,9 @@ def extract_faces( - "face" (np.ndarray): The detected face as a NumPy array. - - "facial_area" (List[float]): The detected face's regions represented as a list of floats. + - "facial_area" (Dict[str, Any]): The detected face's regions as a dictionary containing: + - keys 'x', 'y', 'w', 'h' with int values + - keys 'left_eye', 'right_eye' with a tuple of 2 ints as values - "confidence" (float): The confidence score associated with the detected face. """