.. index:: 
  !FaceTracker.detectionModel Property

.. _id3_face_face_tracker_detection_model_class_member:

===============================================================================
FaceTracker.detectionModel Property
===============================================================================

Module: :ref:`FaceTracker<id3_face_face_tracker_class>`

Type: :ref:`FaceModel<id3_face_face_model_enum>`

Definition
----------

Model used to detect and track faces.

.. hint:: Default value is FaceDetector4B.

.. note:: Some better accuracy/speed balances can be found by choosing another model.


.. tab-set::

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

    .. code:: Python

      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 detectionModel => getDetectionModel();
      set detectionModel(FaceModel value) => setDetectionModel(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 detectionModel
      {
          get => GetdetectionModel();
          set => SetdetectionModel(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 getDetectionModel() throws FaceException
      public void setDetectionModel(FaceModel detectionModel) 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 detectionModel: FaceModel
          get {
              return try! getDetectionModel()
          }
      }


    **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 id3FaceTracker_GetDetectionModel (ID3_FACE_TRACKER hFaceTracker, id3FaceModel * eDetectionModel)
      int id3FaceTracker_SetDetectionModel (ID3_FACE_TRACKER hFaceTracker, id3FaceModel eDetectionModel)

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

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

