ChristopherLi/vit-fer2013-emotion
020
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
from transformers import pipeline
clf = pipeline("image-classification", model="ChristopherLi/vit-fer2013-emotion")
print(clf("face.jpg"))Or with this project's webcam app:
python webcam_app.py --model ChristopherLi/vit-fer2013-emotionTraining
- 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)
FER2013 is a noisy benchmark (human agreement ~65%). See the project README for details.
