Model save
Browse files- README.md +79 -0
- all_results.json +8 -0
- config.json +42 -0
- eval_results.json +8 -0
- model.safetensors +3 -0
- preprocessor_config.json +36 -0
- training_args.bin +3 -0
README.md
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model: motheecreator/vit-Facial-Expression-Recognition
|
3 |
+
tags:
|
4 |
+
- generated_from_trainer
|
5 |
+
datasets:
|
6 |
+
- imagefolder
|
7 |
+
metrics:
|
8 |
+
- accuracy
|
9 |
+
model-index:
|
10 |
+
- name: vit-Facial-Expression-Recognition
|
11 |
+
results:
|
12 |
+
- task:
|
13 |
+
name: Image Classification
|
14 |
+
type: image-classification
|
15 |
+
dataset:
|
16 |
+
name: imagefolder
|
17 |
+
type: imagefolder
|
18 |
+
config: default
|
19 |
+
split: None
|
20 |
+
args: default
|
21 |
+
metrics:
|
22 |
+
- name: Accuracy
|
23 |
+
type: accuracy
|
24 |
+
value: 0.9176650877681806
|
25 |
+
---
|
26 |
+
|
27 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
28 |
+
should probably proofread and complete it, then remove this comment. -->
|
29 |
+
|
30 |
+
# vit-Facial-Expression-Recognition
|
31 |
+
|
32 |
+
This model is a fine-tuned version of [motheecreator/vit-Facial-Expression-Recognition](https://huggingface.co/motheecreator/vit-Facial-Expression-Recognition) on the imagefolder dataset.
|
33 |
+
It achieves the following results on the evaluation set:
|
34 |
+
- Loss: 0.2631
|
35 |
+
- Accuracy: 0.9177
|
36 |
+
|
37 |
+
## Model description
|
38 |
+
|
39 |
+
More information needed
|
40 |
+
|
41 |
+
## Intended uses & limitations
|
42 |
+
|
43 |
+
More information needed
|
44 |
+
|
45 |
+
## Training and evaluation data
|
46 |
+
|
47 |
+
More information needed
|
48 |
+
|
49 |
+
## Training procedure
|
50 |
+
|
51 |
+
### Training hyperparameters
|
52 |
+
|
53 |
+
The following hyperparameters were used during training:
|
54 |
+
- learning_rate: 3e-05
|
55 |
+
- train_batch_size: 32
|
56 |
+
- eval_batch_size: 32
|
57 |
+
- seed: 42
|
58 |
+
- gradient_accumulation_steps: 8
|
59 |
+
- total_train_batch_size: 256
|
60 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
61 |
+
- lr_scheduler_type: cosine
|
62 |
+
- lr_scheduler_warmup_steps: 1000
|
63 |
+
- num_epochs: 3
|
64 |
+
|
65 |
+
### Training results
|
66 |
+
|
67 |
+
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|
68 |
+
|:-------------:|:------:|:----:|:---------------:|:--------:|
|
69 |
+
| 0.5315 | 0.8909 | 100 | 0.2603 | 0.9184 |
|
70 |
+
| 0.5202 | 1.7817 | 200 | 0.2583 | 0.9181 |
|
71 |
+
| 0.4912 | 2.6726 | 300 | 0.2609 | 0.9171 |
|
72 |
+
|
73 |
+
|
74 |
+
### Framework versions
|
75 |
+
|
76 |
+
- Transformers 4.41.2
|
77 |
+
- Pytorch 2.3.0+cu121
|
78 |
+
- Datasets 2.20.0
|
79 |
+
- Tokenizers 0.19.1
|
all_results.json
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 2.9933184855233854,
|
3 |
+
"eval_accuracy": 0.9176650877681806,
|
4 |
+
"eval_loss": 0.2630792260169983,
|
5 |
+
"eval_runtime": 90.3053,
|
6 |
+
"eval_samples_per_second": 79.486,
|
7 |
+
"eval_steps_per_second": 2.492
|
8 |
+
}
|
config.json
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "motheecreator/vit-Facial-Expression-Recognition",
|
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": "angry",
|
13 |
+
"1": "disgust",
|
14 |
+
"2": "fear",
|
15 |
+
"3": "happy",
|
16 |
+
"4": "neutral",
|
17 |
+
"5": "sad",
|
18 |
+
"6": "surprise"
|
19 |
+
},
|
20 |
+
"image_size": 224,
|
21 |
+
"initializer_range": 0.02,
|
22 |
+
"intermediate_size": 3072,
|
23 |
+
"label2id": {
|
24 |
+
"angry": 0,
|
25 |
+
"disgust": 1,
|
26 |
+
"fear": 2,
|
27 |
+
"happy": 3,
|
28 |
+
"neutral": 4,
|
29 |
+
"sad": 5,
|
30 |
+
"surprise": 6
|
31 |
+
},
|
32 |
+
"layer_norm_eps": 1e-12,
|
33 |
+
"model_type": "vit",
|
34 |
+
"num_attention_heads": 12,
|
35 |
+
"num_channels": 3,
|
36 |
+
"num_hidden_layers": 12,
|
37 |
+
"patch_size": 16,
|
38 |
+
"problem_type": "single_label_classification",
|
39 |
+
"qkv_bias": true,
|
40 |
+
"torch_dtype": "float32",
|
41 |
+
"transformers_version": "4.41.2"
|
42 |
+
}
|
eval_results.json
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 2.9933184855233854,
|
3 |
+
"eval_accuracy": 0.9176650877681806,
|
4 |
+
"eval_loss": 0.2630792260169983,
|
5 |
+
"eval_runtime": 90.3053,
|
6 |
+
"eval_samples_per_second": 79.486,
|
7 |
+
"eval_steps_per_second": 2.492
|
8 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1384b119b966d408abe2520b83cc7abf6bc219bf2422a9596d091cfffd0aaf64
|
3 |
+
size 343239356
|
preprocessor_config.json
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_valid_processor_keys": [
|
3 |
+
"images",
|
4 |
+
"do_resize",
|
5 |
+
"size",
|
6 |
+
"resample",
|
7 |
+
"do_rescale",
|
8 |
+
"rescale_factor",
|
9 |
+
"do_normalize",
|
10 |
+
"image_mean",
|
11 |
+
"image_std",
|
12 |
+
"return_tensors",
|
13 |
+
"data_format",
|
14 |
+
"input_data_format"
|
15 |
+
],
|
16 |
+
"do_normalize": true,
|
17 |
+
"do_rescale": true,
|
18 |
+
"do_resize": true,
|
19 |
+
"image_mean": [
|
20 |
+
0.5,
|
21 |
+
0.5,
|
22 |
+
0.5
|
23 |
+
],
|
24 |
+
"image_processor_type": "ViTImageProcessor",
|
25 |
+
"image_std": [
|
26 |
+
0.5,
|
27 |
+
0.5,
|
28 |
+
0.5
|
29 |
+
],
|
30 |
+
"resample": 2,
|
31 |
+
"rescale_factor": 0.00392156862745098,
|
32 |
+
"size": {
|
33 |
+
"height": 224,
|
34 |
+
"width": 224
|
35 |
+
}
|
36 |
+
}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:35072639e4ac4e4a1613d7e0e8d8bc2de8d45a5fa25ca78c5b05d52551410f52
|
3 |
+
size 5112
|