.. index:: 
  !FaceLibrary.unloadModel Method
  
.. _id3_face_face_library_unload_model_class_method:

===============================================================================
FaceLibrary.unloadModel Method
===============================================================================

Module: :ref:`FaceLibrary<id3_face_face_library_class>`

Definition
----------

Unloads a model from memory.


.. tab-set::

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

      .. code:: Python

        @staticmethod
        unload_model(face_model: FaceModel, processing_unit: ProcessingUnit) -> None

      **Parameters**

        .. line-block::

          ``face_model`` :ref:`FaceModel<id3_face_face_model_enum>`
          :guilabel:`in` The AI model to be unloaded.

          ``processing_unit`` :ref:`ProcessingUnit<id3_face_processing_unit_enum>`
          :guilabel:`in` The processing unit used for the model.


      **Exceptions**

        .. line-block::

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


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

      .. code:: Dart

        static void unloadModel(FaceModel faceModel, ProcessingUnit processingUnit)

      **Parameters**

        .. line-block::

          ``faceModel`` :ref:`FaceModel<id3_face_face_model_enum>`
          :guilabel:`in` The AI model to be unloaded.

          ``processingUnit`` :ref:`ProcessingUnit<id3_face_processing_unit_enum>`
          :guilabel:`in` The processing unit used for the model.


      **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 static void UnloadModel(FaceModel faceModel, ProcessingUnit processingUnit)

      **Parameters**

        .. line-block::

          ``faceModel`` :ref:`FaceModel<id3_face_face_model_enum>`
          :guilabel:`in` The AI model to be unloaded.

          ``processingUnit`` :ref:`ProcessingUnit<id3_face_processing_unit_enum>`
          :guilabel:`in` The processing unit used for the model.


      **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 static void unloadModel(FaceModel faceModel, ProcessingUnit processingUnit) throws FaceException

      **Parameters**

        .. line-block::

          ``faceModel`` :ref:`FaceModel<id3_face_face_model_enum>`
          :guilabel:`in` The AI model to be unloaded.

          ``processingUnit`` :ref:`ProcessingUnit<id3_face_processing_unit_enum>`
          :guilabel:`in` The processing unit used for the model.


      **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 static func unloadModel(faceModel: FaceModel, processingUnit: ProcessingUnit) throws

      **Parameters**

        .. line-block::

          ``faceModel`` :ref:`FaceModel<id3_face_face_model_enum>`
          :guilabel:`in` The AI model to be unloaded.

          ``processingUnit`` :ref:`ProcessingUnit<id3_face_processing_unit_enum>`
          :guilabel:`in` The processing unit used for the model.


      **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 id3FaceLibrary_UnloadModel (
            id3FaceModel eFaceModel, 
            id3FaceProcessingUnit eProcessingUnit)

      **Parameters**

        .. line-block::

          ``eFaceModel`` :ref:`id3FaceModel<id3_face_face_model_enum>`
          :guilabel:`in` The AI model to be unloaded.

          ``eProcessingUnit`` :ref:`id3FaceProcessingUnit<id3_face_processing_unit_enum>`
          :guilabel:`in` The processing unit used for the model.


      **Returns**

        .. line-block::

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


