ONNX Model Zoo

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 (timm implementation)
  • 🎯 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

tensorboard onnx en dataset:deanngkl/ferplus-7cls dataset:deanngkl/raf-db-7emotions dataset:deanngkl/affectnet_no_contempt base_model:WinKawaks/vit-tiny-patch16-224 base_model:quantized:WinKawaks/vit-tiny-patch16-224 license:apache-2.0 region:us
↓ 13 ♥ 0

Created: 2025-06-13

Updated: 2025-06-13

View on Hugging Face

Files (8)

.gitattributes
README.md
config.json
emotion_vit_tiny.onnx ONNX
emotion_vit_tiny.torchscript.pt
events.out.tfevents.1749701453.LAPTOP-S6FA8OJ9.37692.0
final_model.pth
labels.txt

Related models