6#ifndef BACKENDS_TORCH_FACIAL_ANALYSIS_H
7#define BACKENDS_TORCH_FACIAL_ANALYSIS_H
11#include <torch/script.h>
84 void initRecognizer(
const std::string& modelPath)
override;
99 xt::xarray<float> preprocess(
const cv::Mat& img)
override;
103 std::vector<torch::jit::script::Module> models_;
EmotiEffLibRes predictEmotions(const cv::Mat &faceImg, bool logits=true) override
Predicts emotions for a single face image.
xt::xarray< float > extractFeatures(const cv::Mat &faceImg) override
Extracts features from a single face image.
EmotiEffLibRes classifyEngagement(const xt::xarray< float > &features) override
Classifies engagement based on extracted features.
EmotiEffLibRes predictEngagement(const std::vector< cv::Mat > &faceImgs) override
Predicts engagement for a sequence of face images.
EmotiEffLibRecognizerTorch(const std::string &fullPipelineModelPath)
Constructs an EmotiEffLibRecognizerOnnx instance with the specified model path.
EmotiEffLibRes classifyEmotions(const xt::xarray< float > &features, bool logits=true) override
Classifies emotions based on extracted features.
Base class for emotion and engagement recognition.
Header file for the EmotiEffLib library, providing emotion and engagement recognition functionality.
Configuration structure for the EmotiEffLibRecognizer.
Structure to store the results of EmotiEffLib.