Ivanrs commited on
Commit
843d62e
·
verified ·
1 Parent(s): c43f84d

vit-base-kidney-stone-5-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-5-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.9283333333333333
30
+ - name: Precision
31
+ type: precision
32
+ value: 0.9298268970881306
33
+ - name: Recall
34
+ type: recall
35
+ value: 0.9283333333333333
36
+ - name: F1
37
+ type: f1
38
+ value: 0.9281531442596677
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-5-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.3821
49
+ - Accuracy: 0.9283
50
+ - Precision: 0.9298
51
+ - Recall: 0.9283
52
+ - F1: 0.9282
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.3259 | 0.3333 | 100 | 0.6052 | 0.8142 | 0.8678 | 0.8142 | 0.8113 |
85
+ | 0.1852 | 0.6667 | 200 | 0.4605 | 0.8525 | 0.8799 | 0.8525 | 0.8505 |
86
+ | 0.1342 | 1.0 | 300 | 0.5787 | 0.8583 | 0.8939 | 0.8583 | 0.8592 |
87
+ | 0.0984 | 1.3333 | 400 | 0.4582 | 0.8875 | 0.8938 | 0.8875 | 0.8863 |
88
+ | 0.0555 | 1.6667 | 500 | 0.3914 | 0.8825 | 0.8955 | 0.8825 | 0.8844 |
89
+ | 0.2228 | 2.0 | 600 | 0.5982 | 0.865 | 0.8807 | 0.865 | 0.8668 |
90
+ | 0.016 | 2.3333 | 700 | 0.5747 | 0.8708 | 0.8929 | 0.8708 | 0.8729 |
91
+ | 0.2215 | 2.6667 | 800 | 0.6513 | 0.8575 | 0.8777 | 0.8575 | 0.8564 |
92
+ | 0.0118 | 3.0 | 900 | 0.8234 | 0.8492 | 0.8687 | 0.8492 | 0.8498 |
93
+ | 0.0028 | 3.3333 | 1000 | 0.6503 | 0.88 | 0.8949 | 0.88 | 0.8804 |
94
+ | 0.0035 | 3.6667 | 1100 | 0.4011 | 0.9133 | 0.9207 | 0.9133 | 0.9145 |
95
+ | 0.0742 | 4.0 | 1200 | 0.5671 | 0.8833 | 0.9069 | 0.8833 | 0.8833 |
96
+ | 0.0074 | 4.3333 | 1300 | 0.6269 | 0.8742 | 0.8902 | 0.8742 | 0.8711 |
97
+ | 0.0043 | 4.6667 | 1400 | 0.6497 | 0.8792 | 0.8998 | 0.8792 | 0.8800 |
98
+ | 0.133 | 5.0 | 1500 | 0.7292 | 0.8733 | 0.9075 | 0.8733 | 0.8738 |
99
+ | 0.0012 | 5.3333 | 1600 | 0.7823 | 0.8633 | 0.8799 | 0.8633 | 0.8637 |
100
+ | 0.0009 | 5.6667 | 1700 | 0.4115 | 0.915 | 0.9186 | 0.915 | 0.9156 |
101
+ | 0.0011 | 6.0 | 1800 | 0.8521 | 0.85 | 0.8619 | 0.85 | 0.8493 |
102
+ | 0.001 | 6.3333 | 1900 | 0.4895 | 0.9108 | 0.9263 | 0.9108 | 0.9126 |
103
+ | 0.0219 | 6.6667 | 2000 | 0.3821 | 0.9283 | 0.9298 | 0.9283 | 0.9282 |
104
+ | 0.0008 | 7.0 | 2100 | 0.7710 | 0.8683 | 0.8868 | 0.8683 | 0.8666 |
105
+ | 0.0007 | 7.3333 | 2200 | 0.5704 | 0.9108 | 0.9179 | 0.9108 | 0.9073 |
106
+ | 0.0014 | 7.6667 | 2300 | 0.6604 | 0.8925 | 0.8981 | 0.8925 | 0.8902 |
107
+ | 0.0005 | 8.0 | 2400 | 0.5364 | 0.9075 | 0.9095 | 0.9075 | 0.9061 |
108
+ | 0.0005 | 8.3333 | 2500 | 0.5356 | 0.9075 | 0.9093 | 0.9075 | 0.9062 |
109
+ | 0.0004 | 8.6667 | 2600 | 0.5364 | 0.9067 | 0.9082 | 0.9067 | 0.9053 |
110
+ | 0.0004 | 9.0 | 2700 | 0.7982 | 0.8692 | 0.8722 | 0.8692 | 0.8636 |
111
+ | 0.0004 | 9.3333 | 2800 | 0.7586 | 0.875 | 0.8774 | 0.875 | 0.8706 |
112
+ | 0.0004 | 9.6667 | 2900 | 0.7252 | 0.8808 | 0.8837 | 0.8808 | 0.8774 |
113
+ | 0.0003 | 10.0 | 3000 | 0.6126 | 0.8992 | 0.9037 | 0.8992 | 0.8995 |
114
+ | 0.0003 | 10.3333 | 3100 | 0.6417 | 0.8917 | 0.8889 | 0.8917 | 0.8899 |
115
+ | 0.0003 | 10.6667 | 3200 | 0.6489 | 0.8925 | 0.8901 | 0.8925 | 0.8909 |
116
+ | 0.0003 | 11.0 | 3300 | 0.6508 | 0.8917 | 0.8892 | 0.8917 | 0.8900 |
117
+ | 0.0003 | 11.3333 | 3400 | 0.6529 | 0.8917 | 0.8892 | 0.8917 | 0.8900 |
118
+ | 0.0003 | 11.6667 | 3500 | 0.6544 | 0.8917 | 0.8892 | 0.8917 | 0.8900 |
119
+ | 0.0003 | 12.0 | 3600 | 0.6561 | 0.8917 | 0.8892 | 0.8917 | 0.8900 |
120
+ | 0.0003 | 12.3333 | 3700 | 0.6577 | 0.8925 | 0.8899 | 0.8925 | 0.8907 |
121
+ | 0.0002 | 12.6667 | 3800 | 0.6592 | 0.8933 | 0.8906 | 0.8933 | 0.8915 |
122
+ | 0.0002 | 13.0 | 3900 | 0.6601 | 0.8933 | 0.8906 | 0.8933 | 0.8915 |
123
+ | 0.0002 | 13.3333 | 4000 | 0.6613 | 0.8933 | 0.8906 | 0.8933 | 0.8915 |
124
+ | 0.0002 | 13.6667 | 4100 | 0.6622 | 0.8933 | 0.8906 | 0.8933 | 0.8915 |
125
+ | 0.0002 | 14.0 | 4200 | 0.6629 | 0.8933 | 0.8906 | 0.8933 | 0.8915 |
126
+ | 0.0002 | 14.3333 | 4300 | 0.6635 | 0.8933 | 0.8906 | 0.8933 | 0.8915 |
127
+ | 0.0002 | 14.6667 | 4400 | 0.6638 | 0.8933 | 0.8906 | 0.8933 | 0.8915 |
128
+ | 0.0002 | 15.0 | 4500 | 0.6640 | 0.8933 | 0.8906 | 0.8933 | 0.8915 |
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.9283333333333333,
4
+ "eval_f1": 0.9281531442596677,
5
+ "eval_loss": 0.3821205496788025,
6
+ "eval_precision": 0.9298268970881306,
7
+ "eval_recall": 0.9283333333333333,
8
+ "eval_runtime": 8.7628,
9
+ "eval_samples_per_second": 136.942,
10
+ "eval_steps_per_second": 17.118,
11
+ "total_flos": 5.57962327867392e+18,
12
+ "train_loss": 0.04276203705535995,
13
+ "train_runtime": 1145.3749,
14
+ "train_samples_per_second": 62.862,
15
+ "train_steps_per_second": 3.929
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:4575fdf621161ae0845b3ce5176c272ff56e70884c404068ced26ea6621359cf
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.9283333333333333,
4
+ "eval_f1": 0.9281531442596677,
5
+ "eval_loss": 0.3821205496788025,
6
+ "eval_precision": 0.9298268970881306,
7
+ "eval_recall": 0.9283333333333333,
8
+ "eval_runtime": 8.7628,
9
+ "eval_samples_per_second": 136.942,
10
+ "eval_steps_per_second": 17.118
11
+ }
train_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 15.0,
3
+ "total_flos": 5.57962327867392e+18,
4
+ "train_loss": 0.04276203705535995,
5
+ "train_runtime": 1145.3749,
6
+ "train_samples_per_second": 62.862,
7
+ "train_steps_per_second": 3.929
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:6c334981a40244de0f75c4b82d5c697c07563dd9751dd410067392aac8b2f540
3
+ size 5432