End of training
Browse files
README.md
ADDED
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_breastmnist_std_60
|
14 |
+
results:
|
15 |
+
- task:
|
16 |
+
name: Image Classification
|
17 |
+
type: image-classification
|
18 |
+
dataset:
|
19 |
+
name: medmnist-v2
|
20 |
+
type: medmnist-v2
|
21 |
+
config: breastmnist
|
22 |
+
split: validation
|
23 |
+
args: breastmnist
|
24 |
+
metrics:
|
25 |
+
- name: Accuracy
|
26 |
+
type: accuracy
|
27 |
+
value: 0.7756410256410257
|
28 |
+
- name: F1
|
29 |
+
type: f1
|
30 |
+
value: 0.6137247966041741
|
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_breastmnist_std_60
|
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.5157
|
41 |
+
- Accuracy: 0.7756
|
42 |
+
- F1: 0.6137
|
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: 2e-05
|
62 |
+
- train_batch_size: 64
|
63 |
+
- eval_batch_size: 16
|
64 |
+
- seed: 42
|
65 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
66 |
+
- lr_scheduler_type: linear
|
67 |
+
- num_epochs: 10
|
68 |
+
|
69 |
+
### Training results
|
70 |
+
|
71 |
+
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 |
|
72 |
+
|:-------------:|:------:|:----:|:---------------:|:--------:|:------:|
|
73 |
+
| 0.5179 | 0.2597 | 20 | 0.5240 | 0.7436 | 0.5385 |
|
74 |
+
| 0.4306 | 0.5195 | 40 | 0.4807 | 0.7949 | 0.6855 |
|
75 |
+
| 0.4258 | 0.7792 | 60 | 0.4812 | 0.7949 | 0.6518 |
|
76 |
+
| 0.4613 | 1.0390 | 80 | 0.4491 | 0.8333 | 0.7247 |
|
77 |
+
| 0.4194 | 1.2987 | 100 | 0.4573 | 0.8333 | 0.7247 |
|
78 |
+
| 0.3693 | 1.5584 | 120 | 0.4665 | 0.8205 | 0.6953 |
|
79 |
+
| 0.3825 | 1.8182 | 140 | 0.4695 | 0.7821 | 0.6733 |
|
80 |
+
| 0.387 | 2.0779 | 160 | 0.4410 | 0.8205 | 0.7248 |
|
81 |
+
| 0.3341 | 2.3377 | 180 | 0.4422 | 0.8205 | 0.7367 |
|
82 |
+
| 0.3192 | 2.5974 | 200 | 0.4457 | 0.8205 | 0.7111 |
|
83 |
+
| 0.3062 | 2.8571 | 220 | 0.4575 | 0.8205 | 0.7111 |
|
84 |
+
| 0.2485 | 3.1169 | 240 | 0.4526 | 0.8333 | 0.7383 |
|
85 |
+
| 0.2415 | 3.3766 | 260 | 0.4430 | 0.8462 | 0.7641 |
|
86 |
+
| 0.2377 | 3.6364 | 280 | 0.4529 | 0.8333 | 0.7247 |
|
87 |
+
| 0.2417 | 3.8961 | 300 | 0.4386 | 0.8205 | 0.7111 |
|
88 |
+
| 0.1783 | 4.1558 | 320 | 0.4467 | 0.8333 | 0.7383 |
|
89 |
+
| 0.193 | 4.4156 | 340 | 0.4724 | 0.8077 | 0.6823 |
|
90 |
+
| 0.1736 | 4.6753 | 360 | 0.4757 | 0.8333 | 0.7383 |
|
91 |
+
| 0.1656 | 4.9351 | 380 | 0.4677 | 0.8333 | 0.7383 |
|
92 |
+
| 0.1214 | 5.1948 | 400 | 0.4747 | 0.8077 | 0.6981 |
|
93 |
+
| 0.0851 | 5.4545 | 420 | 0.4782 | 0.7949 | 0.6698 |
|
94 |
+
| 0.0893 | 5.7143 | 440 | 0.4842 | 0.8077 | 0.6823 |
|
95 |
+
| 0.0978 | 5.9740 | 460 | 0.4883 | 0.8077 | 0.6823 |
|
96 |
+
| 0.0518 | 6.2338 | 480 | 0.4861 | 0.8077 | 0.6981 |
|
97 |
+
| 0.0662 | 6.4935 | 500 | 0.5017 | 0.8077 | 0.6981 |
|
98 |
+
| 0.058 | 6.7532 | 520 | 0.5092 | 0.7949 | 0.6518 |
|
99 |
+
| 0.0511 | 7.0130 | 540 | 0.5003 | 0.8205 | 0.7111 |
|
100 |
+
| 0.0235 | 7.2727 | 560 | 0.5041 | 0.8077 | 0.6823 |
|
101 |
+
| 0.0204 | 7.5325 | 580 | 0.5140 | 0.8205 | 0.7111 |
|
102 |
+
| 0.0196 | 7.7922 | 600 | 0.5122 | 0.8205 | 0.7111 |
|
103 |
+
| 0.0108 | 8.0519 | 620 | 0.5186 | 0.8205 | 0.7111 |
|
104 |
+
| 0.012 | 8.3117 | 640 | 0.5315 | 0.8333 | 0.7247 |
|
105 |
+
| 0.0077 | 8.5714 | 660 | 0.5319 | 0.8205 | 0.7111 |
|
106 |
+
| 0.0187 | 8.8312 | 680 | 0.5279 | 0.8205 | 0.7111 |
|
107 |
+
| 0.0063 | 9.0909 | 700 | 0.5304 | 0.8205 | 0.7111 |
|
108 |
+
| 0.004 | 9.3506 | 720 | 0.5312 | 0.8205 | 0.7111 |
|
109 |
+
| 0.0044 | 9.6104 | 740 | 0.5310 | 0.8205 | 0.7111 |
|
110 |
+
| 0.0076 | 9.8701 | 760 | 0.5323 | 0.8205 | 0.7111 |
|
111 |
+
|
112 |
+
|
113 |
+
### Framework versions
|
114 |
+
|
115 |
+
- Transformers 4.45.1
|
116 |
+
- Pytorch 2.4.0
|
117 |
+
- Datasets 3.0.1
|
118 |
+
- Tokenizers 0.20.0
|
config.json
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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": "malignant",
|
13 |
+
"1": "normal, benign"
|
14 |
+
},
|
15 |
+
"image_size": 224,
|
16 |
+
"initializer_range": 0.02,
|
17 |
+
"intermediate_size": 3072,
|
18 |
+
"label2id": {
|
19 |
+
"malignant": "0",
|
20 |
+
"normal, benign": "1"
|
21 |
+
},
|
22 |
+
"layer_norm_eps": 1e-12,
|
23 |
+
"model_type": "vit",
|
24 |
+
"num_attention_heads": 12,
|
25 |
+
"num_channels": 3,
|
26 |
+
"num_hidden_layers": 12,
|
27 |
+
"patch_size": 16,
|
28 |
+
"problem_type": "single_label_classification",
|
29 |
+
"qkv_bias": true,
|
30 |
+
"torch_dtype": "float32",
|
31 |
+
"transformers_version": "4.45.1"
|
32 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f886d0302b10e58f957c8dc8f68aafc737e3562c8f6e786ac980fe3f0efd790f
|
3 |
+
size 343223968
|
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_09-46-11_98124c9a2a99/events.out.tfevents.1731145573.98124c9a2a99.30.0
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6ea1a2f084ecf6f0463e03d18fe0570a485cace03e10e54379bc8dedb517ad8f
|
3 |
+
size 35513
|
runs/Nov09_09-46-11_98124c9a2a99/events.out.tfevents.1731146691.98124c9a2a99.30.1
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0253b019b51f2afaf7adeae69f75e1891250f53435c29552e5b332594729b12a
|
3 |
+
size 457
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:47daa146222410c06d9297b9a98fbf072fe16da8c3c55e4d0fdfd02d0e599e53
|
3 |
+
size 5240
|