End of training
Browse files
README.md
ADDED
@@ -0,0 +1,130 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
library_name: transformers
|
3 |
+
license: apache-2.0
|
4 |
+
base_model: google/vit-base-patch16-224
|
5 |
+
tags:
|
6 |
+
- generated_from_trainer
|
7 |
+
datasets:
|
8 |
+
- medmnist-v2
|
9 |
+
metrics:
|
10 |
+
- accuracy
|
11 |
+
- f1
|
12 |
+
model-index:
|
13 |
+
- name: ViT_bloodmnist_std_30
|
14 |
+
results:
|
15 |
+
- task:
|
16 |
+
name: Image Classification
|
17 |
+
type: image-classification
|
18 |
+
dataset:
|
19 |
+
name: medmnist-v2
|
20 |
+
type: medmnist-v2
|
21 |
+
config: bloodmnist
|
22 |
+
split: validation
|
23 |
+
args: bloodmnist
|
24 |
+
metrics:
|
25 |
+
- name: Accuracy
|
26 |
+
type: accuracy
|
27 |
+
value: 0.9429991230634317
|
28 |
+
- name: F1
|
29 |
+
type: f1
|
30 |
+
value: 0.9339022055894328
|
31 |
+
---
|
32 |
+
|
33 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
34 |
+
should probably proofread and complete it, then remove this comment. -->
|
35 |
+
|
36 |
+
# ViT_bloodmnist_std_30
|
37 |
+
|
38 |
+
This model is a fine-tuned version of [google/vit-base-patch16-224](https://huggingface.co/google/vit-base-patch16-224) on the medmnist-v2 dataset.
|
39 |
+
It achieves the following results on the evaluation set:
|
40 |
+
- Loss: 0.1697
|
41 |
+
- Accuracy: 0.9430
|
42 |
+
- F1: 0.9339
|
43 |
+
|
44 |
+
## Model description
|
45 |
+
|
46 |
+
More information needed
|
47 |
+
|
48 |
+
## Intended uses & limitations
|
49 |
+
|
50 |
+
More information needed
|
51 |
+
|
52 |
+
## Training and evaluation data
|
53 |
+
|
54 |
+
More information needed
|
55 |
+
|
56 |
+
## Training procedure
|
57 |
+
|
58 |
+
### Training hyperparameters
|
59 |
+
|
60 |
+
The following hyperparameters were used during training:
|
61 |
+
- learning_rate: 5e-05
|
62 |
+
- train_batch_size: 32
|
63 |
+
- eval_batch_size: 8
|
64 |
+
- seed: 42
|
65 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
66 |
+
- lr_scheduler_type: linear
|
67 |
+
- num_epochs: 3
|
68 |
+
|
69 |
+
### Training results
|
70 |
+
|
71 |
+
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 |
|
72 |
+
|:-------------:|:------:|:-----:|:---------------:|:--------:|:------:|
|
73 |
+
| 0.5658 | 0.0595 | 200 | 1.2306 | 0.5076 | 0.4526 |
|
74 |
+
| 0.2887 | 0.1189 | 400 | 0.6368 | 0.7751 | 0.7410 |
|
75 |
+
| 0.2406 | 0.1784 | 600 | 0.6641 | 0.7827 | 0.7050 |
|
76 |
+
| 0.2229 | 0.2378 | 800 | 0.4808 | 0.8072 | 0.7832 |
|
77 |
+
| 0.1955 | 0.2973 | 1000 | 0.4868 | 0.8002 | 0.7827 |
|
78 |
+
| 0.1654 | 0.3567 | 1200 | 0.3306 | 0.8657 | 0.8466 |
|
79 |
+
| 0.1627 | 0.4162 | 1400 | 0.3754 | 0.8732 | 0.8367 |
|
80 |
+
| 0.1479 | 0.4756 | 1600 | 0.2421 | 0.9118 | 0.8949 |
|
81 |
+
| 0.1501 | 0.5351 | 1800 | 0.2125 | 0.9235 | 0.9076 |
|
82 |
+
| 0.1372 | 0.5945 | 2000 | 0.3706 | 0.8616 | 0.8337 |
|
83 |
+
| 0.1194 | 0.6540 | 2200 | 0.1552 | 0.9451 | 0.9370 |
|
84 |
+
| 0.1194 | 0.7134 | 2400 | 0.2345 | 0.9194 | 0.8992 |
|
85 |
+
| 0.1135 | 0.7729 | 2600 | 0.2121 | 0.9287 | 0.9113 |
|
86 |
+
| 0.1032 | 0.8323 | 2800 | 0.2023 | 0.9299 | 0.9152 |
|
87 |
+
| 0.1006 | 0.8918 | 3000 | 0.1784 | 0.9451 | 0.9376 |
|
88 |
+
| 0.0814 | 0.9512 | 3200 | 0.1273 | 0.9533 | 0.9484 |
|
89 |
+
| 0.0842 | 1.0107 | 3400 | 0.2012 | 0.9363 | 0.9240 |
|
90 |
+
| 0.0426 | 1.0702 | 3600 | 0.2221 | 0.9340 | 0.9280 |
|
91 |
+
| 0.06 | 1.1296 | 3800 | 0.2641 | 0.9100 | 0.9037 |
|
92 |
+
| 0.0632 | 1.1891 | 4000 | 0.1796 | 0.9433 | 0.9339 |
|
93 |
+
| 0.0506 | 1.2485 | 4200 | 0.2771 | 0.8989 | 0.8838 |
|
94 |
+
| 0.0467 | 1.3080 | 4400 | 0.1939 | 0.9393 | 0.9265 |
|
95 |
+
| 0.0469 | 1.3674 | 4600 | 0.1896 | 0.9410 | 0.9322 |
|
96 |
+
| 0.0457 | 1.4269 | 4800 | 0.1477 | 0.9509 | 0.9479 |
|
97 |
+
| 0.0416 | 1.4863 | 5000 | 0.2789 | 0.9206 | 0.9086 |
|
98 |
+
| 0.043 | 1.5458 | 5200 | 0.1832 | 0.9463 | 0.9389 |
|
99 |
+
| 0.0412 | 1.6052 | 5400 | 0.2100 | 0.9404 | 0.9337 |
|
100 |
+
| 0.0358 | 1.6647 | 5600 | 0.2368 | 0.9287 | 0.9135 |
|
101 |
+
| 0.0376 | 1.7241 | 5800 | 0.2668 | 0.9252 | 0.9096 |
|
102 |
+
| 0.0385 | 1.7836 | 6000 | 0.2145 | 0.9398 | 0.9291 |
|
103 |
+
| 0.0273 | 1.8430 | 6200 | 0.1995 | 0.9433 | 0.9302 |
|
104 |
+
| 0.0251 | 1.9025 | 6400 | 0.1900 | 0.9486 | 0.9395 |
|
105 |
+
| 0.0298 | 1.9620 | 6600 | 0.1617 | 0.9597 | 0.9526 |
|
106 |
+
| 0.02 | 2.0214 | 6800 | 0.1984 | 0.9463 | 0.9343 |
|
107 |
+
| 0.0083 | 2.0809 | 7000 | 0.1899 | 0.9498 | 0.9377 |
|
108 |
+
| 0.0068 | 2.1403 | 7200 | 0.2592 | 0.9340 | 0.9199 |
|
109 |
+
| 0.0059 | 2.1998 | 7400 | 0.2101 | 0.9428 | 0.9335 |
|
110 |
+
| 0.0066 | 2.2592 | 7600 | 0.2247 | 0.9422 | 0.9259 |
|
111 |
+
| 0.0062 | 2.3187 | 7800 | 0.2370 | 0.9439 | 0.9348 |
|
112 |
+
| 0.0084 | 2.3781 | 8000 | 0.2266 | 0.9474 | 0.9390 |
|
113 |
+
| 0.0049 | 2.4376 | 8200 | 0.2343 | 0.9480 | 0.9354 |
|
114 |
+
| 0.0075 | 2.4970 | 8400 | 0.2032 | 0.9486 | 0.9378 |
|
115 |
+
| 0.0025 | 2.5565 | 8600 | 0.1916 | 0.9515 | 0.9436 |
|
116 |
+
| 0.0064 | 2.6159 | 8800 | 0.2066 | 0.9533 | 0.9436 |
|
117 |
+
| 0.004 | 2.6754 | 9000 | 0.2404 | 0.9445 | 0.9321 |
|
118 |
+
| 0.0029 | 2.7348 | 9200 | 0.2402 | 0.9439 | 0.9322 |
|
119 |
+
| 0.0008 | 2.7943 | 9400 | 0.2256 | 0.9468 | 0.9365 |
|
120 |
+
| 0.003 | 2.8537 | 9600 | 0.2265 | 0.9492 | 0.9408 |
|
121 |
+
| 0.002 | 2.9132 | 9800 | 0.2278 | 0.9515 | 0.9419 |
|
122 |
+
| 0.0013 | 2.9727 | 10000 | 0.2175 | 0.9504 | 0.9422 |
|
123 |
+
|
124 |
+
|
125 |
+
### Framework versions
|
126 |
+
|
127 |
+
- Transformers 4.45.1
|
128 |
+
- Pytorch 2.4.0
|
129 |
+
- Datasets 3.0.1
|
130 |
+
- Tokenizers 0.20.0
|
config.json
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "google/vit-base-patch16-224",
|
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": "basophil",
|
13 |
+
"1": "eosinophil",
|
14 |
+
"2": "erythroblast",
|
15 |
+
"3": "immature granulocytes(myelocytes, metamyelocytes and promyelocytes)",
|
16 |
+
"4": "lymphocyte",
|
17 |
+
"5": "monocyte",
|
18 |
+
"6": "neutrophil",
|
19 |
+
"7": "platelet"
|
20 |
+
},
|
21 |
+
"image_size": 224,
|
22 |
+
"initializer_range": 0.02,
|
23 |
+
"intermediate_size": 3072,
|
24 |
+
"label2id": {
|
25 |
+
"basophil": "0",
|
26 |
+
"eosinophil": "1",
|
27 |
+
"erythroblast": "2",
|
28 |
+
"immature granulocytes(myelocytes, metamyelocytes and promyelocytes)": "3",
|
29 |
+
"lymphocyte": "4",
|
30 |
+
"monocyte": "5",
|
31 |
+
"neutrophil": "6",
|
32 |
+
"platelet": "7"
|
33 |
+
},
|
34 |
+
"layer_norm_eps": 1e-12,
|
35 |
+
"model_type": "vit",
|
36 |
+
"num_attention_heads": 12,
|
37 |
+
"num_channels": 3,
|
38 |
+
"num_hidden_layers": 12,
|
39 |
+
"patch_size": 16,
|
40 |
+
"problem_type": "single_label_classification",
|
41 |
+
"qkv_bias": true,
|
42 |
+
"torch_dtype": "float32",
|
43 |
+
"transformers_version": "4.45.1"
|
44 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b167f2026608e184e21fd3f0041e326ba8e303badf5b90d98ef6f41b12b60d4a
|
3 |
+
size 343242432
|
preprocessor_config.json
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"do_normalize": true,
|
3 |
+
"do_rescale": true,
|
4 |
+
"do_resize": true,
|
5 |
+
"image_mean": [
|
6 |
+
0.5,
|
7 |
+
0.5,
|
8 |
+
0.5
|
9 |
+
],
|
10 |
+
"image_processor_type": "ViTImageProcessor",
|
11 |
+
"image_std": [
|
12 |
+
0.5,
|
13 |
+
0.5,
|
14 |
+
0.5
|
15 |
+
],
|
16 |
+
"resample": 2,
|
17 |
+
"rescale_factor": 0.00392156862745098,
|
18 |
+
"size": {
|
19 |
+
"height": 224,
|
20 |
+
"width": 224
|
21 |
+
}
|
22 |
+
}
|
runs/Nov09_10-50-55_533218bcf843/events.out.tfevents.1731149458.533218bcf843.24.0
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dd47c02bcd738b7ccf07c4fac7d05eb62a51a249ee8c94b055963b33ca189518
|
3 |
+
size 34706
|
runs/Nov09_10-50-55_533218bcf843/events.out.tfevents.1731157014.533218bcf843.24.1
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dfb93174de1907ca93f0db5af2f18916f569d05f58ffa5c2a1422ad2df554785
|
3 |
+
size 457
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d22cb0898a41b936d4a5e1b1453e0f183f5371d49c28cbaa0ed336a93371f675
|
3 |
+
size 5240
|