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

# FaceEncoder Class

Namespace: id3.Face

## Definition

Extracts facial features and encodes face templates.
Python

    class FaceEncoder

Dart

    class FaceEncoder implements Finalizable

C#

    public partial class FaceEncoder

Java

    public class FaceEncoder implements AutoCloseable, Serializable

Swift

    public class FaceEncoder

C

    typedef struct id3FaceEncoder *ID3_FACE_ENCODER;

## Usage

Python

    faceEncoderInstance = id3face.FaceEncoder()

Explicit destruction

    # ...
    del faceEncoderInstance

Dart

    final faceEncoderInstance = sdk.FaceEncoder();
    // ...

Explicit destruction

    // ...
    faceEncoderInstance.dispose()

C#

    using (var faceEncoderInstance = new FaceEncoder())
    {
       // ...
    }

Explicit destruction

    var faceEncoderInstance = new FaceEncoder()
    // ...
    faceEncoderInstance.Dispose()

Java

    try (FaceEncoder faceEncoderInstance = new FaceEncoder()) {
    // ...
    }

Explicit destruction

    FaceEncoder faceEncoderInstance = new FaceEncoder();
    // ...
    faceEncoderInstance.close();

Swift

    private var faceEncoderInstance: FaceEncoder? = nil
    faceEncoderInstance = try FaceEncoder()

C

    ID3_FACE_ENCODER hFaceEncoder{};
    int err = id3FaceEncoder_Initialize(&hFaceEncoder);
    if (err == ID3_SUCCESS) {
        // ...
        id3FaceEncoder_Dispose(&hFaceEncoder);
    }

## Properties

Name | Type | Description
--- | --- | ---
minimalIod | int | Minimal interocular distance (IOD) in pixels required to perform a face encoding.
model | FaceModel | Model used to create templates.
processingUnit | ProcessingUnit | Processing unit where to run the encoding process.
threadCount | int | Number of threads to be used for template encoding.

## Methods

Name | Description
--- | ---
computeQuality | Computes the quality of a detected face.
createTemplate | Extracts the unique features of a detected face and store them in a FaceTemplate.
warmUp | Gets the face encoder module ready to work by initializing all its internal memory layout.