Instructions to use aayansh26/emotion_detection with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use aayansh26/emotion_detection with Keras:
# !pip install -U keras tensorflow huggingface_hub # Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here; # "jax" and "torch" also work for computation once TensorFlow is installed. import os os.environ["KERAS_BACKEND"] = "tensorflow" import keras model = keras.saving.load_model("hf://aayansh26/emotion_detection") - Notebooks
- Google Colab
- Kaggle
π Facial Emotion Detection using ResNet50
This project is a deep learning-based web application that detects human emotions from images.
The model is trained on the FER2013 dataset using transfer learning with ResNet50.
π Features
Detects 7 emotions:
- Angry π
- Disgust π€’
- Fear π¨
- Happy π
- Sad π’
- Surprise π²
- Neutral π
Achieved ~68% test accuracy
Uses ResNet50 (Transfer Learning)
Real-time image upload and prediction
Deployed using Flask + Render
Model hosted on Hugging Face
π§ Model Details
- Base Model: ResNet50 (pretrained on ImageNet)
- Input Shape:
(224, 224, 3) - Preprocessing: Pixel normalization (
/255) - Loss Function: Categorical Crossentropy
- Optimizer: Adam
- Techniques Used:
- Data Augmentation
- Class Weighting
- EarlyStopping
- ReduceLROnPlateau
- ModelCheckpoint
π Performance
- Train Accuracy: ~75%
- Test Accuracy: ~68%
πΌοΈ Pipeline
- Downloads last month
- 9
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support