TaLong commited on
Commit
20dcedd
1 Parent(s): ce4b837

End of training

Browse files
README.md ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
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.9701841566793336
28
+ - name: F1
29
+ type: f1
30
+ value: 0.9693863873037792
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
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.0876
41
+ - Accuracy: 0.9702
42
+ - F1: 0.9694
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: 10
68
+
69
+ ### Training results
70
+
71
+ | Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 |
72
+ |:-------------:|:-----:|:----:|:---------------:|:--------:|:------:|
73
+ | 0.2696 | 1.0 | 374 | 0.1176 | 0.9609 | 0.9573 |
74
+ | 0.0905 | 2.0 | 748 | 0.0769 | 0.9743 | 0.9718 |
75
+ | 0.043 | 3.0 | 1122 | 0.1077 | 0.9667 | 0.9680 |
76
+ | 0.0247 | 4.0 | 1496 | 0.0915 | 0.9737 | 0.9728 |
77
+ | 0.0069 | 5.0 | 1870 | 0.1082 | 0.9749 | 0.9748 |
78
+ | 0.0023 | 6.0 | 2244 | 0.1226 | 0.9749 | 0.9747 |
79
+ | 0.0004 | 7.0 | 2618 | 0.1067 | 0.9796 | 0.9786 |
80
+ | 0.0001 | 8.0 | 2992 | 0.1107 | 0.9772 | 0.9765 |
81
+ | 0.0001 | 9.0 | 3366 | 0.1105 | 0.9772 | 0.9765 |
82
+ | 0.0001 | 10.0 | 3740 | 0.1104 | 0.9772 | 0.9765 |
83
+
84
+
85
+ ### Framework versions
86
+
87
+ - Transformers 4.45.1
88
+ - Pytorch 2.4.0
89
+ - Datasets 3.0.1
90
+ - 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:a701186bddbf42b10a9f17eace97b47256885c53f4b90ba70fe140adc451b6ff
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/Oct19_09-15-08_4c9d9e813c2f/events.out.tfevents.1729329311.4c9d9e813c2f.23.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:058c48b7cb04fd0b8aab8d524340e6803136151f35f4c287ad638c72a39864cd
3
+ size 11489
runs/Oct19_09-15-08_4c9d9e813c2f/events.out.tfevents.1729331968.4c9d9e813c2f.23.1 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f1c26b7a08eda26d8623e68699a8a253d92fc39572e8bf95cfa9331f19016b62
3
+ size 457
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6c954ec4aaebc89444fc23ce4a29d52112e73223bdd26a0af9a4092d2908be40
3
+ size 5176