From 7414066a733ea2af351e7352c15d139bc27114df Mon Sep 17 00:00:00 2001 From: Sefik Ilkin Serengil Date: Fri, 24 Feb 2023 12:05:13 +0000 Subject: [PATCH] docstring --- deepface/DeepFace.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/deepface/DeepFace.py b/deepface/DeepFace.py index d533e2b..59c5381 100644 --- a/deepface/DeepFace.py +++ b/deepface/DeepFace.py @@ -817,6 +817,35 @@ def extract_faces( def detectFace( img_path, target_size=(224, 224), detector_backend="opencv", enforce_detection=True, align=True ): + """ + Deprecated function. Use extract_faces for same functionality. + + This function applies pre-processing stages of a face recognition pipeline + including detection and alignment + + Parameters: + img_path: exact image path, numpy array (BGR) or base64 encoded image. + Source image can have many face. Then, result will be the size of number + of faces appearing in that source image. + + target_size (tuple): final shape of facial image. black pixels will be + added to resize the image. + + detector_backend (string): face detection backends are retinaface, mtcnn, + opencv, ssd or dlib + + enforce_detection (boolean): function throws exception if face cannot be + detected in the fed image. Set this to False if you do not want to get + an exception and run the function anyway. + + align (boolean): alignment according to the eye positions. + + grayscale (boolean): extracting faces in rgb or gray scale + + Returns: + detected and aligned face as numpy array + + """ print("⚠️ Function detectFace is deprecated. Use extract_faces instead.") face_objs = extract_faces( img_path=img_path,