Ivanrs commited on
Commit
2171339
·
verified ·
1 Parent(s): 2e97323

vit-base-kidney-stone-4-Michel_Daudon_-w256_1k_v1-_SEC

Browse files
README.md ADDED
@@ -0,0 +1,136 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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-base-kidney-stone-4-Michel_Daudon_-w256_1k_v1-_SEC
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: test
25
+ args: default
26
+ metrics:
27
+ - name: Accuracy
28
+ type: accuracy
29
+ value: 0.9241666666666667
30
+ - name: Precision
31
+ type: precision
32
+ value: 0.9296490647145426
33
+ - name: Recall
34
+ type: recall
35
+ value: 0.9241666666666667
36
+ - name: F1
37
+ type: f1
38
+ value: 0.9247640186674816
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-base-kidney-stone-4-Michel_Daudon_-w256_1k_v1-_SEC
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.2879
49
+ - Accuracy: 0.9242
50
+ - Precision: 0.9296
51
+ - Recall: 0.9242
52
+ - F1: 0.9248
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: 0.0002
72
+ - train_batch_size: 16
73
+ - eval_batch_size: 8
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: linear
77
+ - num_epochs: 15
78
+ - mixed_precision_training: Native AMP
79
+
80
+ ### Training results
81
+
82
+ | Training Loss | Epoch | Step | Validation Loss | Accuracy | Precision | Recall | F1 |
83
+ |:-------------:|:-------:|:----:|:---------------:|:--------:|:---------:|:------:|:------:|
84
+ | 0.2837 | 0.3333 | 100 | 0.5470 | 0.8333 | 0.8693 | 0.8333 | 0.8325 |
85
+ | 0.1498 | 0.6667 | 200 | 0.4199 | 0.8658 | 0.8833 | 0.8658 | 0.8647 |
86
+ | 0.0979 | 1.0 | 300 | 0.4712 | 0.8783 | 0.9015 | 0.8783 | 0.8799 |
87
+ | 0.009 | 1.3333 | 400 | 0.4957 | 0.885 | 0.8933 | 0.885 | 0.8819 |
88
+ | 0.0226 | 1.6667 | 500 | 0.2879 | 0.9242 | 0.9296 | 0.9242 | 0.9248 |
89
+ | 0.0722 | 2.0 | 600 | 0.4449 | 0.8875 | 0.8906 | 0.8875 | 0.8869 |
90
+ | 0.0043 | 2.3333 | 700 | 0.3699 | 0.9125 | 0.9221 | 0.9125 | 0.9104 |
91
+ | 0.0678 | 2.6667 | 800 | 0.6081 | 0.8792 | 0.8872 | 0.8792 | 0.8760 |
92
+ | 0.1178 | 3.0 | 900 | 0.5728 | 0.8767 | 0.8748 | 0.8767 | 0.8744 |
93
+ | 0.0297 | 3.3333 | 1000 | 0.3977 | 0.9258 | 0.9267 | 0.9258 | 0.9257 |
94
+ | 0.0813 | 3.6667 | 1100 | 1.1116 | 0.8283 | 0.8462 | 0.8283 | 0.8153 |
95
+ | 0.0336 | 4.0 | 1200 | 0.9246 | 0.82 | 0.8215 | 0.82 | 0.8155 |
96
+ | 0.0291 | 4.3333 | 1300 | 0.6674 | 0.8808 | 0.8980 | 0.8808 | 0.8819 |
97
+ | 0.1018 | 4.6667 | 1400 | 0.7256 | 0.8667 | 0.8760 | 0.8667 | 0.8641 |
98
+ | 0.0739 | 5.0 | 1500 | 0.4149 | 0.8908 | 0.9082 | 0.8908 | 0.8913 |
99
+ | 0.0017 | 5.3333 | 1600 | 0.3553 | 0.9208 | 0.9291 | 0.9208 | 0.9219 |
100
+ | 0.0011 | 5.6667 | 1700 | 0.3934 | 0.915 | 0.9188 | 0.915 | 0.9157 |
101
+ | 0.0056 | 6.0 | 1800 | 0.8180 | 0.8725 | 0.9139 | 0.8725 | 0.8733 |
102
+ | 0.001 | 6.3333 | 1900 | 0.3790 | 0.9225 | 0.9216 | 0.9225 | 0.9217 |
103
+ | 0.0055 | 6.6667 | 2000 | 0.6404 | 0.88 | 0.8910 | 0.88 | 0.8765 |
104
+ | 0.0007 | 7.0 | 2100 | 0.5133 | 0.9017 | 0.9073 | 0.9017 | 0.9023 |
105
+ | 0.0009 | 7.3333 | 2200 | 0.4628 | 0.92 | 0.9296 | 0.92 | 0.9189 |
106
+ | 0.0007 | 7.6667 | 2300 | 0.8405 | 0.8617 | 0.8744 | 0.8617 | 0.8581 |
107
+ | 0.1144 | 8.0 | 2400 | 1.0096 | 0.8592 | 0.8954 | 0.8592 | 0.8567 |
108
+ | 0.0007 | 8.3333 | 2500 | 0.6318 | 0.8983 | 0.9113 | 0.8983 | 0.8977 |
109
+ | 0.0005 | 8.6667 | 2600 | 0.4929 | 0.9075 | 0.9135 | 0.9075 | 0.9076 |
110
+ | 0.0013 | 9.0 | 2700 | 0.6148 | 0.8883 | 0.8955 | 0.8883 | 0.8866 |
111
+ | 0.001 | 9.3333 | 2800 | 1.0043 | 0.8392 | 0.8538 | 0.8392 | 0.8355 |
112
+ | 0.0004 | 9.6667 | 2900 | 0.9713 | 0.8425 | 0.8556 | 0.8425 | 0.8390 |
113
+ | 0.0004 | 10.0 | 3000 | 0.9737 | 0.865 | 0.8977 | 0.865 | 0.8634 |
114
+ | 0.0004 | 10.3333 | 3100 | 0.8766 | 0.8683 | 0.8835 | 0.8683 | 0.8673 |
115
+ | 0.0004 | 10.6667 | 3200 | 0.8620 | 0.8683 | 0.8808 | 0.8683 | 0.8672 |
116
+ | 0.0003 | 11.0 | 3300 | 0.8669 | 0.8675 | 0.8803 | 0.8675 | 0.8665 |
117
+ | 0.0003 | 11.3333 | 3400 | 0.8712 | 0.8667 | 0.8789 | 0.8667 | 0.8656 |
118
+ | 0.0003 | 11.6667 | 3500 | 0.8732 | 0.8675 | 0.8797 | 0.8675 | 0.8665 |
119
+ | 0.0003 | 12.0 | 3600 | 0.8754 | 0.8658 | 0.8782 | 0.8658 | 0.8648 |
120
+ | 0.0003 | 12.3333 | 3700 | 0.8775 | 0.8658 | 0.8782 | 0.8658 | 0.8648 |
121
+ | 0.0003 | 12.6667 | 3800 | 0.8797 | 0.865 | 0.8772 | 0.865 | 0.8640 |
122
+ | 0.0003 | 13.0 | 3900 | 0.8816 | 0.865 | 0.8772 | 0.865 | 0.8640 |
123
+ | 0.0003 | 13.3333 | 4000 | 0.8835 | 0.865 | 0.8772 | 0.865 | 0.8640 |
124
+ | 0.0003 | 13.6667 | 4100 | 0.8844 | 0.865 | 0.8769 | 0.865 | 0.8639 |
125
+ | 0.0003 | 14.0 | 4200 | 0.8852 | 0.8658 | 0.8775 | 0.8658 | 0.8648 |
126
+ | 0.0002 | 14.3333 | 4300 | 0.8859 | 0.8667 | 0.8780 | 0.8667 | 0.8655 |
127
+ | 0.0002 | 14.6667 | 4400 | 0.8865 | 0.8675 | 0.8786 | 0.8675 | 0.8664 |
128
+ | 0.0002 | 15.0 | 4500 | 0.8868 | 0.8675 | 0.8786 | 0.8675 | 0.8664 |
129
+
130
+
131
+ ### Framework versions
132
+
133
+ - Transformers 4.48.2
134
+ - Pytorch 2.6.0+cu126
135
+ - Datasets 3.1.0
136
+ - Tokenizers 0.21.0
all_results.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 15.0,
3
+ "eval_accuracy": 0.9241666666666667,
4
+ "eval_f1": 0.9247640186674816,
5
+ "eval_loss": 0.287933349609375,
6
+ "eval_precision": 0.9296490647145426,
7
+ "eval_recall": 0.9241666666666667,
8
+ "eval_runtime": 9.6386,
9
+ "eval_samples_per_second": 124.499,
10
+ "eval_steps_per_second": 15.562,
11
+ "total_flos": 5.57962327867392e+18,
12
+ "train_loss": 0.042441848201884166,
13
+ "train_runtime": 1173.35,
14
+ "train_samples_per_second": 61.363,
15
+ "train_steps_per_second": 3.835
16
+ }
config.json ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": "SEC-Subtype_IVa",
13
+ "1": "SEC-Subtype_IVa2",
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_IVa": "0",
24
+ "SEC-Subtype_IVa2": "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:2f42e15369e9eb805ebe840e2ce1c5c3888f2755cda6711929fec33575c0e3f0
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": 15.0,
3
+ "eval_accuracy": 0.9241666666666667,
4
+ "eval_f1": 0.9247640186674816,
5
+ "eval_loss": 0.287933349609375,
6
+ "eval_precision": 0.9296490647145426,
7
+ "eval_recall": 0.9241666666666667,
8
+ "eval_runtime": 9.6386,
9
+ "eval_samples_per_second": 124.499,
10
+ "eval_steps_per_second": 15.562
11
+ }
train_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 15.0,
3
+ "total_flos": 5.57962327867392e+18,
4
+ "train_loss": 0.042441848201884166,
5
+ "train_runtime": 1173.35,
6
+ "train_samples_per_second": 61.363,
7
+ "train_steps_per_second": 3.835
8
+ }
trainer_state.json ADDED
The diff for this file is too large to render. See raw diff
 
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:50c7a14f25c6bd8435b76ecbfb50b62c02e13fc401f0b92a77d4504b9572968f
3
+ size 5432