.. index:: 
  !PortraitProcessor.faceDetectionModel Property

.. _id3_face_portrait_processor_face_detection_model_class_member:

===============================================================================
PortraitProcessor.faceDetectionModel Property
===============================================================================

Module: :ref:`PortraitProcessor<id3_face_portrait_processor_class>`

Type: :ref:`FaceModel<id3_face_face_model_enum>`

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.


.. tab-set::

  .. tab-item:: Python
    :sync: Python

    .. code:: Python

      face_detection_model: FaceModel


    **Exceptions**

      .. line-block::

        :ref:`FaceException<id3_face_face_exception>`
        An error has occurred during Face Library execution.

  .. tab-item:: Dart
    :sync: Dart

    .. code:: Dart

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


    **Exceptions**

      .. line-block::

        :ref:`FaceException<id3_face_face_exception>`
        An error has occurred during Face Library execution.

  .. tab-item:: C#
    :sync: C#

    .. code:: C#

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


    **Exceptions**

      .. line-block::

        :ref:`FaceException<id3_face_face_exception>`
        An error has occurred during Face Library execution.

  .. tab-item:: Java
    :sync: Java

    .. code:: Java

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


    **Exceptions**

      .. line-block::

        :ref:`FaceException<id3_face_face_exception>`
        An error has occurred during Face Library execution.

  .. tab-item:: Swift
    :sync: Swift

    .. code:: Swift

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


    **Exceptions**

      .. line-block::

        :ref:`FaceException<id3_face_face_exception>`
        An error has occurred during Face Library execution.

  .. tab-item:: C
    :sync: C

    .. code:: C

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

    **Returns**
   
      .. line-block::

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

