mostafasmart commited on
Commit
4360306
·
verified ·
1 Parent(s): 571acb5

Upload TFViTForImageClassification

Browse files
Files changed (3) hide show
  1. README.md +67 -0
  2. config.json +36 -0
  3. tf_model.h5 +3 -0
README.md ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: EyesNewFiveclassTryAfterYolo-agument
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
+ # EyesNewFiveclassTryAfterYolo-agument
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.0039
19
+ - Train Accuracy: 0.9688
20
+ - Train Top-3-accuracy: 1.0
21
+ - Validation Loss: 0.0779
22
+ - Validation Accuracy: 0.9688
23
+ - Validation Top-3-accuracy: 0.9961
24
+ - Epoch: 9
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': 1270, '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: float32
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.5486 | 0.9492 | 0.9674 | 0.1847 | 0.9492 | 1.0 | 0 |
51
+ | 0.1032 | 0.9492 | 0.9980 | 0.1171 | 0.9492 | 0.9961 | 1 |
52
+ | 0.0359 | 0.9688 | 1.0 | 0.1081 | 0.9688 | 0.9961 | 2 |
53
+ | 0.0179 | 0.9688 | 1.0 | 0.0958 | 0.9688 | 0.9961 | 3 |
54
+ | 0.0121 | 0.9688 | 1.0 | 0.0749 | 0.9688 | 0.9961 | 4 |
55
+ | 0.0074 | 0.9688 | 1.0 | 0.0765 | 0.9688 | 0.9961 | 5 |
56
+ | 0.0066 | 0.9688 | 1.0 | 0.0812 | 0.9688 | 0.9961 | 6 |
57
+ | 0.0054 | 0.9688 | 1.0 | 0.0823 | 0.9688 | 0.9961 | 7 |
58
+ | 0.0046 | 0.9688 | 1.0 | 0.0777 | 0.9688 | 0.9961 | 8 |
59
+ | 0.0039 | 0.9688 | 1.0 | 0.0779 | 0.9688 | 0.9961 | 9 |
60
+
61
+
62
+ ### Framework versions
63
+
64
+ - Transformers 4.42.4
65
+ - TensorFlow 2.17.0
66
+ - Datasets 2.20.0
67
+ - Tokenizers 0.19.1
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": "cataract",
13
+ "1": "conjunctivitis",
14
+ "2": "normal",
15
+ "3": "pterygium",
16
+ "4": "stye"
17
+ },
18
+ "image_size": 224,
19
+ "initializer_range": 0.02,
20
+ "intermediate_size": 3072,
21
+ "label2id": {
22
+ "cataract": "0",
23
+ "conjunctivitis": "1",
24
+ "normal": "2",
25
+ "pterygium": "3",
26
+ "stye": "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.42.4"
36
+ }
tf_model.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a36414e642e45bcdcce93ada88a2c5c2ec1f0d996b9ddfce1d7d7566c1b12cc7
3
+ size 343478968