CoolFace
Modelpublic

ChristopherLi/vit-fer2013-emotion

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes20downloads
Model Card

ViT Emotion Recognition (FER2013)

Vision Transformer fine-tuned for 7-class facial emotion recognition on the FER2013 Enhanced dataset.

Best for in-the-wild / webcam faces.

Labels

angry, disgust, fear, happy, sad, surprise, neutral

Usage

python
from transformers import pipeline

clf = pipeline("image-classification", model="ChristopherLi/vit-fer2013-emotion")
print(clf("face.jpg"))

Or with this project's webcam app:

bash
python webcam_app.py --model ChristopherLi/vit-fer2013-emotion

Training

  • Base: google/vit-base-patch16-224-in21k
  • 3 epochs, fp16, lr 5e-5, effective batch size 32
  • Input: 48×48 grayscale faces resized to 224×224 and replicated to 3 channels

Results (test set)

MetricValue
Accuracy69.4%
Macro F10.656

FER2013 is a noisy benchmark (human agreement ~65%). See the project README for details.