Skip to content

How to load recognition and alignment model from local path #42

@udochify

Description

@udochify

When trying to use the function load_model_from_local_path() to load an already downloaded alignment model, like this:

aligner = load_model_from_local_path("/localpath/CVLface/cvlface/pretrained_models/alignment/dfa_mobilenet")

I get the error:

... File "/root/anaconda3/envs/cvlface/lib/python3.10/site-packages/transformers/utils/hub.py", line 400, in cached_file     raise EnvironmentError( OSError: /localpath/CVLface/cvlface/pretrained_models/alignment/dfa_mobilenet does not appear to have a file named config.json

Within the dfa_mobilenet folder that I downloaded from the link provided in the documentation, there is a model.yaml file instead. The entire documentation and code examples do not mention how to use both the alignment and recognition models locally.

Please can you describe how to use the load_model_from_local_path() function from the huggingface_model_utils.py file?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions