Upload TFViTForImageClassification
Browse files- README.md +64 -0
- config.json +34 -0
- tf_model.h5 +3 -0
README.md
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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: glacoma_andOther_model1
|
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 |
+
# glacoma_andOther_model1
|
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.0575
|
20 |
+
- Train Accuracy: 0.9403
|
21 |
+
- Train Top-3-accuracy: 0.9984
|
22 |
+
- Validation Loss: 0.2329
|
23 |
+
- Validation Accuracy: 0.9442
|
24 |
+
- Validation Top-3-accuracy: 0.9985
|
25 |
+
- Epoch: 5
|
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': 3e-05, 'decay_steps': 1266, '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.01}
|
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 |
+
| 0.5871 | 0.7237 | 0.9808 | 0.3574 | 0.8358 | 0.9916 | 0 |
|
52 |
+
| 0.2606 | 0.8643 | 0.9942 | 0.2785 | 0.8821 | 0.9958 | 1 |
|
53 |
+
| 0.1643 | 0.8966 | 0.9966 | 0.2490 | 0.9077 | 0.9971 | 2 |
|
54 |
+
| 0.1114 | 0.9168 | 0.9975 | 0.2644 | 0.9239 | 0.9978 | 3 |
|
55 |
+
| 0.0797 | 0.9301 | 0.9980 | 0.2345 | 0.9353 | 0.9982 | 4 |
|
56 |
+
| 0.0575 | 0.9403 | 0.9984 | 0.2329 | 0.9442 | 0.9985 | 5 |
|
57 |
+
|
58 |
+
|
59 |
+
### Framework versions
|
60 |
+
|
61 |
+
- Transformers 4.44.2
|
62 |
+
- TensorFlow 2.15.0
|
63 |
+
- Datasets 2.21.0
|
64 |
+
- Tokenizers 0.19.1
|
config.json
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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": "cataract",
|
13 |
+
"1": "diabetic_retinopathy",
|
14 |
+
"2": "glaucoma",
|
15 |
+
"3": "normal"
|
16 |
+
},
|
17 |
+
"image_size": 224,
|
18 |
+
"initializer_range": 0.02,
|
19 |
+
"intermediate_size": 3072,
|
20 |
+
"label2id": {
|
21 |
+
"cataract": "0",
|
22 |
+
"diabetic_retinopathy": "1",
|
23 |
+
"glaucoma": "2",
|
24 |
+
"normal": "3"
|
25 |
+
},
|
26 |
+
"layer_norm_eps": 1e-12,
|
27 |
+
"model_type": "vit",
|
28 |
+
"num_attention_heads": 12,
|
29 |
+
"num_channels": 3,
|
30 |
+
"num_hidden_layers": 12,
|
31 |
+
"patch_size": 16,
|
32 |
+
"qkv_bias": true,
|
33 |
+
"transformers_version": "4.44.2"
|
34 |
+
}
|
tf_model.h5
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9c1bb323c226fba91cc26c0bb48465efb2024c528fc55b461a40d9947b31b963
|
3 |
+
size 343475896
|