deanngkl/vit-tiny-fer
By deanngkl · ↓ 13 · ♥ 0 · Updated 2025-06-13
What's in this repo
This page lists the files in deanngkl/vit-tiny-fer, including emotion_vit_tiny.onnx.
- 1 ONNX models (.onnx files)
- 8 files, including 1 .md, 1 .json, 1 .onnx, 1 .pt, 1 .0, 1 .pth
- Last updated 2025-06-13
ONNX files
| File | Size | Download |
|---|---|---|
| emotion_vit_tiny.onnx | — | Download |
How to use
These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.
README
Vision Transformer for Facial Expression Classifier
A deep learning project that fine-tunes a Vision Transformer (ViT-Tiny) model for 7-class facial emotion classification using cleaned versions of FER+, AffectNet, and RAF-DB datasets.
📌 Project Highlights
- 🔍 7-class emotion classification:
['anger', 'disgust', 'fear', 'happiness', 'neutral', 'sadness', 'surprise'] - 🧠 Model: ViT-Tiny (
timmimplementation) - 🎯 Achieved 82% validation accuracy on a blended hold-out set (8 377 images)
- 📚 Cleaned & uploaded datasets to Hugging Face Datasets
- 🧪 Integrated CutMix, cosine decay scheduler, and AMP for training
📦 Datasets
| Dataset | Link | Notes |
|---|---|---|
| FER+ | Hugging Face | Filtered to 7 basic emotions |
| AffectNet | Hugging Face | Removed 'contempt' class |
| RAF-DB | Hugging Face | Added proper emotion labels |
The total amount of datasets
Loaded 75398 training samples from 3 sources
Loaded 8377 validation samples from 3 sources
Training-set distribution:
0: 0 : 9738
1: 1 : 3385
2: 2 : 4313
3: 3 : 18315
4: 4 : 20987
5: 5 : 9289
6: 6 : 9371
Emotion batch torch.Size([64, 3, 224, 224])
🙋♂️ Author
Dean Ng Kwan Lung
Blog : Portfolio
LinkedIn : LinkedIn
GitHub : GitHub
Email : kwanlung123@gmail.com
Model info
Created: 2025-06-13
Updated: 2025-06-13
View on Hugging FaceFiles (8)
Related models
More from deanngkl
No other models by this author.
More models
No task type declared.