Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
Toggle table of contents sidebar

# FaceDetector Class

Namespace: id3.Face

## Definition

Detects human faces in images.
Python

    class FaceDetector

Dart

    class FaceDetector implements Finalizable

C#

    public partial class FaceDetector

Java

    public class FaceDetector implements AutoCloseable, Serializable

Swift

    public class FaceDetector

C

    typedef struct id3FaceDetector *ID3_FACE_DETECTOR;

## Usage

Python

    faceDetectorInstance = id3face.FaceDetector()

Explicit destruction

    # ...
    del faceDetectorInstance

Dart

    final faceDetectorInstance = sdk.FaceDetector();
    // ...

Explicit destruction

    // ...
    faceDetectorInstance.dispose()

C#

    using (var faceDetectorInstance = new FaceDetector())
    {
       // ...
    }

Explicit destruction

    var faceDetectorInstance = new FaceDetector()
    // ...
    faceDetectorInstance.Dispose()

Java

    try (FaceDetector faceDetectorInstance = new FaceDetector()) {
    // ...
    }

Explicit destruction

    FaceDetector faceDetectorInstance = new FaceDetector();
    // ...
    faceDetectorInstance.close();

Swift

    private var faceDetectorInstance: FaceDetector? = nil
    faceDetectorInstance = try FaceDetector()

C

    ID3_FACE_DETECTOR hFaceDetector{};
    int err = id3FaceDetector_Initialize(&hFaceDetector);
    if (err == ID3_SUCCESS) {
        // ...
        id3FaceDetector_Dispose(&hFaceDetector);
    }

## Properties

Name | Type | Description
--- | --- | ---
confidenceThreshold | int | Confidence threshold, in the range [0;100].
model | FaceModel | Model used to detect and track faces.
nmsIouThreshold | int | Non-maximum suppression (NMS) intersection-over-union (IOU) threshold, in the range is [0;100].
processingUnit | ProcessingUnit | Processing unit where to run the detection process.
threadCount | int | Number of threads to be used for face detection.

## Methods

Name | Description
--- | ---
detectFaces | Detects faces in an image and store their info in a DetectedFaceList object.
trackFaces | Tracks faces in an image and update their info in a DetectedFaceList object.
warmUp | Gets the face detector module ready to work on a specific image size by initializing all its internal memory layout.