mirror of
https://github.com/serengil/deepface.git
synced 2025-06-07 20:15:21 +00:00
docstrings updated for centerface
This commit is contained in:
parent
3e5b36f70b
commit
752ae83604
@ -88,7 +88,8 @@ def verify(
|
|||||||
OpenFace, DeepFace, DeepID, Dlib, ArcFace, SFace and GhostFaceNet (default is VGG-Face).
|
OpenFace, DeepFace, DeepID, Dlib, ArcFace, SFace and GhostFaceNet (default is VGG-Face).
|
||||||
|
|
||||||
detector_backend (string): face detector backend. Options: 'opencv', 'retinaface',
|
detector_backend (string): face detector backend. Options: 'opencv', 'retinaface',
|
||||||
'mtcnn', 'ssd', 'dlib', 'mediapipe', 'yolov8' or 'skip' (default is opencv).
|
'mtcnn', 'ssd', 'dlib', 'mediapipe', 'yolov8', 'centerface' or 'skip'
|
||||||
|
(default is opencv).
|
||||||
|
|
||||||
distance_metric (string): Metric for measuring similarity. Options: 'cosine',
|
distance_metric (string): Metric for measuring similarity. Options: 'cosine',
|
||||||
'euclidean', 'euclidean_l2' (default is cosine).
|
'euclidean', 'euclidean_l2' (default is cosine).
|
||||||
@ -168,7 +169,8 @@ def analyze(
|
|||||||
Set to False to avoid the exception for low-resolution images (default is True).
|
Set to False to avoid the exception for low-resolution images (default is True).
|
||||||
|
|
||||||
detector_backend (string): face detector backend. Options: 'opencv', 'retinaface',
|
detector_backend (string): face detector backend. Options: 'opencv', 'retinaface',
|
||||||
'mtcnn', 'ssd', 'dlib', 'mediapipe', 'yolov8' or 'skip' (default is opencv).
|
'mtcnn', 'ssd', 'dlib', 'mediapipe', 'yolov8', 'centerface' or 'skip'
|
||||||
|
(default is opencv).
|
||||||
|
|
||||||
distance_metric (string): Metric for measuring similarity. Options: 'cosine',
|
distance_metric (string): Metric for measuring similarity. Options: 'cosine',
|
||||||
'euclidean', 'euclidean_l2' (default is cosine).
|
'euclidean', 'euclidean_l2' (default is cosine).
|
||||||
@ -272,7 +274,8 @@ def find(
|
|||||||
Set to False to avoid the exception for low-resolution images (default is True).
|
Set to False to avoid the exception for low-resolution images (default is True).
|
||||||
|
|
||||||
detector_backend (string): face detector backend. Options: 'opencv', 'retinaface',
|
detector_backend (string): face detector backend. Options: 'opencv', 'retinaface',
|
||||||
'mtcnn', 'ssd', 'dlib', 'mediapipe', 'yolov8' or 'skip' (default is opencv).
|
'mtcnn', 'ssd', 'dlib', 'mediapipe', 'yolov8', 'centerface' or 'skip'
|
||||||
|
(default is opencv).
|
||||||
|
|
||||||
align (boolean): Perform alignment based on the eye positions (default is True).
|
align (boolean): Perform alignment based on the eye positions (default is True).
|
||||||
|
|
||||||
@ -348,7 +351,8 @@ def represent(
|
|||||||
(default is True).
|
(default is True).
|
||||||
|
|
||||||
detector_backend (string): face detector backend. Options: 'opencv', 'retinaface',
|
detector_backend (string): face detector backend. Options: 'opencv', 'retinaface',
|
||||||
'mtcnn', 'ssd', 'dlib', 'mediapipe', 'yolov8' or 'skip' (default is opencv).
|
'mtcnn', 'ssd', 'dlib', 'mediapipe', 'yolov8', 'centerface' or 'skip'
|
||||||
|
(default is opencv).
|
||||||
|
|
||||||
align (boolean): Perform alignment based on the eye positions (default is True).
|
align (boolean): Perform alignment based on the eye positions (default is True).
|
||||||
|
|
||||||
@ -406,7 +410,8 @@ def stream(
|
|||||||
OpenFace, DeepFace, DeepID, Dlib, ArcFace, SFace and GhostFaceNet (default is VGG-Face).
|
OpenFace, DeepFace, DeepID, Dlib, ArcFace, SFace and GhostFaceNet (default is VGG-Face).
|
||||||
|
|
||||||
detector_backend (string): face detector backend. Options: 'opencv', 'retinaface',
|
detector_backend (string): face detector backend. Options: 'opencv', 'retinaface',
|
||||||
'mtcnn', 'ssd', 'dlib', 'mediapipe', 'yolov8' or 'skip' (default is opencv).
|
'mtcnn', 'ssd', 'dlib', 'mediapipe', 'yolov8', 'centerface' or 'skip'
|
||||||
|
(default is opencv).
|
||||||
|
|
||||||
distance_metric (string): Metric for measuring similarity. Options: 'cosine',
|
distance_metric (string): Metric for measuring similarity. Options: 'cosine',
|
||||||
'euclidean', 'euclidean_l2' (default is cosine).
|
'euclidean', 'euclidean_l2' (default is cosine).
|
||||||
@ -454,7 +459,8 @@ def extract_faces(
|
|||||||
as a string, numpy array (BGR), or base64 encoded images.
|
as a string, numpy array (BGR), or base64 encoded images.
|
||||||
|
|
||||||
detector_backend (string): face detector backend. Options: 'opencv', 'retinaface',
|
detector_backend (string): face detector backend. Options: 'opencv', 'retinaface',
|
||||||
'mtcnn', 'ssd', 'dlib', 'mediapipe', 'yolov8' or 'skip' (default is opencv).
|
'mtcnn', 'ssd', 'dlib', 'mediapipe', 'yolov8', 'centerface' or 'skip'
|
||||||
|
(default is opencv).
|
||||||
|
|
||||||
enforce_detection (boolean): If no face is detected in an image, raise an exception.
|
enforce_detection (boolean): If no face is detected in an image, raise an exception.
|
||||||
Set to False to avoid the exception for low-resolution images (default is True).
|
Set to False to avoid the exception for low-resolution images (default is True).
|
||||||
@ -520,7 +526,8 @@ def detectFace(
|
|||||||
added to resize the image (default is (224, 224)).
|
added to resize the image (default is (224, 224)).
|
||||||
|
|
||||||
detector_backend (string): face detector backend. Options: 'opencv', 'retinaface',
|
detector_backend (string): face detector backend. Options: 'opencv', 'retinaface',
|
||||||
'mtcnn', 'ssd', 'dlib', 'mediapipe', 'yolov8' or 'skip' (default is opencv).
|
'mtcnn', 'ssd', 'dlib', 'mediapipe', 'yolov8', 'centerface' or 'skip'
|
||||||
|
(default is opencv).
|
||||||
|
|
||||||
enforce_detection (boolean): If no face is detected in an image, raise an exception.
|
enforce_detection (boolean): If no face is detected in an image, raise an exception.
|
||||||
Set to False to avoid the exception for low-resolution images (default is True).
|
Set to False to avoid the exception for low-resolution images (default is True).
|
||||||
|
@ -34,7 +34,8 @@ def analyze(
|
|||||||
Set to False to avoid the exception for low-resolution images (default is True).
|
Set to False to avoid the exception for low-resolution images (default is True).
|
||||||
|
|
||||||
detector_backend (string): face detector backend. Options: 'opencv', 'retinaface',
|
detector_backend (string): face detector backend. Options: 'opencv', 'retinaface',
|
||||||
'mtcnn', 'ssd', 'dlib', 'mediapipe', 'yolov8' or 'skip' (default is opencv).
|
'mtcnn', 'ssd', 'dlib', 'mediapipe', 'yolov8', 'centerface' or 'skip'
|
||||||
|
(default is opencv).
|
||||||
|
|
||||||
distance_metric (string): Metric for measuring similarity. Options: 'cosine',
|
distance_metric (string): Metric for measuring similarity. Options: 'cosine',
|
||||||
'euclidean', 'euclidean_l2' (default is cosine).
|
'euclidean', 'euclidean_l2' (default is cosine).
|
||||||
|
@ -33,7 +33,8 @@ def extract_faces(
|
|||||||
as a string, numpy array (BGR), or base64 encoded images.
|
as a string, numpy array (BGR), or base64 encoded images.
|
||||||
|
|
||||||
detector_backend (string): face detector backend. Options: 'opencv', 'retinaface',
|
detector_backend (string): face detector backend. Options: 'opencv', 'retinaface',
|
||||||
'mtcnn', 'ssd', 'dlib', 'mediapipe', 'yolov8' or 'skip' (default is opencv)
|
'mtcnn', 'ssd', 'dlib', 'mediapipe', 'yolov8', 'centerface' or 'skip'
|
||||||
|
(default is opencv)
|
||||||
|
|
||||||
enforce_detection (boolean): If no face is detected in an image, raise an exception.
|
enforce_detection (boolean): If no face is detected in an image, raise an exception.
|
||||||
Default is True. Set to False to avoid the exception for low-resolution images.
|
Default is True. Set to False to avoid the exception for low-resolution images.
|
||||||
|
@ -52,7 +52,7 @@ def find(
|
|||||||
Default is True. Set to False to avoid the exception for low-resolution images.
|
Default is True. Set to False to avoid the exception for low-resolution images.
|
||||||
|
|
||||||
detector_backend (string): face detector backend. Options: 'opencv', 'retinaface',
|
detector_backend (string): face detector backend. Options: 'opencv', 'retinaface',
|
||||||
'mtcnn', 'ssd', 'dlib', 'mediapipe', 'yolov8' or 'skip'.
|
'mtcnn', 'ssd', 'dlib', 'mediapipe', 'yolov8', 'centerface' or 'skip'.
|
||||||
|
|
||||||
align (boolean): Perform alignment based on the eye positions.
|
align (boolean): Perform alignment based on the eye positions.
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ def represent(
|
|||||||
Default is True. Set to False to avoid the exception for low-resolution images.
|
Default is True. Set to False to avoid the exception for low-resolution images.
|
||||||
|
|
||||||
detector_backend (string): face detector backend. Options: 'opencv', 'retinaface',
|
detector_backend (string): face detector backend. Options: 'opencv', 'retinaface',
|
||||||
'mtcnn', 'ssd', 'dlib', 'mediapipe', 'yolov8' or 'skip'.
|
'mtcnn', 'ssd', 'dlib', 'mediapipe', 'yolov8', 'centerface' or 'skip'.
|
||||||
|
|
||||||
align (boolean): Perform alignment based on the eye positions.
|
align (boolean): Perform alignment based on the eye positions.
|
||||||
|
|
||||||
|
@ -43,7 +43,8 @@ def analysis(
|
|||||||
OpenFace, DeepFace, DeepID, Dlib, ArcFace, SFace and GhostFaceNet (default is VGG-Face).
|
OpenFace, DeepFace, DeepID, Dlib, ArcFace, SFace and GhostFaceNet (default is VGG-Face).
|
||||||
|
|
||||||
detector_backend (string): face detector backend. Options: 'opencv', 'retinaface',
|
detector_backend (string): face detector backend. Options: 'opencv', 'retinaface',
|
||||||
'mtcnn', 'ssd', 'dlib', 'mediapipe', 'yolov8' or 'skip' (default is opencv).
|
'mtcnn', 'ssd', 'dlib', 'mediapipe', 'yolov8', 'centerface' or 'skip'
|
||||||
|
(default is opencv).
|
||||||
|
|
||||||
distance_metric (string): Metric for measuring similarity. Options: 'cosine',
|
distance_metric (string): Metric for measuring similarity. Options: 'cosine',
|
||||||
'euclidean', 'euclidean_l2' (default is cosine).
|
'euclidean', 'euclidean_l2' (default is cosine).
|
||||||
@ -182,7 +183,8 @@ def search_identity(
|
|||||||
model_name (str): Model for face recognition. Options: VGG-Face, Facenet, Facenet512,
|
model_name (str): Model for face recognition. Options: VGG-Face, Facenet, Facenet512,
|
||||||
OpenFace, DeepFace, DeepID, Dlib, ArcFace, SFace and GhostFaceNet (default is VGG-Face).
|
OpenFace, DeepFace, DeepID, Dlib, ArcFace, SFace and GhostFaceNet (default is VGG-Face).
|
||||||
detector_backend (string): face detector backend. Options: 'opencv', 'retinaface',
|
detector_backend (string): face detector backend. Options: 'opencv', 'retinaface',
|
||||||
'mtcnn', 'ssd', 'dlib', 'mediapipe', 'yolov8' or 'skip' (default is opencv).
|
'mtcnn', 'ssd', 'dlib', 'mediapipe', 'yolov8', 'centerface' or 'skip'
|
||||||
|
(default is opencv).
|
||||||
distance_metric (string): Metric for measuring similarity. Options: 'cosine',
|
distance_metric (string): Metric for measuring similarity. Options: 'cosine',
|
||||||
'euclidean', 'euclidean_l2' (default is cosine).
|
'euclidean', 'euclidean_l2' (default is cosine).
|
||||||
Returns:
|
Returns:
|
||||||
@ -349,7 +351,8 @@ def grab_facial_areas(
|
|||||||
Args:
|
Args:
|
||||||
img (np.ndarray): image itself
|
img (np.ndarray): image itself
|
||||||
detector_backend (string): face detector backend. Options: 'opencv', 'retinaface',
|
detector_backend (string): face detector backend. Options: 'opencv', 'retinaface',
|
||||||
'mtcnn', 'ssd', 'dlib', 'mediapipe', 'yolov8' or 'skip' (default is opencv).
|
'mtcnn', 'ssd', 'dlib', 'mediapipe', 'yolov8', 'centerface' or 'skip'
|
||||||
|
(default is opencv).
|
||||||
threshold (int): threshold for facial area, discard smaller ones
|
threshold (int): threshold for facial area, discard smaller ones
|
||||||
Returns
|
Returns
|
||||||
result (list): list of tuple with x, y, w and h coordinates
|
result (list): list of tuple with x, y, w and h coordinates
|
||||||
@ -414,7 +417,8 @@ def perform_facial_recognition(
|
|||||||
db_path (string): Path to the folder containing image files. All detected faces
|
db_path (string): Path to the folder containing image files. All detected faces
|
||||||
in the database will be considered in the decision-making process.
|
in the database will be considered in the decision-making process.
|
||||||
detector_backend (string): face detector backend. Options: 'opencv', 'retinaface',
|
detector_backend (string): face detector backend. Options: 'opencv', 'retinaface',
|
||||||
'mtcnn', 'ssd', 'dlib', 'mediapipe', 'yolov8' or 'skip' (default is opencv).
|
'mtcnn', 'ssd', 'dlib', 'mediapipe', 'yolov8', 'centerface' or 'skip'
|
||||||
|
(default is opencv).
|
||||||
distance_metric (string): Metric for measuring similarity. Options: 'cosine',
|
distance_metric (string): Metric for measuring similarity. Options: 'cosine',
|
||||||
'euclidean', 'euclidean_l2' (default is cosine).
|
'euclidean', 'euclidean_l2' (default is cosine).
|
||||||
model_name (str): Model for face recognition. Options: VGG-Face, Facenet, Facenet512,
|
model_name (str): Model for face recognition. Options: VGG-Face, Facenet, Facenet512,
|
||||||
|
@ -45,7 +45,8 @@ def verify(
|
|||||||
OpenFace, DeepFace, DeepID, Dlib, ArcFace, SFace and GhostFaceNet (default is VGG-Face).
|
OpenFace, DeepFace, DeepID, Dlib, ArcFace, SFace and GhostFaceNet (default is VGG-Face).
|
||||||
|
|
||||||
detector_backend (string): face detector backend. Options: 'opencv', 'retinaface',
|
detector_backend (string): face detector backend. Options: 'opencv', 'retinaface',
|
||||||
'mtcnn', 'ssd', 'dlib', 'mediapipe', 'yolov8' or 'skip' (default is opencv)
|
'mtcnn', 'ssd', 'dlib', 'mediapipe', 'yolov8', 'centerface' or 'skip'
|
||||||
|
(default is opencv)
|
||||||
|
|
||||||
distance_metric (string): Metric for measuring similarity. Options: 'cosine',
|
distance_metric (string): Metric for measuring similarity. Options: 'cosine',
|
||||||
'euclidean', 'euclidean_l2' (default is cosine).
|
'euclidean', 'euclidean_l2' (default is cosine).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user