Face Emotion Recognition CNN (v2)

Model Description

Face Emotion Recognition CNN (v2) is a lightweight Convolutional Neural Network designed to classify facial expressions into seven basic emotion categories using grayscale facial images of size 48×48. The model is optimized for fast inference and practical deployment in real-time and resource-constrained environments.

The model was trained using the Adam optimizer and categorical cross-entropy loss, balancing performance and computational efficiency.

Intended Use

This model is intended for:

  • Facial emotion recognition from static images
  • Human–computer interaction systems
  • Emotion-aware applications
  • Academic research and educational projects

Out-of-Scope Use

The model should not be used for:

  • Surveillance, biometric identification, or user profiling
  • Medical, psychological, or legal decision-making
  • Any high-risk or safety-critical applications

Model Architecture

  • Architecture Type: Convolutional Neural Network (CNN)
  • Input: Grayscale facial images (48 × 48)
  • Output: Probability distribution over 7 emotion classes
  • Optimizer: Adam
  • Loss Function: Categorical Crossentropy

Training Configuration

  • Image Size: 48 × 48
  • Batch Size: 64
  • Epochs: 40
  • Learning Rate: 0.0005
  • Number of Classes: 7
  • Model Name: face_emotion_cnn_v2

Emotion Labels

Label ID Emotion
0 Angry
1 Disgust
2 Fear
3 Happy
4 Neutral
5 Sad
6 Surprise

Dataset

The model was trained on a facial emotion dataset containing grayscale face images resized to 48×48 pixels. Images were preprocessed using normalization and face alignment where applicable. The dataset includes seven emotion categories.

Note: Dataset composition and demographic distribution may influence model bias and generalization.

Evaluation

The model was evaluated on a held-out test set with the following results:

Training Performance (Final Epoch)

  • Accuracy: 0.5976
  • Loss: 1.1217

Test Performance

  • Test Accuracy: 0.5942

These results reflect moderate performance, which is typical for compact CNN models trained on low-resolution facial emotion datasets.

Usage

Inference Example

from transformers import pipeline

classifier = pipeline(
    task="image-classification",
    model="your-username/face_emotion_cnn_v2"
)

predictions = classifier("face.jpg")
print(predictions)
Downloads last month
15
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support