MAITRI Emotion Models
Pre-trained models for the MAITRI (Multimodal AI Assistant for Psychological & Physical Well-Being Monitoring) system.
Models Included
| File | Description | Framework |
|---|---|---|
facial_expression_model_weights.h5 |
Face emotion classifier (7 emotions) | TensorFlow/Keras |
speech_emotion_model.pkl |
Speech emotion classifier (5 emotions) | scikit-learn |
Inference Usage
Python โ Download with huggingface_hub
from huggingface_hub import hf_hub_download
# Download face emotion model
face_model_path = hf_hub_download(
repo_id="ritesh19180/maitri-emotion-models",
filename="facial_expression_model_weights.h5"
)
# Download speech emotion model
speech_model_path = hf_hub_download(
repo_id="ritesh19180/maitri-emotion-models",
filename="speech_emotion_model.pkl"
)
Face Emotion Inference
from deepface import DeepFace
result = DeepFace.analyze(
img_path="face.jpg",
actions=["emotion"],
enforce_detection=False
)
print(result[0]["dominant_emotion"])
Speech Emotion Inference
import pickle
import librosa
import numpy as np
with open(speech_model_path, "rb") as f:
model = pickle.load(f)
audio, sr = librosa.load("audio.wav", sr=22050)
mfccs = np.mean(librosa.feature.mfcc(y=audio, sr=sr, n_mfcc=20), axis=1)
# ... extract remaining features ...
prediction = model.predict(features.reshape(1, -1))
print(prediction[0])
Emotion Classes
Face: happy, sad, angry, fear, disgust, surprise, neutral Speech: happy, sad, angry, fear, neutral
Citation
Part of the MAITRI project โ a privacy-first, edge-computing AI system for mental health monitoring.
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐ Ask for provider support