mirror of
https://github.com/serengil/deepface.git
synced 2025-06-07 03:55:21 +00:00
docstring
This commit is contained in:
parent
75f3eb7577
commit
7414066a73
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user