mostafasmart commited on
Commit
b8e2272
·
verified ·
1 Parent(s): 824317d

Upload TFViTForImageClassification

Browse files
Files changed (3) hide show
  1. README.md +62 -0
  2. config.json +38 -0
  3. tf_model.h5 +3 -0
README.md ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: mostafasmart/vit-base-patch16-224-EyesNewfourclassTryAfterYolo
4
+ tags:
5
+ - generated_from_keras_callback
6
+ model-index:
7
+ - name: EyesNewSixClassTry-unKnown
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
+ # EyesNewSixClassTry-unKnown
15
+
16
+ This model is a fine-tuned version of [mostafasmart/vit-base-patch16-224-EyesNewfourclassTryAfterYolo](https://huggingface.co/mostafasmart/vit-base-patch16-224-EyesNewfourclassTryAfterYolo) on an unknown dataset.
17
+ It achieves the following results on the evaluation set:
18
+ - Train Loss: 0.0081
19
+ - Train Accuracy: 0.9894
20
+ - Train Top-3-accuracy: 1.0
21
+ - Validation Loss: 0.0504
22
+ - Validation Accuracy: 0.9894
23
+ - Validation Top-3-accuracy: 1.0
24
+ - Epoch: 4
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': 695, '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.3433 | 0.9788 | 0.9802 | 0.1170 | 0.9788 | 1.0 | 0 |
51
+ | 0.0531 | 0.9859 | 0.9995 | 0.0759 | 0.9859 | 1.0 | 1 |
52
+ | 0.0204 | 0.9859 | 1.0 | 0.0525 | 0.9859 | 1.0 | 2 |
53
+ | 0.0119 | 0.9894 | 1.0 | 0.0510 | 0.9894 | 1.0 | 3 |
54
+ | 0.0081 | 0.9894 | 1.0 | 0.0504 | 0.9894 | 1.0 | 4 |
55
+
56
+
57
+ ### Framework versions
58
+
59
+ - Transformers 4.42.4
60
+ - TensorFlow 2.17.0
61
+ - Datasets 2.20.0
62
+ - Tokenizers 0.19.1
config.json ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "mostafasmart/vit-base-patch16-224-EyesNewfourclassTryAfterYolo",
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
+ "5": "unKnown"
18
+ },
19
+ "image_size": 224,
20
+ "initializer_range": 0.02,
21
+ "intermediate_size": 3072,
22
+ "label2id": {
23
+ "cataract": "0",
24
+ "conjunctivitis": "1",
25
+ "normal": "2",
26
+ "pterygium": "3",
27
+ "stye": "4",
28
+ "unKnown": "5"
29
+ },
30
+ "layer_norm_eps": 1e-12,
31
+ "model_type": "vit",
32
+ "num_attention_heads": 12,
33
+ "num_channels": 3,
34
+ "num_hidden_layers": 12,
35
+ "patch_size": 16,
36
+ "qkv_bias": true,
37
+ "transformers_version": "4.42.4"
38
+ }
tf_model.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4dea6a0a01849865259b206b635cf77bc35fbaa62f1f644c1978d3b035377fa9
3
+ size 343482040