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

# FaceLibrary.unloadModel Method

Module: FaceLibrary

## Definition

Unloads a model from memory.

Python

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

Parameters

> `face_model` FaceModel
> in The AI model to be unloaded.
> `processing_unit` ProcessingUnit
> in The processing unit used for the model.

Exceptions

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

Dart

    static void unloadModel(FaceModel faceModel, ProcessingUnit processingUnit)

Parameters

> `faceModel` FaceModel
> in The AI model to be unloaded.
> `processingUnit` ProcessingUnit
> in The processing unit used for the model.

Exceptions

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

C#

    public static void UnloadModel(FaceModel faceModel, ProcessingUnit processingUnit)

Parameters

> `faceModel` FaceModel
> in The AI model to be unloaded.
> `processingUnit` ProcessingUnit
> in The processing unit used for the model.

Exceptions

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

Java

    public static void unloadModel(FaceModel faceModel, ProcessingUnit processingUnit) throws FaceException

Parameters

> `faceModel` FaceModel
> in The AI model to be unloaded.
> `processingUnit` ProcessingUnit
> in The processing unit used for the model.

Exceptions

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

Swift

    public static func unloadModel(faceModel: FaceModel, processingUnit: ProcessingUnit) throws

Parameters

> `faceModel` FaceModel
> in The AI model to be unloaded.
> `processingUnit` ProcessingUnit
> in The processing unit used for the model.

Exceptions

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

C

    int id3FaceLibrary_UnloadModel (
        id3FaceModel eFaceModel,
        id3FaceProcessingUnit eProcessingUnit)

Parameters

> `eFaceModel` id3FaceModel
> in The AI model to be unloaded.
> `eProcessingUnit` id3FaceProcessingUnit
> in The processing unit used for the model.

Returns

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