vit_emotion_fine_tuned
Browse files- README.md +98 -0
- config.json +44 -0
- model.safetensors +3 -0
- runs/Dec16_12-33-50_cedccf96d47c/events.out.tfevents.1734352449.cedccf96d47c.1160.0 +3 -0
- runs/Dec16_13-16-07_cedccf96d47c/events.out.tfevents.1734355001.cedccf96d47c.1160.1 +3 -0
- runs/Dec16_13-18-34_cedccf96d47c/events.out.tfevents.1734355126.cedccf96d47c.1160.2 +3 -0
- runs/Dec16_13-22-42_cedccf96d47c/events.out.tfevents.1734355366.cedccf96d47c.1160.3 +3 -0
- runs/Dec16_13-36-30_cedccf96d47c/events.out.tfevents.1734356197.cedccf96d47c.26489.0 +3 -0
- runs/Dec16_13-40-47_cedccf96d47c/events.out.tfevents.1734356451.cedccf96d47c.26489.1 +3 -0
- runs/Dec16_13-40-47_cedccf96d47c/events.out.tfevents.1734358817.cedccf96d47c.26489.2 +3 -0
- runs/Dec16_13-40-47_cedccf96d47c/events.out.tfevents.1734359556.cedccf96d47c.26489.3 +3 -0
- runs/Dec16_14-35-03_cedccf96d47c/events.out.tfevents.1734359720.cedccf96d47c.26489.4 +3 -0
- runs/Dec16_14-35-03_cedccf96d47c/events.out.tfevents.1734362194.cedccf96d47c.26489.5 +3 -0
- training_args.bin +3 -0
README.md
ADDED
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
library_name: transformers
|
3 |
+
license: apache-2.0
|
4 |
+
base_model: google/vit-base-patch16-224-in21k
|
5 |
+
tags:
|
6 |
+
- generated_from_trainer
|
7 |
+
datasets:
|
8 |
+
- imagefolder
|
9 |
+
metrics:
|
10 |
+
- accuracy
|
11 |
+
- precision
|
12 |
+
- recall
|
13 |
+
- f1
|
14 |
+
model-index:
|
15 |
+
- name: vit-facial-expression
|
16 |
+
results:
|
17 |
+
- task:
|
18 |
+
name: Image Classification
|
19 |
+
type: image-classification
|
20 |
+
dataset:
|
21 |
+
name: imagefolder
|
22 |
+
type: imagefolder
|
23 |
+
config: default
|
24 |
+
split: train
|
25 |
+
args: default
|
26 |
+
metrics:
|
27 |
+
- name: Accuracy
|
28 |
+
type: accuracy
|
29 |
+
value: 0.7378253732509966
|
30 |
+
- name: Precision
|
31 |
+
type: precision
|
32 |
+
value: 0.7302570858866146
|
33 |
+
- name: Recall
|
34 |
+
type: recall
|
35 |
+
value: 0.7378253732509966
|
36 |
+
- name: F1
|
37 |
+
type: f1
|
38 |
+
value: 0.7274264799279716
|
39 |
+
---
|
40 |
+
|
41 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
42 |
+
should probably proofread and complete it, then remove this comment. -->
|
43 |
+
|
44 |
+
# vit-facial-expression
|
45 |
+
|
46 |
+
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.
|
47 |
+
It achieves the following results on the evaluation set:
|
48 |
+
- Loss: 0.8099
|
49 |
+
- Accuracy: 0.7378
|
50 |
+
- Precision: 0.7303
|
51 |
+
- Recall: 0.7378
|
52 |
+
- F1: 0.7274
|
53 |
+
|
54 |
+
## Model description
|
55 |
+
|
56 |
+
More information needed
|
57 |
+
|
58 |
+
## Intended uses & limitations
|
59 |
+
|
60 |
+
More information needed
|
61 |
+
|
62 |
+
## Training and evaluation data
|
63 |
+
|
64 |
+
More information needed
|
65 |
+
|
66 |
+
## Training procedure
|
67 |
+
|
68 |
+
### Training hyperparameters
|
69 |
+
|
70 |
+
The following hyperparameters were used during training:
|
71 |
+
- learning_rate: 3e-05
|
72 |
+
- train_batch_size: 128
|
73 |
+
- eval_batch_size: 128
|
74 |
+
- seed: 42
|
75 |
+
- optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
76 |
+
- lr_scheduler_type: cosine
|
77 |
+
- lr_scheduler_warmup_steps: 500
|
78 |
+
- num_epochs: 3
|
79 |
+
- mixed_precision_training: Native AMP
|
80 |
+
|
81 |
+
### Training results
|
82 |
+
|
83 |
+
| Training Loss | Epoch | Step | Validation Loss | Accuracy | Precision | Recall | F1 |
|
84 |
+
|:-------------:|:------:|:----:|:---------------:|:--------:|:---------:|:------:|:------:|
|
85 |
+
| 2.0154 | 0.4831 | 100 | 1.8473 | 0.3168 | 0.3005 | 0.3168 | 0.1961 |
|
86 |
+
| 1.569 | 0.9662 | 200 | 1.3372 | 0.5767 | 0.5110 | 0.5767 | 0.4926 |
|
87 |
+
| 1.185 | 1.4493 | 300 | 1.1047 | 0.6474 | 0.5805 | 0.6474 | 0.5937 |
|
88 |
+
| 1.044 | 1.9324 | 400 | 0.9638 | 0.6896 | 0.6787 | 0.6896 | 0.6611 |
|
89 |
+
| 0.8813 | 2.4155 | 500 | 0.8928 | 0.7005 | 0.6822 | 0.7005 | 0.6646 |
|
90 |
+
| 0.7925 | 2.8986 | 600 | 0.8209 | 0.7301 | 0.7183 | 0.7301 | 0.7186 |
|
91 |
+
|
92 |
+
|
93 |
+
### Framework versions
|
94 |
+
|
95 |
+
- Transformers 4.46.3
|
96 |
+
- Pytorch 2.5.1+cu121
|
97 |
+
- Datasets 3.2.0
|
98 |
+
- Tokenizers 0.20.3
|
config.json
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "google/vit-base-patch16-224-in21k",
|
3 |
+
"architectures": [
|
4 |
+
"ViTForImageClassification"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.0,
|
7 |
+
"encoder_stride": 16,
|
8 |
+
"hidden_act": "gelu",
|
9 |
+
"hidden_dropout_prob": 0.0,
|
10 |
+
"hidden_size": 768,
|
11 |
+
"id2label": {
|
12 |
+
"0": "LABEL_0",
|
13 |
+
"1": "LABEL_1",
|
14 |
+
"2": "LABEL_2",
|
15 |
+
"3": "LABEL_3",
|
16 |
+
"4": "LABEL_4",
|
17 |
+
"5": "LABEL_5",
|
18 |
+
"6": "LABEL_6",
|
19 |
+
"7": "LABEL_7"
|
20 |
+
},
|
21 |
+
"image_size": 224,
|
22 |
+
"initializer_range": 0.02,
|
23 |
+
"intermediate_size": 3072,
|
24 |
+
"label2id": {
|
25 |
+
"LABEL_0": 0,
|
26 |
+
"LABEL_1": 1,
|
27 |
+
"LABEL_2": 2,
|
28 |
+
"LABEL_3": 3,
|
29 |
+
"LABEL_4": 4,
|
30 |
+
"LABEL_5": 5,
|
31 |
+
"LABEL_6": 6,
|
32 |
+
"LABEL_7": 7
|
33 |
+
},
|
34 |
+
"layer_norm_eps": 1e-12,
|
35 |
+
"model_type": "vit",
|
36 |
+
"num_attention_heads": 12,
|
37 |
+
"num_channels": 3,
|
38 |
+
"num_hidden_layers": 12,
|
39 |
+
"patch_size": 16,
|
40 |
+
"problem_type": "single_label_classification",
|
41 |
+
"qkv_bias": true,
|
42 |
+
"torch_dtype": "float32",
|
43 |
+
"transformers_version": "4.46.3"
|
44 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:49c0d8631852d2fab1eed378fa6b9fec9919c03e4d540fcbe14d738a115cdfff
|
3 |
+
size 343242432
|
runs/Dec16_12-33-50_cedccf96d47c/events.out.tfevents.1734352449.cedccf96d47c.1160.0
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:93e84d24dee48ab941163f5c9102a2c96f39ad0386c97a6bc00cf7f3f4d480ad
|
3 |
+
size 5303
|
runs/Dec16_13-16-07_cedccf96d47c/events.out.tfevents.1734355001.cedccf96d47c.1160.1
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9b1a512af7d88ee68096435d88c9522512a972505d5392831f705d619d450703
|
3 |
+
size 5287
|
runs/Dec16_13-18-34_cedccf96d47c/events.out.tfevents.1734355126.cedccf96d47c.1160.2
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5c8d9b890ccea871479f5fdfefd2fdd8328eca0a67f6f39fa8fe31cd1ee7e466
|
3 |
+
size 5289
|
runs/Dec16_13-22-42_cedccf96d47c/events.out.tfevents.1734355366.cedccf96d47c.1160.3
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:54e6fa0ca90b1a8f69bc6f28742c13632ecef2c553adbf2067382101ffef36ef
|
3 |
+
size 5289
|
runs/Dec16_13-36-30_cedccf96d47c/events.out.tfevents.1734356197.cedccf96d47c.26489.0
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8fe156000db76fd5fc0ed8025f10e85ba3ae14a698e60e42d2bfefd784cbfd89
|
3 |
+
size 5302
|
runs/Dec16_13-40-47_cedccf96d47c/events.out.tfevents.1734356451.cedccf96d47c.26489.1
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0a45fc76b75c2d16b1141e8ccda6bcf1e43cd6f0bb0300618c87d3180397db6f
|
3 |
+
size 7387
|
runs/Dec16_13-40-47_cedccf96d47c/events.out.tfevents.1734358817.cedccf96d47c.26489.2
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8142b66648f656ece2932a0065ee934d19e9c3d25bda3bdb27cd8f12eb448263
|
3 |
+
size 359
|
runs/Dec16_13-40-47_cedccf96d47c/events.out.tfevents.1734359556.cedccf96d47c.26489.3
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:589c73a4bc436107edd80c538dea015ebe09a1fdaff6f413765cc473f07715bb
|
3 |
+
size 5343
|
runs/Dec16_14-35-03_cedccf96d47c/events.out.tfevents.1734359720.cedccf96d47c.26489.4
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:70efc97bb5aad5ce11c744c52fa1f6ff6fcdf0a777ac5108f5e89ddc92d05d64
|
3 |
+
size 9731
|
runs/Dec16_14-35-03_cedccf96d47c/events.out.tfevents.1734362194.cedccf96d47c.26489.5
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a296a073084abb847101b4e77e1a662da51a2322642fd550164d7f2a8f559ce7
|
3 |
+
size 560
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e025d3f2b289c236ee32cf52084d292170c1784154d8dd840a82b27312b566b0
|
3 |
+
size 5304
|