Meme Emotion Detector π
TFLite model untuk deteksi ekspresi wajah real-time dengan 7 emosi.
Model Details
- Model Type: TensorFlow Lite
- Task: Image Classification (Facial Expression Recognition)
- Emotions: angry, disgust, fear, happy, sad, surprise, neutral
- Input: 48x48 grayscale image
- Framework: TensorFlow Lite
Usage
from huggingface_hub import hf_hub_download
import tensorflow as tf
import numpy as np
# Download model
model_path = hf_hub_download(
repo_id="maftuh-main/meme-emotion-detector",
filename="model.tflite"
)
# Load TFLite model
interpreter = tf.lite.Interpreter(model_path=model_path)
interpreter.allocate_tensors()
# Get input/output details
input_details = interpreter.get_input_details()
output_details = interpreter.get_output_details()
# Prepare image (48x48 grayscale, normalized)
# face_img = ... (your face image)
# face_resized = cv2.resize(face_img, (48, 48))
# face_gray = cv2.cvtColor(face_resized, cv2.COLOR_BGR2GRAY)
# face_input = face_gray.astype(np.float32) / 255.0
# face_input = np.expand_dims(face_input, axis=[0, -1])
# Run inference
# interpreter.set_tensor(input_details[0]['index'], face_input)
# interpreter.invoke()
# predictions = interpreter.get_tensor(output_details[0]['index'])[0]
# Get emotion
emotions = ['angry', 'disgust', 'fear', 'happy', 'sad', 'surprise', 'neutral']
# emotion_idx = np.argmax(predictions)
# detected_emotion = emotions[emotion_idx]
Training
Model trained on FER2013 dataset atau custom facial expression dataset.
Files
model.tflite- TensorFlow Lite model (1.4 MB)
Applications
- Real-time emotion detection
- Meme/emoji overlay based on expression
- Interactive applications
- Computer vision projects
License
MIT License
- Downloads last month
- 13
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
π
Ask for provider support