motheecreator commited on
Commit
d7b7c78
·
verified ·
1 Parent(s): 96b1e1d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +41 -31
README.md CHANGED
@@ -1,43 +1,62 @@
1
  ---
2
  license: apache-2.0
3
- base_model: motheecreator/vit-Facial-Expression-Recognition
4
  tags:
5
  - generated_from_trainer
6
- datasets:
7
- - image_folder
8
  metrics:
9
  - accuracy
10
  model-index:
11
- - name: vit-Facial-Expression-Recognition
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.7390639923591213
 
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
- # vit-Facial-Expression-Recognition
32
 
33
- This model is a fine-tuned version of [motheecreator/vit-Facial-Expression-Recognition](https://huggingface.co/motheecreator/vit-Facial-Expression-Recognition) on the image_folder dataset.
34
- It achieves the following results on the evaluation set:
35
- - Loss: 0.8219
36
- - Accuracy: 0.7391
 
 
 
 
 
 
 
 
 
 
37
 
38
  ## Model description
39
 
40
- More information needed
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: 8
57
- - eval_batch_size: 8
58
  - seed: 42
59
  - gradient_accumulation_steps: 4
60
- - total_train_batch_size: 32
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: 5
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