Ivanrs commited on
Commit
7cbb7b1
·
verified ·
1 Parent(s): d06746a

vit-finetune-kidney-stone-Jonathan_El-Beze_-w256_1k_v1-_SEC

Browse files
README.md ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ tags:
4
+ - generated_from_trainer
5
+ datasets:
6
+ - imagefolder
7
+ metrics:
8
+ - accuracy
9
+ - precision
10
+ - recall
11
+ - f1
12
+ model-index:
13
+ - name: vit-finetune-kidney-stone-Jonathan_El-Beze_-w256_1k_v1-_SEC
14
+ results:
15
+ - task:
16
+ name: Image Classification
17
+ type: image-classification
18
+ dataset:
19
+ name: imagefolder
20
+ type: imagefolder
21
+ config: default
22
+ split: test
23
+ args: default
24
+ metrics:
25
+ - name: Accuracy
26
+ type: accuracy
27
+ value: 0.9533333333333334
28
+ - name: Precision
29
+ type: precision
30
+ value: 0.9601344218764242
31
+ - name: Recall
32
+ type: recall
33
+ value: 0.9533333333333334
34
+ - name: F1
35
+ type: f1
36
+ value: 0.953396953389295
37
+ ---
38
+
39
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
40
+ should probably proofread and complete it, then remove this comment. -->
41
+
42
+ # vit-finetune-kidney-stone-Jonathan_El-Beze_-w256_1k_v1-_SEC
43
+
44
+ This model was trained from scratch on the imagefolder dataset.
45
+ It achieves the following results on the evaluation set:
46
+ - Loss: 0.1649
47
+ - Accuracy: 0.9533
48
+ - Precision: 0.9601
49
+ - Recall: 0.9533
50
+ - F1: 0.9534
51
+
52
+ ## Model description
53
+
54
+ More information needed
55
+
56
+ ## Intended uses & limitations
57
+
58
+ More information needed
59
+
60
+ ## Training and evaluation data
61
+
62
+ More information needed
63
+
64
+ ## Training procedure
65
+
66
+ ### Training hyperparameters
67
+
68
+ The following hyperparameters were used during training:
69
+ - learning_rate: 0.0002
70
+ - train_batch_size: 32
71
+ - eval_batch_size: 8
72
+ - seed: 42
73
+ - optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
74
+ - lr_scheduler_type: linear
75
+ - num_epochs: 1
76
+ - mixed_precision_training: Native AMP
77
+
78
+ ### Training results
79
+
80
+ | Training Loss | Epoch | Step | Validation Loss | Accuracy | Precision | Recall | F1 |
81
+ |:-------------:|:------:|:----:|:---------------:|:--------:|:---------:|:------:|:------:|
82
+ | 0.0293 | 0.6667 | 100 | 0.1649 | 0.9533 | 0.9601 | 0.9533 | 0.9534 |
83
+
84
+
85
+ ### Framework versions
86
+
87
+ - Transformers 4.48.2
88
+ - Pytorch 2.6.0+cu126
89
+ - Datasets 3.2.0
90
+ - Tokenizers 0.21.0
all_results.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 1.0,
3
+ "eval_accuracy": 0.9533333333333334,
4
+ "eval_f1": 0.953396953389295,
5
+ "eval_loss": 0.1649296134710312,
6
+ "eval_precision": 0.9601344218764242,
7
+ "eval_recall": 0.9533333333333334,
8
+ "eval_runtime": 9.802,
9
+ "eval_samples_per_second": 122.423,
10
+ "eval_steps_per_second": 15.303,
11
+ "total_flos": 3.71974885244928e+17,
12
+ "train_loss": 0.19624810536702475,
13
+ "train_runtime": 64.1985,
14
+ "train_samples_per_second": 74.768,
15
+ "train_steps_per_second": 2.337
16
+ }
config.json ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "vit-finetune-kidney-stone-Michel_Daudon_-w256_1k_v1-_SEC",
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": "SEC-Subtype_IIIa",
13
+ "1": "SEC-Subtype_IIa",
14
+ "2": "SEC-Subtype_IVc",
15
+ "3": "SEC-Subtype_IVd",
16
+ "4": "SEC-Subtype_Ia",
17
+ "5": "SEC-Subtype_Va"
18
+ },
19
+ "image_size": 224,
20
+ "initializer_range": 0.02,
21
+ "intermediate_size": 3072,
22
+ "label2id": {
23
+ "SEC-Subtype_IIIa": "0",
24
+ "SEC-Subtype_IIa": "1",
25
+ "SEC-Subtype_IVc": "2",
26
+ "SEC-Subtype_IVd": "3",
27
+ "SEC-Subtype_Ia": "4",
28
+ "SEC-Subtype_Va": "5"
29
+ },
30
+ "layer_norm_eps": 1e-12,
31
+ "model_type": "vit",
32
+ "num_attention_heads": 12,
33
+ "num_channels": 3,
34
+ "num_hidden_layers": 12,
35
+ "patch_size": 16,
36
+ "problem_type": "single_label_classification",
37
+ "qkv_bias": true,
38
+ "torch_dtype": "float32",
39
+ "transformers_version": "4.48.2"
40
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c1fadd1a2ae5e200a0334b4bba1546ec86f6bbe860f176b5724023fa3ceffc9f
3
+ size 343236280
preprocessor_config.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_convert_rgb": null,
3
+ "do_normalize": true,
4
+ "do_rescale": true,
5
+ "do_resize": true,
6
+ "image_mean": [
7
+ 0.5,
8
+ 0.5,
9
+ 0.5
10
+ ],
11
+ "image_processor_type": "ViTFeatureExtractor",
12
+ "image_std": [
13
+ 0.5,
14
+ 0.5,
15
+ 0.5
16
+ ],
17
+ "resample": 2,
18
+ "rescale_factor": 0.00392156862745098,
19
+ "size": {
20
+ "height": 224,
21
+ "width": 224
22
+ }
23
+ }
test_results.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 1.0,
3
+ "eval_accuracy": 0.9533333333333334,
4
+ "eval_f1": 0.953396953389295,
5
+ "eval_loss": 0.1649296134710312,
6
+ "eval_precision": 0.9601344218764242,
7
+ "eval_recall": 0.9533333333333334,
8
+ "eval_runtime": 9.802,
9
+ "eval_samples_per_second": 122.423,
10
+ "eval_steps_per_second": 15.303
11
+ }
train_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 1.0,
3
+ "total_flos": 3.71974885244928e+17,
4
+ "train_loss": 0.19624810536702475,
5
+ "train_runtime": 64.1985,
6
+ "train_samples_per_second": 74.768,
7
+ "train_steps_per_second": 2.337
8
+ }
trainer_state.json ADDED
@@ -0,0 +1,264 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": 0.1649296134710312,
3
+ "best_model_checkpoint": "vit-finetune-kidney-stone-Jonathan_El-Beze_-w256_1k_v1-_SEC\\checkpoint-100",
4
+ "epoch": 1.0,
5
+ "eval_steps": 100,
6
+ "global_step": 150,
7
+ "is_hyper_param_search": false,
8
+ "is_local_process_zero": true,
9
+ "is_world_process_zero": true,
10
+ "log_history": [
11
+ {
12
+ "epoch": 0.03333333333333333,
13
+ "grad_norm": 4.733065605163574,
14
+ "learning_rate": 0.00019333333333333333,
15
+ "loss": 2.0404,
16
+ "step": 5
17
+ },
18
+ {
19
+ "epoch": 0.06666666666666667,
20
+ "grad_norm": 3.565342903137207,
21
+ "learning_rate": 0.0001866666666666667,
22
+ "loss": 1.1743,
23
+ "step": 10
24
+ },
25
+ {
26
+ "epoch": 0.1,
27
+ "grad_norm": 2.8410754203796387,
28
+ "learning_rate": 0.00018,
29
+ "loss": 0.5906,
30
+ "step": 15
31
+ },
32
+ {
33
+ "epoch": 0.13333333333333333,
34
+ "grad_norm": 3.2434799671173096,
35
+ "learning_rate": 0.00017333333333333334,
36
+ "loss": 0.4769,
37
+ "step": 20
38
+ },
39
+ {
40
+ "epoch": 0.16666666666666666,
41
+ "grad_norm": 1.4241881370544434,
42
+ "learning_rate": 0.0001666666666666667,
43
+ "loss": 0.2392,
44
+ "step": 25
45
+ },
46
+ {
47
+ "epoch": 0.2,
48
+ "grad_norm": 1.8277868032455444,
49
+ "learning_rate": 0.00016,
50
+ "loss": 0.164,
51
+ "step": 30
52
+ },
53
+ {
54
+ "epoch": 0.23333333333333334,
55
+ "grad_norm": 0.20567373931407928,
56
+ "learning_rate": 0.00015333333333333334,
57
+ "loss": 0.1013,
58
+ "step": 35
59
+ },
60
+ {
61
+ "epoch": 0.26666666666666666,
62
+ "grad_norm": 0.2059996873140335,
63
+ "learning_rate": 0.00014666666666666666,
64
+ "loss": 0.099,
65
+ "step": 40
66
+ },
67
+ {
68
+ "epoch": 0.3,
69
+ "grad_norm": 0.22543317079544067,
70
+ "learning_rate": 0.00014,
71
+ "loss": 0.0624,
72
+ "step": 45
73
+ },
74
+ {
75
+ "epoch": 0.3333333333333333,
76
+ "grad_norm": 4.443180561065674,
77
+ "learning_rate": 0.00013333333333333334,
78
+ "loss": 0.0844,
79
+ "step": 50
80
+ },
81
+ {
82
+ "epoch": 0.36666666666666664,
83
+ "grad_norm": 1.1867191791534424,
84
+ "learning_rate": 0.00012666666666666666,
85
+ "loss": 0.1286,
86
+ "step": 55
87
+ },
88
+ {
89
+ "epoch": 0.4,
90
+ "grad_norm": 3.3529281616210938,
91
+ "learning_rate": 0.00012,
92
+ "loss": 0.067,
93
+ "step": 60
94
+ },
95
+ {
96
+ "epoch": 0.43333333333333335,
97
+ "grad_norm": 3.6864206790924072,
98
+ "learning_rate": 0.00011333333333333334,
99
+ "loss": 0.077,
100
+ "step": 65
101
+ },
102
+ {
103
+ "epoch": 0.4666666666666667,
104
+ "grad_norm": 0.780798614025116,
105
+ "learning_rate": 0.00010666666666666667,
106
+ "loss": 0.0606,
107
+ "step": 70
108
+ },
109
+ {
110
+ "epoch": 0.5,
111
+ "grad_norm": 2.0455167293548584,
112
+ "learning_rate": 0.0001,
113
+ "loss": 0.0558,
114
+ "step": 75
115
+ },
116
+ {
117
+ "epoch": 0.5333333333333333,
118
+ "grad_norm": 3.241957426071167,
119
+ "learning_rate": 9.333333333333334e-05,
120
+ "loss": 0.0373,
121
+ "step": 80
122
+ },
123
+ {
124
+ "epoch": 0.5666666666666667,
125
+ "grad_norm": 0.10529457777738571,
126
+ "learning_rate": 8.666666666666667e-05,
127
+ "loss": 0.0329,
128
+ "step": 85
129
+ },
130
+ {
131
+ "epoch": 0.6,
132
+ "grad_norm": 0.10940615832805634,
133
+ "learning_rate": 8e-05,
134
+ "loss": 0.0305,
135
+ "step": 90
136
+ },
137
+ {
138
+ "epoch": 0.6333333333333333,
139
+ "grad_norm": 0.11042007803916931,
140
+ "learning_rate": 7.333333333333333e-05,
141
+ "loss": 0.0319,
142
+ "step": 95
143
+ },
144
+ {
145
+ "epoch": 0.6666666666666666,
146
+ "grad_norm": 0.10197849571704865,
147
+ "learning_rate": 6.666666666666667e-05,
148
+ "loss": 0.0293,
149
+ "step": 100
150
+ },
151
+ {
152
+ "epoch": 0.6666666666666666,
153
+ "eval_accuracy": 0.9533333333333334,
154
+ "eval_f1": 0.953396953389295,
155
+ "eval_loss": 0.1649296134710312,
156
+ "eval_precision": 0.9601344218764242,
157
+ "eval_recall": 0.9533333333333334,
158
+ "eval_runtime": 10.6006,
159
+ "eval_samples_per_second": 113.201,
160
+ "eval_steps_per_second": 14.15,
161
+ "step": 100
162
+ },
163
+ {
164
+ "epoch": 0.7,
165
+ "grad_norm": 0.0925605520606041,
166
+ "learning_rate": 6e-05,
167
+ "loss": 0.0274,
168
+ "step": 105
169
+ },
170
+ {
171
+ "epoch": 0.7333333333333333,
172
+ "grad_norm": 6.116914749145508,
173
+ "learning_rate": 5.333333333333333e-05,
174
+ "loss": 0.0291,
175
+ "step": 110
176
+ },
177
+ {
178
+ "epoch": 0.7666666666666667,
179
+ "grad_norm": 0.08884350955486298,
180
+ "learning_rate": 4.666666666666667e-05,
181
+ "loss": 0.0266,
182
+ "step": 115
183
+ },
184
+ {
185
+ "epoch": 0.8,
186
+ "grad_norm": 0.6212164163589478,
187
+ "learning_rate": 4e-05,
188
+ "loss": 0.0515,
189
+ "step": 120
190
+ },
191
+ {
192
+ "epoch": 0.8333333333333334,
193
+ "grad_norm": 0.07527727633714676,
194
+ "learning_rate": 3.3333333333333335e-05,
195
+ "loss": 0.0349,
196
+ "step": 125
197
+ },
198
+ {
199
+ "epoch": 0.8666666666666667,
200
+ "grad_norm": 0.08864862471818924,
201
+ "learning_rate": 2.6666666666666667e-05,
202
+ "loss": 0.0237,
203
+ "step": 130
204
+ },
205
+ {
206
+ "epoch": 0.9,
207
+ "grad_norm": 0.07268212735652924,
208
+ "learning_rate": 2e-05,
209
+ "loss": 0.024,
210
+ "step": 135
211
+ },
212
+ {
213
+ "epoch": 0.9333333333333333,
214
+ "grad_norm": 0.09480606764554977,
215
+ "learning_rate": 1.3333333333333333e-05,
216
+ "loss": 0.0243,
217
+ "step": 140
218
+ },
219
+ {
220
+ "epoch": 0.9666666666666667,
221
+ "grad_norm": 0.0949704721570015,
222
+ "learning_rate": 6.666666666666667e-06,
223
+ "loss": 0.0278,
224
+ "step": 145
225
+ },
226
+ {
227
+ "epoch": 1.0,
228
+ "grad_norm": 5.041667938232422,
229
+ "learning_rate": 0.0,
230
+ "loss": 0.0347,
231
+ "step": 150
232
+ },
233
+ {
234
+ "epoch": 1.0,
235
+ "step": 150,
236
+ "total_flos": 3.71974885244928e+17,
237
+ "train_loss": 0.19624810536702475,
238
+ "train_runtime": 64.1985,
239
+ "train_samples_per_second": 74.768,
240
+ "train_steps_per_second": 2.337
241
+ }
242
+ ],
243
+ "logging_steps": 5,
244
+ "max_steps": 150,
245
+ "num_input_tokens_seen": 0,
246
+ "num_train_epochs": 1,
247
+ "save_steps": 100,
248
+ "stateful_callbacks": {
249
+ "TrainerControl": {
250
+ "args": {
251
+ "should_epoch_stop": false,
252
+ "should_evaluate": false,
253
+ "should_log": false,
254
+ "should_save": true,
255
+ "should_training_stop": true
256
+ },
257
+ "attributes": {}
258
+ }
259
+ },
260
+ "total_flos": 3.71974885244928e+17,
261
+ "train_batch_size": 32,
262
+ "trial_name": null,
263
+ "trial_params": null
264
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4d3cb55d083a56d3f1e9e40f598661e65a2f027aa984446bb223f83ea5053500
3
+ size 5432