motheecreator commited on
Commit
9057c4c
1 Parent(s): d7b7c78

Training in progress, epoch 5

Browse files
README.md CHANGED
@@ -1,62 +1,43 @@
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,16 +53,25 @@ More information needed
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,4 +79,4 @@ The following hyperparameters were used during training:
89
  - Transformers 4.36.0
90
  - Pytorch 2.0.0
91
  - Datasets 2.1.0
92
- - Tokenizers 0.15.0
 
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
 
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
  - Transformers 4.36.0
80
  - Pytorch 2.0.0
81
  - Datasets 2.1.0
82
+ - Tokenizers 0.15.0
all_results.json CHANGED
@@ -1,13 +1,13 @@
1
  {
2
- "epoch": 10.0,
3
- "eval_accuracy": 0.8571428571428571,
4
- "eval_loss": 0.4352613687515259,
5
- "eval_runtime": 236.2313,
6
- "eval_samples_per_second": 108.097,
7
- "eval_steps_per_second": 3.378,
8
- "total_flos": 7.915696500716863e+19,
9
- "train_loss": 0.14746467811720712,
10
- "train_runtime": 9966.943,
11
- "train_samples_per_second": 102.483,
12
- "train_steps_per_second": 0.801
13
  }
 
1
  {
2
+ "epoch": 5.0,
3
+ "eval_accuracy": 0.7444126074498567,
4
+ "eval_loss": 0.7038247585296631,
5
+ "eval_runtime": 48.5993,
6
+ "eval_samples_per_second": 107.718,
7
+ "eval_steps_per_second": 13.478,
8
+ "total_flos": 8.109125174606561e+18,
9
+ "train_loss": 0.5082513862064489,
10
+ "train_runtime": 2793.8499,
11
+ "train_samples_per_second": 37.468,
12
+ "train_steps_per_second": 1.17
13
  }
eval_results.json CHANGED
@@ -1,8 +1,8 @@
1
  {
2
- "epoch": 10.0,
3
- "eval_accuracy": 0.8571428571428571,
4
- "eval_loss": 0.4352613687515259,
5
- "eval_runtime": 236.2313,
6
- "eval_samples_per_second": 108.097,
7
- "eval_steps_per_second": 3.378
8
  }
 
1
  {
2
+ "epoch": 5.0,
3
+ "eval_accuracy": 0.7444126074498567,
4
+ "eval_loss": 0.7038247585296631,
5
+ "eval_runtime": 48.5993,
6
+ "eval_samples_per_second": 107.718,
7
+ "eval_steps_per_second": 13.478
8
  }
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:fb8a0f55d171e73b2625993fddfb2d2c452c945a1cefeb5100d9dfb84cd26493
3
  size 343239356
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e822056179703bef809ffdcacdb067655b1b63f4056e267851098e6fe7de4f60
3
  size 343239356
runs/May25_19-08-37_5f59a01ef625/events.out.tfevents.1716667021.5f59a01ef625.42.1 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:61108c513b18c46023d744fbd4ab6f219744c22b617198857655903d8a8701da
3
+ size 411
runs/May25_20-15-01_5f59a01ef625/events.out.tfevents.1716668143.5f59a01ef625.42.2 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1bdfcdd98c1d5e3991498dcb1a1445eecb33ca6d135649c0ecef6f64e4708abe
3
+ size 15217
train_results.json CHANGED
@@ -1,8 +1,8 @@
1
  {
2
- "epoch": 10.0,
3
- "total_flos": 7.915696500716863e+19,
4
- "train_loss": 0.14746467811720712,
5
- "train_runtime": 9966.943,
6
- "train_samples_per_second": 102.483,
7
- "train_steps_per_second": 0.801
8
  }
 
1
  {
2
+ "epoch": 5.0,
3
+ "total_flos": 8.109125174606561e+18,
4
+ "train_loss": 0.5082513862064489,
5
+ "train_runtime": 2793.8499,
6
+ "train_samples_per_second": 37.468,
7
+ "train_steps_per_second": 1.17
8
  }
trainer_state.json CHANGED
The diff for this file is too large to render. See raw diff
 
training_args.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:a16e3b200609261a095fe1416c4e1526bc10f4a534016d7fa4a74fc30454f98d
3
  size 4283
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6e52b0836ce2c508087bf7e69ccdfb8eebe0f72926ffbd0e35808c19a08fdda1
3
  size 4283