mohdadeeb commited on
Commit
6682976
1 Parent(s): 85231b1

Upload TFViTForImageClassification

Browse files
Files changed (3) hide show
  1. README.md +59 -0
  2. config.json +36 -0
  3. tf_model.h5 +3 -0
README.md ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: google/vit-base-patch16-224
4
+ tags:
5
+ - generated_from_keras_callback
6
+ model-index:
7
+ - name: DR-ViT
8
+ results: []
9
+ ---
10
+
11
+ <!-- This model card has been generated automatically according to the information Keras had access to. You should
12
+ probably proofread and complete it, then remove this comment. -->
13
+
14
+ # DR-ViT
15
+
16
+ This model is a fine-tuned version of [google/vit-base-patch16-224](https://huggingface.co/google/vit-base-patch16-224) on an unknown dataset.
17
+ It achieves the following results on the evaluation set:
18
+ - Train Loss: 0.7068
19
+ - Train Accuracy: 0.7214
20
+ - Train Top-3-accuracy: 0.9677
21
+ - Validation Loss: 0.6596
22
+ - Validation Accuracy: 0.7345
23
+ - Validation Top-3-accuracy: 0.9782
24
+ - Epoch: 1
25
+
26
+ ## Model description
27
+
28
+ More information needed
29
+
30
+ ## Intended uses & limitations
31
+
32
+ More information needed
33
+
34
+ ## Training and evaluation data
35
+
36
+ More information needed
37
+
38
+ ## Training procedure
39
+
40
+ ### Training hyperparameters
41
+
42
+ The following hyperparameters were used during training:
43
+ - optimizer: {'name': 'AdamWeightDecay', 'learning_rate': {'module': 'keras.optimizers.schedules', 'class_name': 'PolynomialDecay', 'config': {'initial_learning_rate': 3e-05, 'decay_steps': 4400, '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}
44
+ - training_precision: mixed_float16
45
+
46
+ ### Training results
47
+
48
+ | Train Loss | Train Accuracy | Train Top-3-accuracy | Validation Loss | Validation Accuracy | Validation Top-3-accuracy | Epoch |
49
+ |:----------:|:--------------:|:--------------------:|:---------------:|:-------------------:|:-------------------------:|:-----:|
50
+ | 0.8883 | 0.6645 | 0.9255 | 0.7075 | 0.7200 | 0.9655 | 0 |
51
+ | 0.7068 | 0.7214 | 0.9677 | 0.6596 | 0.7345 | 0.9782 | 1 |
52
+
53
+
54
+ ### Framework versions
55
+
56
+ - Transformers 4.35.2
57
+ - TensorFlow 2.15.0
58
+ - Datasets 2.16.1
59
+ - Tokenizers 0.15.0
config.json ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": "Proliferate DR",
13
+ "1": "Healthy",
14
+ "2": "Mild DR",
15
+ "3": "Severe DR",
16
+ "4": "Moderate DR"
17
+ },
18
+ "image_size": 224,
19
+ "initializer_range": 0.02,
20
+ "intermediate_size": 3072,
21
+ "label2id": {
22
+ "Healthy": "1",
23
+ "Mild DR": "2",
24
+ "Moderate DR": "4",
25
+ "Proliferate DR": "0",
26
+ "Severe DR": "3"
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.35.2"
36
+ }
tf_model.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3afa4a35eb012d530451931cd357aa50f6e4279f5be2a6282857e205de393787
3
+ size 343478968