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

# FaceLibrary.loadModel Method

Module: FaceLibrary

## Definition

Loads a specified AI model into memory from the specified directory.

Python

    @staticmethod
    load_model(model_path: str, face_model: FaceModel, processing_unit: ProcessingUnit) -> None

Parameters

> `model_path` str
> in The path to directory containing the AI model files.
> `face_model` FaceModel
> in The AI model to be loaded.
> `processing_unit` ProcessingUnit
> in The processing unit to be used.

Exceptions

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

Dart

    static void loadModel(String? modelPath, FaceModel faceModel, ProcessingUnit processingUnit)

Parameters

> `modelPath` String
> in The path to directory containing the AI model files.
> `faceModel` FaceModel
> in The AI model to be loaded.
> `processingUnit` ProcessingUnit
> in The processing unit to be used.

Exceptions

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

C#

    public static void LoadModel(string modelPath, FaceModel faceModel, ProcessingUnit processingUnit)

Parameters

> `modelPath` string
> in The path to directory containing the AI model files.
> `faceModel` FaceModel
> in The AI model to be loaded.
> `processingUnit` ProcessingUnit
> in The processing unit to be used.

Exceptions

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

Java

    public static void loadModel(String modelPath, FaceModel faceModel, ProcessingUnit processingUnit) throws FaceException

Parameters

> `modelPath` String
> in The path to directory containing the AI model files.
> `faceModel` FaceModel
> in The AI model to be loaded.
> `processingUnit` ProcessingUnit
> in The processing unit to be used.

Exceptions

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

Swift

    public static func loadModel(modelPath: String, faceModel: FaceModel, processingUnit: ProcessingUnit) throws

Parameters

> `modelPath` String
> in The path to directory containing the AI model files.
> `faceModel` FaceModel
> in The AI model to be loaded.
> `processingUnit` ProcessingUnit
> in The processing unit to be used.

Exceptions

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

C

    int id3FaceLibrary_LoadModel (
        const char * modelPath,
        id3FaceModel eFaceModel,
        id3FaceProcessingUnit eProcessingUnit)

Parameters

> `modelPath` const char *
> in The path to directory containing the AI model files.
> `eFaceModel` id3FaceModel
> in The AI model to be loaded.
> `eProcessingUnit` id3FaceProcessingUnit
> in The processing unit to be used.

Returns

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