.. index:: 
  !PortraitProcessor.faceEncodingModel Property

.. _id3_face_portrait_processor_face_encoding_model_class_member:

===============================================================================
PortraitProcessor.faceEncodingModel Property
===============================================================================

Module: :ref:`PortraitProcessor<id3_face_portrait_processor_class>`

Type: :ref:`FaceModel<id3_face_face_model_enum>`

Definition
----------

Model used to create features and assess consistancy among views of a given face.

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


.. tab-set::

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

    .. code:: Python

      face_encoding_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 faceEncodingModel => getFaceEncodingModel();
      set faceEncodingModel(FaceModel value) => setFaceEncodingModel(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 faceEncodingModel
      {
          get => GetfaceEncodingModel();
          set => SetfaceEncodingModel(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 getFaceEncodingModel() throws FaceException
      public void setFaceEncodingModel(FaceModel faceEncodingModel) 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 faceEncodingModel: FaceModel
          get {
              return try! getFaceEncodingModel()
          }
      }


    **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_GetFaceEncodingModel (ID3_FACE_PORTRAIT_PROCESSOR hPortraitProcessor, id3FaceModel * eFaceEncodingModel)
      int id3FacePortraitProcessor_SetFaceEncodingModel (ID3_FACE_PORTRAIT_PROCESSOR hPortraitProcessor, id3FaceModel eFaceEncodingModel)

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

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

