
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# vit-emotion-classifier

This model is a fine-tuned version of [google/vit-base-patch16-224-in21k](https://huggingface.co/google/vit-base-patch16-224-in21k) on the imagefolder dataset.
It achieves the following results on the evaluation set:
- Loss: 0.6218
- Accuracy: 0.8672

## Model description

More information needed

## Intended uses & limitations

More information needed

## Training and evaluation data

More information needed

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 0.0002
- train_batch_size: 16
- eval_batch_size: 16
- seed: 42
- optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: linear
- num_epochs: 20
- mixed_precision_training: Native AMP

### Training results

| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|:-------------:|:-----:|:----:|:---------------:|:--------:|
| 0.6535        | 1.0   | 32   | 0.7740          | 0.7812   |
| 0.296         | 2.0   | 64   | 0.5949          | 0.8047   |
| 0.1542        | 3.0   | 96   | 0.6261          | 0.8047   |
| 0.0838        | 4.0   | 128  | 0.6315          | 0.8047   |
| 0.0189        | 5.0   | 160  | 0.8360          | 0.7656   |
| 0.0223        | 6.0   | 192  | 0.7264          | 0.8047   |
| 0.0114        | 7.0   | 224  | 0.8634          | 0.8047   |
| 0.0408        | 8.0   | 256  | 0.6393          | 0.8438   |
| 0.0075        | 9.0   | 288  | 0.7023          | 0.8438   |
| 0.006         | 10.0  | 320  | 0.6481          | 0.8516   |
| 0.0053        | 11.0  | 352  | 0.6247          | 0.8516   |
| 0.0047        | 12.0  | 384  | 0.6220          | 0.8594   |
| 0.0043        | 13.0  | 416  | 0.6186          | 0.8594   |
| 0.0041        | 14.0  | 448  | 0.6193          | 0.8594   |
| 0.0038        | 15.0  | 480  | 0.6205          | 0.8594   |
| 0.0036        | 16.0  | 512  | 0.6205          | 0.8594   |
| 0.0035        | 17.0  | 544  | 0.6218          | 0.8672   |
| 0.0034        | 18.0  | 576  | 0.6224          | 0.8672   |
| 0.0033        | 19.0  | 608  | 0.6229          | 0.8672   |
| 0.0033        | 20.0  | 640  | 0.6232          | 0.8672   |


### Framework versions

- Transformers 4.51.3
- Pytorch 2.6.0+cu124
- Datasets 3.6.0
- Tokenizers 0.21.1

anger contempt disgust fear happy neutral sad surprise