Detection

Face detector

class apps.expert.data.detection.face_detector.FaceDetector(model_selection: int = 0, min_detection_confidence: float = 0.5, max_num_faces: int = 1)[source]

Bases: object

Face detection and embedding implementation.

FaceDetector processes an BGR image and returns a list of the detected face embeddings and bounding boxes.

Example

>>> face_detector = FaceDetector(model_selection=0, min_detection_confidence=0.9)
detect(image: ndarray) List[source]
Parameters:

image (np.ndarray) – RGB image represented as numpy ndarray.

Returns:

List with detected face locations.

Return type:

List