motheecreator
commited on
Update README.md
Browse files
README.md
CHANGED
@@ -1,43 +1,62 @@
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
-
base_model:
|
4 |
tags:
|
5 |
- generated_from_trainer
|
6 |
-
datasets:
|
7 |
-
- image_folder
|
8 |
metrics:
|
9 |
- accuracy
|
10 |
model-index:
|
11 |
-
- name:
|
12 |
results:
|
13 |
- task:
|
14 |
name: Image Classification
|
15 |
type: image-classification
|
16 |
-
dataset:
|
17 |
-
name: image_folder
|
18 |
-
type: image_folder
|
19 |
-
config: default
|
20 |
-
split: train
|
21 |
-
args: default
|
22 |
metrics:
|
23 |
- name: Accuracy
|
24 |
type: accuracy
|
25 |
-
value: 0.
|
|
|
26 |
---
|
27 |
|
28 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
29 |
should probably proofread and complete it, then remove this comment. -->
|
30 |
|
31 |
-
#
|
32 |
|
33 |
-
|
34 |
-
|
35 |
-
-
|
36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
|
38 |
## Model description
|
39 |
|
40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
|
42 |
## Intended uses & limitations
|
43 |
|
@@ -53,25 +72,16 @@ More information needed
|
|
53 |
|
54 |
The following hyperparameters were used during training:
|
55 |
- learning_rate: 5e-05
|
56 |
-
- train_batch_size:
|
57 |
-
- eval_batch_size:
|
58 |
- seed: 42
|
59 |
- gradient_accumulation_steps: 4
|
60 |
-
- total_train_batch_size:
|
61 |
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
62 |
- lr_scheduler_type: linear
|
63 |
- lr_scheduler_warmup_ratio: 0.1
|
64 |
-
- num_epochs:
|
65 |
-
|
66 |
-
### Training results
|
67 |
|
68 |
-
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|
69 |
-
|:-------------:|:-----:|:----:|:---------------:|:--------:|
|
70 |
-
| 0.7175 | 1.0 | 654 | 0.7081 | 0.7309 |
|
71 |
-
| 0.6952 | 2.0 | 1308 | 0.6931 | 0.7379 |
|
72 |
-
| 0.5041 | 3.0 | 1962 | 0.7038 | 0.7444 |
|
73 |
-
| 0.2461 | 4.0 | 2617 | 0.7843 | 0.7393 |
|
74 |
-
| 0.1846 | 5.0 | 3270 | 0.8219 | 0.7391 |
|
75 |
|
76 |
|
77 |
### Framework versions
|
@@ -79,4 +89,4 @@ The following hyperparameters were used during training:
|
|
79 |
- Transformers 4.36.0
|
80 |
- Pytorch 2.0.0
|
81 |
- Datasets 2.1.0
|
82 |
-
- Tokenizers 0.15.0
|
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
+
base_model: google/vit-base-patch16-224-in21k
|
4 |
tags:
|
5 |
- generated_from_trainer
|
|
|
|
|
6 |
metrics:
|
7 |
- accuracy
|
8 |
model-index:
|
9 |
+
- name: Facial Expression Recognition
|
10 |
results:
|
11 |
- task:
|
12 |
name: Image Classification
|
13 |
type: image-classification
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
metrics:
|
15 |
- name: Accuracy
|
16 |
type: accuracy
|
17 |
+
value: 0.8571428571428571
|
18 |
+
pipeline_tag: image-classification
|
19 |
---
|
20 |
|
21 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
22 |
should probably proofread and complete it, then remove this comment. -->
|
23 |
|
24 |
+
# Vision Transformer (ViT) for Facial Expression Recognition Model Card
|
25 |
|
26 |
+
## Model Overview
|
27 |
+
|
28 |
+
- **Model Name:** [motheecreator/vit-Facial-Expression-Recognition](https://huggingface.co/motheecreator/vit-Facial-Expression-Recognition)
|
29 |
+
|
30 |
+
- **Task:** Facial Expression/Emotion Recognition
|
31 |
+
|
32 |
+
- **Datasets:** [FER2013](https://www.kaggle.com/datasets/msambare/fer2013), [MMI Facial Expression Database](https://mmifacedb.eu)
|
33 |
+
|
34 |
+
- **Model Architecture:** [Vision Transformer (ViT)](https://huggingface.co/docs/transformers/model_doc/vit)
|
35 |
+
|
36 |
+
- **Finetuned from model:** [vit-base-patch16-224-in21k](https://huggingface.co/google/vit-base-patch16-224-in21k)
|
37 |
+
|
38 |
+
- Loss: 0.4353
|
39 |
+
- Accuracy: 0.8571
|
40 |
|
41 |
## Model description
|
42 |
|
43 |
+
The vit-face-expression model is a Vision Transformer fine-tuned for the task of facial emotion recognition.
|
44 |
+
|
45 |
+
It is trained on the FER2013 and MMI facial Expression datasets , which consist of facial images categorized into seven different emotions:
|
46 |
+
- Angry
|
47 |
+
- Disgust
|
48 |
+
- Fear
|
49 |
+
- Happy
|
50 |
+
- Sad
|
51 |
+
- Surprise
|
52 |
+
- Neutral
|
53 |
+
|
54 |
+
## Data Preprocessing
|
55 |
+
|
56 |
+
The input images are preprocessed before being fed into the model. The preprocessing steps include:
|
57 |
+
- **Resizing:** Images are resized to the specified input size.
|
58 |
+
- **Normalization:** Pixel values are normalized to a specific range.
|
59 |
+
- **Data Augmentation:** Random transformations such as rotations, flips, and zooms are applied to augment the training dataset.
|
60 |
|
61 |
## Intended uses & limitations
|
62 |
|
|
|
72 |
|
73 |
The following hyperparameters were used during training:
|
74 |
- learning_rate: 5e-05
|
75 |
+
- train_batch_size: 32
|
76 |
+
- eval_batch_size: 32
|
77 |
- seed: 42
|
78 |
- gradient_accumulation_steps: 4
|
79 |
+
- total_train_batch_size: 128
|
80 |
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
81 |
- lr_scheduler_type: linear
|
82 |
- lr_scheduler_warmup_ratio: 0.1
|
83 |
+
- num_epochs: 10
|
|
|
|
|
84 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
|
86 |
|
87 |
### Framework versions
|
|
|
89 |
- Transformers 4.36.0
|
90 |
- Pytorch 2.0.0
|
91 |
- Datasets 2.1.0
|
92 |
+
- Tokenizers 0.15.0
|