🍻 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_17-18-53_7e3230700a6d/1630084803.0620794/events.out.tfevents.1630084803.7e3230700a6d.76.3 +3 -0
- runs/Aug27_17-18-53_7e3230700a6d/events.out.tfevents.1630084803.7e3230700a6d.76.2 +3 -0
- runs/Aug27_17-18-53_7e3230700a6d/events.out.tfevents.1630085080.7e3230700a6d.76.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-v2
|
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: 1.0
|
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-v2
|
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.0099
|
35 |
+
- Accuracy: 1.0
|
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.0705 | 1.54 | 100 | 0.0562 | 0.9925 |
|
68 |
+
| 0.0123 | 3.08 | 200 | 0.0124 | 1.0 |
|
69 |
+
| 0.008 | 4.62 | 300 | 0.0099 | 1.0 |
|
70 |
+
|
71 |
+
|
72 |
+
### Framework versions
|
73 |
+
|
74 |
+
- Transformers 4.10.0.dev0
|
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": 1.0,
|
4 |
+
"eval_loss": 0.009908660314977169,
|
5 |
+
"eval_runtime": 4.7206,
|
6 |
+
"eval_samples_per_second": 28.175,
|
7 |
+
"eval_steps_per_second": 3.601,
|
8 |
+
"total_flos": 0.0,
|
9 |
+
"train_loss": 0.11144641899145566,
|
10 |
+
"train_runtime": 271.4578,
|
11 |
+
"train_samples_per_second": 19.045,
|
12 |
+
"train_steps_per_second": 1.197
|
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.10.0.dev0"
|
31 |
+
}
|
eval_results.json
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 5.0,
|
3 |
+
"eval_accuracy": 1.0,
|
4 |
+
"eval_loss": 0.009908660314977169,
|
5 |
+
"eval_runtime": 4.7206,
|
6 |
+
"eval_samples_per_second": 28.175,
|
7 |
+
"eval_steps_per_second": 3.601
|
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:8f9141e450b863b1b71e627cf128f40987b6cb648796eb7bf7e3bca5e56ec3b5
|
3 |
+
size 343282929
|
runs/Aug27_17-18-53_7e3230700a6d/1630084803.0620794/events.out.tfevents.1630084803.7e3230700a6d.76.3
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:54ff20bdf58e11e60baec59a0bfdbf7fe35d31d1a0b66461420e3e428bbf9edf
|
3 |
+
size 4240
|
runs/Aug27_17-18-53_7e3230700a6d/events.out.tfevents.1630084803.7e3230700a6d.76.2
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:db79ed71a70670ea4f1ad0c3f66b54b7b4cd590ecc7db9003285c9585effa334
|
3 |
+
size 9322
|
runs/Aug27_17-18-53_7e3230700a6d/events.out.tfevents.1630085080.7e3230700a6d.76.4
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:827dcdf7b014055173d98cc282274486cf7f30e1d130d43b5dadbd6a15935de0
|
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.11144641899145566,
|
5 |
+
"train_runtime": 271.4578,
|
6 |
+
"train_samples_per_second": 19.045,
|
7 |
+
"train_steps_per_second": 1.197
|
8 |
+
}
|
trainer_state.json
ADDED
@@ -0,0 +1,244 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"best_metric": 0.009908660314977169,
|
3 |
+
"best_model_checkpoint": "./vit-base-beans-demo-v2/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.8469,
|
14 |
+
"step": 10
|
15 |
+
},
|
16 |
+
{
|
17 |
+
"epoch": 0.31,
|
18 |
+
"learning_rate": 0.0001876923076923077,
|
19 |
+
"loss": 0.474,
|
20 |
+
"step": 20
|
21 |
+
},
|
22 |
+
{
|
23 |
+
"epoch": 0.46,
|
24 |
+
"learning_rate": 0.00018153846153846155,
|
25 |
+
"loss": 0.4772,
|
26 |
+
"step": 30
|
27 |
+
},
|
28 |
+
{
|
29 |
+
"epoch": 0.62,
|
30 |
+
"learning_rate": 0.0001753846153846154,
|
31 |
+
"loss": 0.3322,
|
32 |
+
"step": 40
|
33 |
+
},
|
34 |
+
{
|
35 |
+
"epoch": 0.77,
|
36 |
+
"learning_rate": 0.00016923076923076923,
|
37 |
+
"loss": 0.2348,
|
38 |
+
"step": 50
|
39 |
+
},
|
40 |
+
{
|
41 |
+
"epoch": 0.92,
|
42 |
+
"learning_rate": 0.0001630769230769231,
|
43 |
+
"loss": 0.1734,
|
44 |
+
"step": 60
|
45 |
+
},
|
46 |
+
{
|
47 |
+
"epoch": 1.08,
|
48 |
+
"learning_rate": 0.00015692307692307693,
|
49 |
+
"loss": 0.2408,
|
50 |
+
"step": 70
|
51 |
+
},
|
52 |
+
{
|
53 |
+
"epoch": 1.23,
|
54 |
+
"learning_rate": 0.00015076923076923077,
|
55 |
+
"loss": 0.1521,
|
56 |
+
"step": 80
|
57 |
+
},
|
58 |
+
{
|
59 |
+
"epoch": 1.38,
|
60 |
+
"learning_rate": 0.0001446153846153846,
|
61 |
+
"loss": 0.0669,
|
62 |
+
"step": 90
|
63 |
+
},
|
64 |
+
{
|
65 |
+
"epoch": 1.54,
|
66 |
+
"learning_rate": 0.00013846153846153847,
|
67 |
+
"loss": 0.0705,
|
68 |
+
"step": 100
|
69 |
+
},
|
70 |
+
{
|
71 |
+
"epoch": 1.54,
|
72 |
+
"eval_accuracy": 0.9924812030075187,
|
73 |
+
"eval_loss": 0.056155215948820114,
|
74 |
+
"eval_runtime": 4.6463,
|
75 |
+
"eval_samples_per_second": 28.625,
|
76 |
+
"eval_steps_per_second": 3.659,
|
77 |
+
"step": 100
|
78 |
+
},
|
79 |
+
{
|
80 |
+
"epoch": 1.69,
|
81 |
+
"learning_rate": 0.0001323076923076923,
|
82 |
+
"loss": 0.0878,
|
83 |
+
"step": 110
|
84 |
+
},
|
85 |
+
{
|
86 |
+
"epoch": 1.85,
|
87 |
+
"learning_rate": 0.00012615384615384615,
|
88 |
+
"loss": 0.0617,
|
89 |
+
"step": 120
|
90 |
+
},
|
91 |
+
{
|
92 |
+
"epoch": 2.0,
|
93 |
+
"learning_rate": 0.00012,
|
94 |
+
"loss": 0.0667,
|
95 |
+
"step": 130
|
96 |
+
},
|
97 |
+
{
|
98 |
+
"epoch": 2.15,
|
99 |
+
"learning_rate": 0.00011384615384615384,
|
100 |
+
"loss": 0.0469,
|
101 |
+
"step": 140
|
102 |
+
},
|
103 |
+
{
|
104 |
+
"epoch": 2.31,
|
105 |
+
"learning_rate": 0.0001076923076923077,
|
106 |
+
"loss": 0.03,
|
107 |
+
"step": 150
|
108 |
+
},
|
109 |
+
{
|
110 |
+
"epoch": 2.46,
|
111 |
+
"learning_rate": 0.00010153846153846153,
|
112 |
+
"loss": 0.042,
|
113 |
+
"step": 160
|
114 |
+
},
|
115 |
+
{
|
116 |
+
"epoch": 2.62,
|
117 |
+
"learning_rate": 9.53846153846154e-05,
|
118 |
+
"loss": 0.0172,
|
119 |
+
"step": 170
|
120 |
+
},
|
121 |
+
{
|
122 |
+
"epoch": 2.77,
|
123 |
+
"learning_rate": 8.923076923076924e-05,
|
124 |
+
"loss": 0.0227,
|
125 |
+
"step": 180
|
126 |
+
},
|
127 |
+
{
|
128 |
+
"epoch": 2.92,
|
129 |
+
"learning_rate": 8.307692307692309e-05,
|
130 |
+
"loss": 0.0135,
|
131 |
+
"step": 190
|
132 |
+
},
|
133 |
+
{
|
134 |
+
"epoch": 3.08,
|
135 |
+
"learning_rate": 7.692307692307693e-05,
|
136 |
+
"loss": 0.0123,
|
137 |
+
"step": 200
|
138 |
+
},
|
139 |
+
{
|
140 |
+
"epoch": 3.08,
|
141 |
+
"eval_accuracy": 1.0,
|
142 |
+
"eval_loss": 0.012411748990416527,
|
143 |
+
"eval_runtime": 4.552,
|
144 |
+
"eval_samples_per_second": 29.218,
|
145 |
+
"eval_steps_per_second": 3.735,
|
146 |
+
"step": 200
|
147 |
+
},
|
148 |
+
{
|
149 |
+
"epoch": 3.23,
|
150 |
+
"learning_rate": 7.076923076923078e-05,
|
151 |
+
"loss": 0.0221,
|
152 |
+
"step": 210
|
153 |
+
},
|
154 |
+
{
|
155 |
+
"epoch": 3.38,
|
156 |
+
"learning_rate": 6.461538461538462e-05,
|
157 |
+
"loss": 0.0381,
|
158 |
+
"step": 220
|
159 |
+
},
|
160 |
+
{
|
161 |
+
"epoch": 3.54,
|
162 |
+
"learning_rate": 5.846153846153847e-05,
|
163 |
+
"loss": 0.0112,
|
164 |
+
"step": 230
|
165 |
+
},
|
166 |
+
{
|
167 |
+
"epoch": 3.69,
|
168 |
+
"learning_rate": 5.230769230769231e-05,
|
169 |
+
"loss": 0.0093,
|
170 |
+
"step": 240
|
171 |
+
},
|
172 |
+
{
|
173 |
+
"epoch": 3.85,
|
174 |
+
"learning_rate": 4.615384615384616e-05,
|
175 |
+
"loss": 0.0095,
|
176 |
+
"step": 250
|
177 |
+
},
|
178 |
+
{
|
179 |
+
"epoch": 4.0,
|
180 |
+
"learning_rate": 4e-05,
|
181 |
+
"loss": 0.0089,
|
182 |
+
"step": 260
|
183 |
+
},
|
184 |
+
{
|
185 |
+
"epoch": 4.15,
|
186 |
+
"learning_rate": 3.384615384615385e-05,
|
187 |
+
"loss": 0.0086,
|
188 |
+
"step": 270
|
189 |
+
},
|
190 |
+
{
|
191 |
+
"epoch": 4.31,
|
192 |
+
"learning_rate": 2.7692307692307694e-05,
|
193 |
+
"loss": 0.0085,
|
194 |
+
"step": 280
|
195 |
+
},
|
196 |
+
{
|
197 |
+
"epoch": 4.46,
|
198 |
+
"learning_rate": 2.1538461538461542e-05,
|
199 |
+
"loss": 0.008,
|
200 |
+
"step": 290
|
201 |
+
},
|
202 |
+
{
|
203 |
+
"epoch": 4.62,
|
204 |
+
"learning_rate": 1.5384615384615387e-05,
|
205 |
+
"loss": 0.008,
|
206 |
+
"step": 300
|
207 |
+
},
|
208 |
+
{
|
209 |
+
"epoch": 4.62,
|
210 |
+
"eval_accuracy": 1.0,
|
211 |
+
"eval_loss": 0.009908660314977169,
|
212 |
+
"eval_runtime": 4.573,
|
213 |
+
"eval_samples_per_second": 29.084,
|
214 |
+
"eval_steps_per_second": 3.717,
|
215 |
+
"step": 300
|
216 |
+
},
|
217 |
+
{
|
218 |
+
"epoch": 4.77,
|
219 |
+
"learning_rate": 9.230769230769232e-06,
|
220 |
+
"loss": 0.008,
|
221 |
+
"step": 310
|
222 |
+
},
|
223 |
+
{
|
224 |
+
"epoch": 4.92,
|
225 |
+
"learning_rate": 3.0769230769230774e-06,
|
226 |
+
"loss": 0.0079,
|
227 |
+
"step": 320
|
228 |
+
},
|
229 |
+
{
|
230 |
+
"epoch": 5.0,
|
231 |
+
"step": 325,
|
232 |
+
"total_flos": 0.0,
|
233 |
+
"train_loss": 0.11144641899145566,
|
234 |
+
"train_runtime": 271.4578,
|
235 |
+
"train_samples_per_second": 19.045,
|
236 |
+
"train_steps_per_second": 1.197
|
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:2db155f9facce764f25ce3d123b09a8a896c2a163a27d8aeef28794b13fa13ed
|
3 |
+
size 2671
|