🍻 cheers
Browse files- .gitignore +1 -0
- README.md +77 -0
- all_results.json +13 -0
- config.json +31 -0
- eval_results.json +8 -0
- preprocessor_config.json +17 -0
- pytorch_model.bin +3 -0
- runs/Aug27_16-30-41_9e847c0b70d7/1630081873.658372/events.out.tfevents.1630081873.9e847c0b70d7.77.3 +3 -0
- runs/Aug27_16-30-41_9e847c0b70d7/events.out.tfevents.1630081873.9e847c0b70d7.77.2 +3 -0
- runs/Aug27_16-30-41_9e847c0b70d7/events.out.tfevents.1630082129.9e847c0b70d7.77.4 +3 -0
- train_results.json +8 -0
- trainer_state.json +244 -0
- training_args.bin +3 -0
.gitignore
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
checkpoint-*/
|
README.md
ADDED
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
tags:
|
4 |
+
- image-classification
|
5 |
+
- other-image-classification
|
6 |
+
- generated_from_trainer
|
7 |
+
datasets:
|
8 |
+
- beans
|
9 |
+
metrics:
|
10 |
+
- accuracy
|
11 |
+
model_index:
|
12 |
+
- name: vit-base-beans-demo
|
13 |
+
results:
|
14 |
+
- task:
|
15 |
+
name: Image Classification
|
16 |
+
type: image-classification
|
17 |
+
dataset:
|
18 |
+
name: beans
|
19 |
+
type: beans
|
20 |
+
args: default
|
21 |
+
metric:
|
22 |
+
name: Accuracy
|
23 |
+
type: accuracy
|
24 |
+
value: 0.9774436090225563
|
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-base-beans-demo
|
31 |
+
|
32 |
+
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 beans dataset.
|
33 |
+
It achieves the following results on the evaluation set:
|
34 |
+
- Loss: 0.0853
|
35 |
+
- Accuracy: 0.9774
|
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: 0.0002
|
55 |
+
- train_batch_size: 16
|
56 |
+
- eval_batch_size: 8
|
57 |
+
- seed: 42
|
58 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
59 |
+
- lr_scheduler_type: linear
|
60 |
+
- num_epochs: 5
|
61 |
+
- mixed_precision_training: Native AMP
|
62 |
+
|
63 |
+
### Training results
|
64 |
+
|
65 |
+
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|
66 |
+
|:-------------:|:-----:|:----:|:---------------:|:--------:|
|
67 |
+
| 0.0545 | 1.54 | 100 | 0.1436 | 0.9624 |
|
68 |
+
| 0.006 | 3.08 | 200 | 0.1058 | 0.9699 |
|
69 |
+
| 0.0038 | 4.62 | 300 | 0.0853 | 0.9774 |
|
70 |
+
|
71 |
+
|
72 |
+
### Framework versions
|
73 |
+
|
74 |
+
- Transformers 4.9.2
|
75 |
+
- Pytorch 1.9.0+cu102
|
76 |
+
- Datasets 1.11.0
|
77 |
+
- Tokenizers 0.10.3
|
all_results.json
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 5.0,
|
3 |
+
"eval_accuracy": 0.9774436090225563,
|
4 |
+
"eval_loss": 0.08533324301242828,
|
5 |
+
"eval_runtime": 5.0605,
|
6 |
+
"eval_samples_per_second": 26.282,
|
7 |
+
"eval_steps_per_second": 3.359,
|
8 |
+
"total_flos": 0.0,
|
9 |
+
"train_loss": 0.05844223602459981,
|
10 |
+
"train_runtime": 230.414,
|
11 |
+
"train_samples_per_second": 22.438,
|
12 |
+
"train_steps_per_second": 1.411
|
13 |
+
}
|
config.json
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "google/vit-base-patch16-224-in21k",
|
3 |
+
"architectures": [
|
4 |
+
"ViTForImageClassification"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.0,
|
7 |
+
"hidden_act": "gelu",
|
8 |
+
"hidden_dropout_prob": 0.0,
|
9 |
+
"hidden_size": 768,
|
10 |
+
"id2label": {
|
11 |
+
"0": "angular_leaf_spot",
|
12 |
+
"1": "bean_rust",
|
13 |
+
"2": "healthy"
|
14 |
+
},
|
15 |
+
"image_size": 224,
|
16 |
+
"initializer_range": 0.02,
|
17 |
+
"intermediate_size": 3072,
|
18 |
+
"label2id": {
|
19 |
+
"angular_leaf_spot": "0",
|
20 |
+
"bean_rust": "1",
|
21 |
+
"healthy": "2"
|
22 |
+
},
|
23 |
+
"layer_norm_eps": 1e-12,
|
24 |
+
"model_type": "vit",
|
25 |
+
"num_attention_heads": 12,
|
26 |
+
"num_channels": 3,
|
27 |
+
"num_hidden_layers": 12,
|
28 |
+
"patch_size": 16,
|
29 |
+
"torch_dtype": "float32",
|
30 |
+
"transformers_version": "4.9.2"
|
31 |
+
}
|
eval_results.json
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 5.0,
|
3 |
+
"eval_accuracy": 0.9774436090225563,
|
4 |
+
"eval_loss": 0.08533324301242828,
|
5 |
+
"eval_runtime": 5.0605,
|
6 |
+
"eval_samples_per_second": 26.282,
|
7 |
+
"eval_steps_per_second": 3.359
|
8 |
+
}
|
preprocessor_config.json
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"do_normalize": true,
|
3 |
+
"do_resize": true,
|
4 |
+
"feature_extractor_type": "ViTFeatureExtractor",
|
5 |
+
"image_mean": [
|
6 |
+
0.5,
|
7 |
+
0.5,
|
8 |
+
0.5
|
9 |
+
],
|
10 |
+
"image_std": [
|
11 |
+
0.5,
|
12 |
+
0.5,
|
13 |
+
0.5
|
14 |
+
],
|
15 |
+
"resample": 2,
|
16 |
+
"size": 224
|
17 |
+
}
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8430622bd74c99938040f285cb619132ffe53e9116f083b46bede0d9abb2b3f5
|
3 |
+
size 343282929
|
runs/Aug27_16-30-41_9e847c0b70d7/1630081873.658372/events.out.tfevents.1630081873.9e847c0b70d7.77.3
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7f89a0df71ddcdd893f323dd4e526bfe3c17d75a5e07f610abce8a10f6e86a25
|
3 |
+
size 4228
|
runs/Aug27_16-30-41_9e847c0b70d7/events.out.tfevents.1630081873.9e847c0b70d7.77.2
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c3690ba8c51cfc406e2b969826311f6192198772f12df73578d913fc1ea735d2
|
3 |
+
size 9304
|
runs/Aug27_16-30-41_9e847c0b70d7/events.out.tfevents.1630082129.9e847c0b70d7.77.4
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:86546ff11cb3ee7dfaa476b693f563caf9149a5d76430a7f9580b5bf7f835ad3
|
3 |
+
size 363
|
train_results.json
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 5.0,
|
3 |
+
"total_flos": 0.0,
|
4 |
+
"train_loss": 0.05844223602459981,
|
5 |
+
"train_runtime": 230.414,
|
6 |
+
"train_samples_per_second": 22.438,
|
7 |
+
"train_steps_per_second": 1.411
|
8 |
+
}
|
trainer_state.json
ADDED
@@ -0,0 +1,244 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"best_metric": 0.08533324301242828,
|
3 |
+
"best_model_checkpoint": "./vit-base-beans-demo/checkpoint-300",
|
4 |
+
"epoch": 5.0,
|
5 |
+
"global_step": 325,
|
6 |
+
"is_hyper_param_search": false,
|
7 |
+
"is_local_process_zero": true,
|
8 |
+
"is_world_process_zero": true,
|
9 |
+
"log_history": [
|
10 |
+
{
|
11 |
+
"epoch": 0.15,
|
12 |
+
"learning_rate": 0.00019384615384615385,
|
13 |
+
"loss": 0.2116,
|
14 |
+
"step": 10
|
15 |
+
},
|
16 |
+
{
|
17 |
+
"epoch": 0.31,
|
18 |
+
"learning_rate": 0.0001876923076923077,
|
19 |
+
"loss": 0.1891,
|
20 |
+
"step": 20
|
21 |
+
},
|
22 |
+
{
|
23 |
+
"epoch": 0.46,
|
24 |
+
"learning_rate": 0.00018153846153846155,
|
25 |
+
"loss": 0.0855,
|
26 |
+
"step": 30
|
27 |
+
},
|
28 |
+
{
|
29 |
+
"epoch": 0.62,
|
30 |
+
"learning_rate": 0.0001753846153846154,
|
31 |
+
"loss": 0.1651,
|
32 |
+
"step": 40
|
33 |
+
},
|
34 |
+
{
|
35 |
+
"epoch": 0.77,
|
36 |
+
"learning_rate": 0.00016923076923076923,
|
37 |
+
"loss": 0.1261,
|
38 |
+
"step": 50
|
39 |
+
},
|
40 |
+
{
|
41 |
+
"epoch": 0.92,
|
42 |
+
"learning_rate": 0.0001630769230769231,
|
43 |
+
"loss": 0.2639,
|
44 |
+
"step": 60
|
45 |
+
},
|
46 |
+
{
|
47 |
+
"epoch": 1.08,
|
48 |
+
"learning_rate": 0.00015692307692307693,
|
49 |
+
"loss": 0.1101,
|
50 |
+
"step": 70
|
51 |
+
},
|
52 |
+
{
|
53 |
+
"epoch": 1.23,
|
54 |
+
"learning_rate": 0.00015076923076923077,
|
55 |
+
"loss": 0.0655,
|
56 |
+
"step": 80
|
57 |
+
},
|
58 |
+
{
|
59 |
+
"epoch": 1.38,
|
60 |
+
"learning_rate": 0.0001446153846153846,
|
61 |
+
"loss": 0.0909,
|
62 |
+
"step": 90
|
63 |
+
},
|
64 |
+
{
|
65 |
+
"epoch": 1.54,
|
66 |
+
"learning_rate": 0.00013846153846153847,
|
67 |
+
"loss": 0.0545,
|
68 |
+
"step": 100
|
69 |
+
},
|
70 |
+
{
|
71 |
+
"epoch": 1.54,
|
72 |
+
"eval_accuracy": 0.9624060150375939,
|
73 |
+
"eval_loss": 0.14361602067947388,
|
74 |
+
"eval_runtime": 4.9212,
|
75 |
+
"eval_samples_per_second": 27.026,
|
76 |
+
"eval_steps_per_second": 3.454,
|
77 |
+
"step": 100
|
78 |
+
},
|
79 |
+
{
|
80 |
+
"epoch": 1.69,
|
81 |
+
"learning_rate": 0.0001323076923076923,
|
82 |
+
"loss": 0.0318,
|
83 |
+
"step": 110
|
84 |
+
},
|
85 |
+
{
|
86 |
+
"epoch": 1.85,
|
87 |
+
"learning_rate": 0.00012615384615384615,
|
88 |
+
"loss": 0.0993,
|
89 |
+
"step": 120
|
90 |
+
},
|
91 |
+
{
|
92 |
+
"epoch": 2.0,
|
93 |
+
"learning_rate": 0.00012061538461538462,
|
94 |
+
"loss": 0.1259,
|
95 |
+
"step": 130
|
96 |
+
},
|
97 |
+
{
|
98 |
+
"epoch": 2.15,
|
99 |
+
"learning_rate": 0.00011446153846153846,
|
100 |
+
"loss": 0.098,
|
101 |
+
"step": 140
|
102 |
+
},
|
103 |
+
{
|
104 |
+
"epoch": 2.31,
|
105 |
+
"learning_rate": 0.00010830769230769231,
|
106 |
+
"loss": 0.0788,
|
107 |
+
"step": 150
|
108 |
+
},
|
109 |
+
{
|
110 |
+
"epoch": 2.46,
|
111 |
+
"learning_rate": 0.00010215384615384615,
|
112 |
+
"loss": 0.0204,
|
113 |
+
"step": 160
|
114 |
+
},
|
115 |
+
{
|
116 |
+
"epoch": 2.62,
|
117 |
+
"learning_rate": 9.6e-05,
|
118 |
+
"loss": 0.0094,
|
119 |
+
"step": 170
|
120 |
+
},
|
121 |
+
{
|
122 |
+
"epoch": 2.77,
|
123 |
+
"learning_rate": 8.984615384615384e-05,
|
124 |
+
"loss": 0.0086,
|
125 |
+
"step": 180
|
126 |
+
},
|
127 |
+
{
|
128 |
+
"epoch": 2.92,
|
129 |
+
"learning_rate": 8.369230769230769e-05,
|
130 |
+
"loss": 0.007,
|
131 |
+
"step": 190
|
132 |
+
},
|
133 |
+
{
|
134 |
+
"epoch": 3.08,
|
135 |
+
"learning_rate": 7.753846153846153e-05,
|
136 |
+
"loss": 0.006,
|
137 |
+
"step": 200
|
138 |
+
},
|
139 |
+
{
|
140 |
+
"epoch": 3.08,
|
141 |
+
"eval_accuracy": 0.9699248120300752,
|
142 |
+
"eval_loss": 0.10582129657268524,
|
143 |
+
"eval_runtime": 4.8551,
|
144 |
+
"eval_samples_per_second": 27.394,
|
145 |
+
"eval_steps_per_second": 3.501,
|
146 |
+
"step": 200
|
147 |
+
},
|
148 |
+
{
|
149 |
+
"epoch": 3.23,
|
150 |
+
"learning_rate": 7.138461538461538e-05,
|
151 |
+
"loss": 0.005,
|
152 |
+
"step": 210
|
153 |
+
},
|
154 |
+
{
|
155 |
+
"epoch": 3.38,
|
156 |
+
"learning_rate": 6.523076923076923e-05,
|
157 |
+
"loss": 0.0049,
|
158 |
+
"step": 220
|
159 |
+
},
|
160 |
+
{
|
161 |
+
"epoch": 3.54,
|
162 |
+
"learning_rate": 5.907692307692309e-05,
|
163 |
+
"loss": 0.0046,
|
164 |
+
"step": 230
|
165 |
+
},
|
166 |
+
{
|
167 |
+
"epoch": 3.69,
|
168 |
+
"learning_rate": 5.292307692307693e-05,
|
169 |
+
"loss": 0.0043,
|
170 |
+
"step": 240
|
171 |
+
},
|
172 |
+
{
|
173 |
+
"epoch": 3.85,
|
174 |
+
"learning_rate": 4.676923076923077e-05,
|
175 |
+
"loss": 0.0043,
|
176 |
+
"step": 250
|
177 |
+
},
|
178 |
+
{
|
179 |
+
"epoch": 4.0,
|
180 |
+
"learning_rate": 4.0615384615384615e-05,
|
181 |
+
"loss": 0.0041,
|
182 |
+
"step": 260
|
183 |
+
},
|
184 |
+
{
|
185 |
+
"epoch": 4.15,
|
186 |
+
"learning_rate": 3.446153846153846e-05,
|
187 |
+
"loss": 0.004,
|
188 |
+
"step": 270
|
189 |
+
},
|
190 |
+
{
|
191 |
+
"epoch": 4.31,
|
192 |
+
"learning_rate": 2.8307692307692306e-05,
|
193 |
+
"loss": 0.0039,
|
194 |
+
"step": 280
|
195 |
+
},
|
196 |
+
{
|
197 |
+
"epoch": 4.46,
|
198 |
+
"learning_rate": 2.2153846153846154e-05,
|
199 |
+
"loss": 0.0038,
|
200 |
+
"step": 290
|
201 |
+
},
|
202 |
+
{
|
203 |
+
"epoch": 4.62,
|
204 |
+
"learning_rate": 1.6000000000000003e-05,
|
205 |
+
"loss": 0.0038,
|
206 |
+
"step": 300
|
207 |
+
},
|
208 |
+
{
|
209 |
+
"epoch": 4.62,
|
210 |
+
"eval_accuracy": 0.9774436090225563,
|
211 |
+
"eval_loss": 0.08533324301242828,
|
212 |
+
"eval_runtime": 4.9438,
|
213 |
+
"eval_samples_per_second": 26.903,
|
214 |
+
"eval_steps_per_second": 3.439,
|
215 |
+
"step": 300
|
216 |
+
},
|
217 |
+
{
|
218 |
+
"epoch": 4.77,
|
219 |
+
"learning_rate": 9.846153846153846e-06,
|
220 |
+
"loss": 0.0037,
|
221 |
+
"step": 310
|
222 |
+
},
|
223 |
+
{
|
224 |
+
"epoch": 4.92,
|
225 |
+
"learning_rate": 3.692307692307693e-06,
|
226 |
+
"loss": 0.0038,
|
227 |
+
"step": 320
|
228 |
+
},
|
229 |
+
{
|
230 |
+
"epoch": 5.0,
|
231 |
+
"step": 325,
|
232 |
+
"total_flos": 0.0,
|
233 |
+
"train_loss": 0.05844223602459981,
|
234 |
+
"train_runtime": 230.414,
|
235 |
+
"train_samples_per_second": 22.438,
|
236 |
+
"train_steps_per_second": 1.411
|
237 |
+
}
|
238 |
+
],
|
239 |
+
"max_steps": 325,
|
240 |
+
"num_train_epochs": 5,
|
241 |
+
"total_flos": 0.0,
|
242 |
+
"trial_name": null,
|
243 |
+
"trial_params": null
|
244 |
+
}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:be05f7870709d57e98a44d4985e0a12bff76f5fcda536e10b1926acaf3975c71
|
3 |
+
size 2671
|