Upload TFViTForImageClassification
Browse files- README.md +88 -0
- config.json +36 -0
- tf_model.h5 +3 -0
README.md
ADDED
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
library_name: transformers
|
3 |
+
license: apache-2.0
|
4 |
+
base_model: google/vit-base-patch16-224-in21k
|
5 |
+
tags:
|
6 |
+
- generated_from_keras_callback
|
7 |
+
model-index:
|
8 |
+
- name: eyesCare_firstTryEntrnal_mix_model-1
|
9 |
+
results: []
|
10 |
+
---
|
11 |
+
|
12 |
+
<!-- This model card has been generated automatically according to the information Keras had access to. You should
|
13 |
+
probably proofread and complete it, then remove this comment. -->
|
14 |
+
|
15 |
+
# eyesCare_firstTryEntrnal_mix_model-1
|
16 |
+
|
17 |
+
This model is a fine-tuned version of [google/vit-base-patch16-224-in21k](https://huggingface.co/google/vit-base-patch16-224-in21k) on an unknown dataset.
|
18 |
+
It achieves the following results on the evaluation set:
|
19 |
+
- Train Loss: 0.0066
|
20 |
+
- Train Accuracy: 0.8616
|
21 |
+
- Train Top-3-accuracy: 0.9785
|
22 |
+
- Validation Loss: 1.9942
|
23 |
+
- Validation Accuracy: 0.8627
|
24 |
+
- Validation Top-3-accuracy: 0.9787
|
25 |
+
- Epoch: 29
|
26 |
+
|
27 |
+
## Model description
|
28 |
+
|
29 |
+
More information needed
|
30 |
+
|
31 |
+
## Intended uses & limitations
|
32 |
+
|
33 |
+
More information needed
|
34 |
+
|
35 |
+
## Training and evaluation data
|
36 |
+
|
37 |
+
More information needed
|
38 |
+
|
39 |
+
## Training procedure
|
40 |
+
|
41 |
+
### Training hyperparameters
|
42 |
+
|
43 |
+
The following hyperparameters were used during training:
|
44 |
+
- optimizer: {'name': 'AdamWeightDecay', 'learning_rate': {'module': 'keras.optimizers.schedules', 'class_name': 'PolynomialDecay', 'config': {'initial_learning_rate': 4e-05, 'decay_steps': 4950, 'end_learning_rate': 0.0, 'power': 1.0, 'cycle': False, 'name': None}, 'registered_name': None}, 'decay': 0.0, 'beta_1': 0.9, 'beta_2': 0.999, 'epsilon': 1e-08, 'amsgrad': False, 'weight_decay_rate': 0.001}
|
45 |
+
- training_precision: float32
|
46 |
+
|
47 |
+
### Training results
|
48 |
+
|
49 |
+
| Train Loss | Train Accuracy | Train Top-3-accuracy | Validation Loss | Validation Accuracy | Validation Top-3-accuracy | Epoch |
|
50 |
+
|:----------:|:--------------:|:--------------------:|:---------------:|:-------------------:|:-------------------------:|:-----:|
|
51 |
+
| 1.3981 | 0.3217 | 0.7428 | 1.1812 | 0.4135 | 0.8283 | 0 |
|
52 |
+
| 1.1137 | 0.4540 | 0.8600 | 1.0974 | 0.4763 | 0.8802 | 1 |
|
53 |
+
| 0.9296 | 0.5034 | 0.8955 | 1.0739 | 0.5231 | 0.9065 | 2 |
|
54 |
+
| 0.7444 | 0.5473 | 0.9155 | 1.1126 | 0.5663 | 0.9225 | 3 |
|
55 |
+
| 0.5534 | 0.5880 | 0.9285 | 1.1673 | 0.6076 | 0.9342 | 4 |
|
56 |
+
| 0.4105 | 0.6261 | 0.9387 | 1.1547 | 0.6422 | 0.9428 | 5 |
|
57 |
+
| 0.2830 | 0.6586 | 0.9462 | 1.3119 | 0.6729 | 0.9493 | 6 |
|
58 |
+
| 0.1984 | 0.6874 | 0.9519 | 1.3821 | 0.6990 | 0.9540 | 7 |
|
59 |
+
| 0.1224 | 0.7104 | 0.9559 | 1.4778 | 0.7213 | 0.9576 | 8 |
|
60 |
+
| 0.1021 | 0.7313 | 0.9591 | 1.5426 | 0.7400 | 0.9603 | 9 |
|
61 |
+
| 0.1017 | 0.7478 | 0.9615 | 1.6387 | 0.7545 | 0.9625 | 10 |
|
62 |
+
| 0.0646 | 0.7613 | 0.9635 | 1.6226 | 0.7678 | 0.9644 | 11 |
|
63 |
+
| 0.0500 | 0.7738 | 0.9654 | 1.6646 | 0.7793 | 0.9662 | 12 |
|
64 |
+
| 0.0571 | 0.7843 | 0.9669 | 1.7492 | 0.7890 | 0.9675 | 13 |
|
65 |
+
| 0.0248 | 0.7935 | 0.9682 | 1.6984 | 0.7978 | 0.9689 | 14 |
|
66 |
+
| 0.0185 | 0.8020 | 0.9695 | 1.7302 | 0.8059 | 0.9701 | 15 |
|
67 |
+
| 0.0145 | 0.8096 | 0.9707 | 1.7669 | 0.8129 | 0.9712 | 16 |
|
68 |
+
| 0.0129 | 0.8163 | 0.9718 | 1.7972 | 0.8193 | 0.9722 | 17 |
|
69 |
+
| 0.0116 | 0.8223 | 0.9727 | 1.8276 | 0.8251 | 0.9732 | 18 |
|
70 |
+
| 0.0106 | 0.8277 | 0.9736 | 1.8544 | 0.8302 | 0.9739 | 19 |
|
71 |
+
| 0.0098 | 0.8326 | 0.9743 | 1.8792 | 0.8348 | 0.9746 | 20 |
|
72 |
+
| 0.0091 | 0.8370 | 0.9749 | 1.9012 | 0.8391 | 0.9752 | 21 |
|
73 |
+
| 0.0085 | 0.8411 | 0.9755 | 1.9212 | 0.8430 | 0.9758 | 22 |
|
74 |
+
| 0.0080 | 0.8448 | 0.9761 | 1.9391 | 0.8465 | 0.9763 | 23 |
|
75 |
+
| 0.0076 | 0.8482 | 0.9766 | 1.9547 | 0.8498 | 0.9768 | 24 |
|
76 |
+
| 0.0073 | 0.8513 | 0.9770 | 1.9682 | 0.8527 | 0.9772 | 25 |
|
77 |
+
| 0.0070 | 0.8542 | 0.9774 | 1.9789 | 0.8555 | 0.9777 | 26 |
|
78 |
+
| 0.0068 | 0.8568 | 0.9778 | 1.9871 | 0.8580 | 0.9780 | 27 |
|
79 |
+
| 0.0067 | 0.8593 | 0.9782 | 1.9924 | 0.8605 | 0.9784 | 28 |
|
80 |
+
| 0.0066 | 0.8616 | 0.9785 | 1.9942 | 0.8627 | 0.9787 | 29 |
|
81 |
+
|
82 |
+
|
83 |
+
### Framework versions
|
84 |
+
|
85 |
+
- Transformers 4.44.2
|
86 |
+
- TensorFlow 2.15.0
|
87 |
+
- Datasets 2.21.0
|
88 |
+
- Tokenizers 0.19.1
|
config.json
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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": "Mild",
|
13 |
+
"1": "Moderate",
|
14 |
+
"2": "No_DR",
|
15 |
+
"3": "Proliferative_DR",
|
16 |
+
"4": "Severe"
|
17 |
+
},
|
18 |
+
"image_size": 224,
|
19 |
+
"initializer_range": 0.02,
|
20 |
+
"intermediate_size": 3072,
|
21 |
+
"label2id": {
|
22 |
+
"Mild": "0",
|
23 |
+
"Moderate": "1",
|
24 |
+
"No_DR": "2",
|
25 |
+
"Proliferative_DR": "3",
|
26 |
+
"Severe": "4"
|
27 |
+
},
|
28 |
+
"layer_norm_eps": 1e-12,
|
29 |
+
"model_type": "vit",
|
30 |
+
"num_attention_heads": 12,
|
31 |
+
"num_channels": 3,
|
32 |
+
"num_hidden_layers": 12,
|
33 |
+
"patch_size": 16,
|
34 |
+
"qkv_bias": true,
|
35 |
+
"transformers_version": "4.44.2"
|
36 |
+
}
|
tf_model.h5
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:aea5347f52f4fe59913d662f53ac4edb11399e64299df0ccb0a00c795077794b
|
3 |
+
size 343478968
|