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

# PortraitProcessor.faceDetectionModel Property

Module: PortraitProcessor

Type: FaceModel

## Definition

Specifies the model used to detect and track faces.

Hint

Default value is `FaceDetector4B`. Some better accuracy/speed balances can be found by choosing another model.

Python

    face_detection_model: FaceModel

Exceptions

> FaceException
> An error has occurred during Face Library execution.

Dart

    FaceModel get faceDetectionModel => getFaceDetectionModel();
    set faceDetectionModel(FaceModel value) => setFaceDetectionModel(value);

Exceptions

> FaceException
> An error has occurred during Face Library execution.

C#

    public FaceModel faceDetectionModel
    {
        get => GetfaceDetectionModel();
        set => SetfaceDetectionModel(ref value);
    }

Exceptions

> FaceException
> An error has occurred during Face Library execution.

Java

    public FaceModel getFaceDetectionModel() throws FaceException
    public void setFaceDetectionModel(FaceModel faceDetectionModel) throws FaceException

Exceptions

> FaceException
> An error has occurred during Face Library execution.

Swift

    public var faceDetectionModel: FaceModel
        get {
            return try! getFaceDetectionModel()
        }
    }

Exceptions

> FaceException
> An error has occurred during Face Library execution.

C

    int id3FacePortraitProcessor_GetFaceDetectionModel (ID3_FACE_PORTRAIT_PROCESSOR hPortraitProcessor, id3FaceModel * eFaceDetectionModel)
    int id3FacePortraitProcessor_SetFaceDetectionModel (ID3_FACE_PORTRAIT_PROCESSOR hPortraitProcessor, id3FaceModel eFaceDetectionModel)

Returns

> `int`
> An error code.
> See id3FaceError file for the list of possible error codes.