EmotiEffLib
Python implementation of Emotion Efficient Library
Loading...
Searching...
No Matches
emotiefflib.facial_analysis Namespace Reference

Classes

class  EmotiEffLibRecognizerBase
class  EmotiEffLibRecognizerOnnx
class  EmotiEffLibRecognizerTorch

Functions

Union[EmotiEffLibRecognizerOnnx, EmotiEffLibRecognizerTorch] EmotiEffLibRecognizer (str engine="torch", str model_name="enet_b0_8_best_vgaf", str device="cpu")
List[str] get_model_list ()
List[str] get_supported_engines ()

Variables

 FILE_DIR = pathlib.Path(__file__).parent.resolve()
 path_to_backbones = os.path.join(FILE_DIR, "backbones")

Detailed Description

Facial emotions recognition implementation

Function Documentation

◆ EmotiEffLibRecognizer()

Union[EmotiEffLibRecognizerOnnx, EmotiEffLibRecognizerTorch] emotiefflib.facial_analysis.EmotiEffLibRecognizer ( str engine = "torch",
str model_name = "enet_b0_8_best_vgaf",
str device = "cpu" )
Creates EmotiEffLibRecognizer instance.

Args:
    engine (str): The engine to use for inference. Can be either "torch" or "onnx".
                  Default is "torch".
    model_name (str): The name of the model to be used for emotion prediction.
                      Default is "enet_b0_8_best_vgaf".
    device (str): The device on which to run the model, either "cpu" or "cuda".
                  Default is "cpu".

Returns:
    EmotiEffLibRecognizerTorch or EmotiEffLibRecognizerOnnx: An instance of the corresponding
    emotion recognition class based on the selected engine.

Definition at line 430 of file facial_analysis.py.

◆ get_model_list()

List[str] emotiefflib.facial_analysis.get_model_list ( )
Returns a list of available model names.

These models are supported by HSEmoitonRecognizer.

Returns:
    List[str]: A list of model names.

Definition at line 40 of file facial_analysis.py.

◆ get_supported_engines()

List[str] emotiefflib.facial_analysis.get_supported_engines ( )
Returns a list of supported inference engines.

Returns:
    List[str]: A list of inference engines.

Definition at line 60 of file facial_analysis.py.

Variable Documentation

◆ FILE_DIR

emotiefflib.facial_analysis.FILE_DIR = pathlib.Path(__file__).parent.resolve()

Definition at line 20 of file facial_analysis.py.

◆ path_to_backbones

emotiefflib.facial_analysis.path_to_backbones = os.path.join(FILE_DIR, "backbones")

Definition at line 27 of file facial_analysis.py.