--- license: apache-2.0 language: - en base_model: - WinKawaks/vit-tiny-patch16-224 datasets: - deanngkl/ferplus-7cls - deanngkl/raf-db-7emotions - deanngkl/affectnet_no_contempt metrics: - accuracy --- # 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](https://huggingface.co/datasets/deanngkl/ferplus-7cls) | Filtered to 7 basic emotions | | AffectNet | [Hugging Face](https://huggingface.co/datasets/deanngkl/affectnet_no_contempt) | Removed 'contempt' class | | RAF-DB | [Hugging Face](https://huggingface.co/datasets/deanngkl/raf-db-7emotions) | Added proper emotion labels | The total amount of datasets ```html 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](https://kwanlung.github.io/) LinkedIn : [LinkedIn](https://www.linkedin.com/in/deanng00/) GitHub : [GitHub](https://github.com/kwanlung) Email : kwanlung123@gmail.com