feisarx86 commited on
Commit
2f1e427
1 Parent(s): 1af2701

Add models

Browse files
README.md CHANGED
@@ -1,7 +1,74 @@
1
  ---
2
- library_name: keras
3
- pipeline_tag: image-classification
4
  tags:
5
- - medical
6
- - not-for-all-audiences
7
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ license: apache-2.0
3
+ base_model: google/vit-base-patch16-224-in21k
4
  tags:
5
+ - image-classification
6
+ - vision
7
+ - generated_from_trainer
8
+ datasets:
9
+ - imagefolder
10
+ metrics:
11
+ - accuracy
12
+ model-index:
13
+ - name: outputs
14
+ results:
15
+ - task:
16
+ name: Image Classification
17
+ type: image-classification
18
+ dataset:
19
+ name: imagefolder
20
+ type: imagefolder
21
+ config: default
22
+ split: train
23
+ args: default
24
+ metrics:
25
+ - name: Accuracy
26
+ type: accuracy
27
+ value: 1.0
28
+ ---
29
+
30
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
31
+ should probably proofread and complete it, then remove this comment. -->
32
+
33
+ # outputs
34
+
35
+ This model is a fine-tuned version of [google/vit-base-patch16-224-in21k](https://huggingface.co/google/vit-base-patch16-224-in21k) on the imagefolder dataset.
36
+ It achieves the following results on the evaluation set:
37
+ - Loss: 0.0596
38
+ - Accuracy: 1.0
39
+
40
+ ## Model description
41
+
42
+ More information needed
43
+
44
+ ## Intended uses & limitations
45
+
46
+ More information needed
47
+
48
+ ## Training and evaluation data
49
+
50
+ More information needed
51
+
52
+ ## Training procedure
53
+
54
+ ### Training hyperparameters
55
+
56
+ The following hyperparameters were used during training:
57
+ - learning_rate: 5e-05
58
+ - train_batch_size: 8
59
+ - eval_batch_size: 8
60
+ - seed: 42
61
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
62
+ - lr_scheduler_type: linear
63
+ - num_epochs: 3.0
64
+
65
+ ### Training results
66
+
67
+
68
+
69
+ ### Framework versions
70
+
71
+ - Transformers 4.32.0.dev0
72
+ - Pytorch 2.0.1+cu117
73
+ - Datasets 2.14.4
74
+ - Tokenizers 0.13.3
all_results.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 3.0,
3
+ "eval_accuracy": 1.0,
4
+ "eval_loss": 0.05963269993662834,
5
+ "eval_runtime": 1.6852,
6
+ "eval_samples_per_second": 162.591,
7
+ "eval_steps_per_second": 20.769,
8
+ "train_loss": 0.3140656472891057,
9
+ "train_runtime": 90.7552,
10
+ "train_samples_per_second": 51.303,
11
+ "train_steps_per_second": 6.413
12
+ }
checkpoint-500/config.json ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "finetuning_task": "image-classification",
9
+ "hidden_act": "gelu",
10
+ "hidden_dropout_prob": 0.0,
11
+ "hidden_size": 768,
12
+ "id2label": {
13
+ "0": "Foi_Thong",
14
+ "1": "Hang_Kra_Rog_Phu_Phan_ST1",
15
+ "2": "Hang_Suea_Sakonnakhon_TT1",
16
+ "3": "Kroeng_Krawia",
17
+ "4": "Tanao_Si_Kan_Khaw_WA1",
18
+ "5": "Tanao_Si_Kan_Sang_RD1"
19
+ },
20
+ "image_size": 224,
21
+ "initializer_range": 0.02,
22
+ "intermediate_size": 3072,
23
+ "label2id": {
24
+ "Foi_Thong": "0",
25
+ "Hang_Kra_Rog_Phu_Phan_ST1": "1",
26
+ "Hang_Suea_Sakonnakhon_TT1": "2",
27
+ "Kroeng_Krawia": "3",
28
+ "Tanao_Si_Kan_Khaw_WA1": "4",
29
+ "Tanao_Si_Kan_Sang_RD1": "5"
30
+ },
31
+ "layer_norm_eps": 1e-12,
32
+ "model_type": "vit",
33
+ "num_attention_heads": 12,
34
+ "num_channels": 3,
35
+ "num_hidden_layers": 12,
36
+ "patch_size": 16,
37
+ "problem_type": "single_label_classification",
38
+ "qkv_bias": true,
39
+ "torch_dtype": "float32",
40
+ "transformers_version": "4.32.0.dev0"
41
+ }
checkpoint-500/optimizer.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:72f3654e6af7f483c08dd67d48ce10da8ebd7839bc8a3b9d81674153eaec1b7c
3
+ size 686593029
checkpoint-500/preprocessor_config.json ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_normalize": true,
3
+ "do_rescale": true,
4
+ "do_resize": true,
5
+ "image_mean": [
6
+ 0.5,
7
+ 0.5,
8
+ 0.5
9
+ ],
10
+ "image_processor_type": "ViTImageProcessor",
11
+ "image_std": [
12
+ 0.5,
13
+ 0.5,
14
+ 0.5
15
+ ],
16
+ "resample": 2,
17
+ "rescale_factor": 0.00392156862745098,
18
+ "size": {
19
+ "height": 224,
20
+ "width": 224
21
+ }
22
+ }
checkpoint-500/pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1ddf69503dc4492ff8c2ac0737829c1f91d6ea6c16eb9449190bb01edb597c42
3
+ size 343281005
checkpoint-500/rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7f6931b8dc8099fb9bacdeef960d70faa4de518663359bc8435aa7ee67cf4c5c
3
+ size 14575
checkpoint-500/scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:27da3fb10c98c3a5cb0797163ccb140b215f681ceb86a19ebdf1188fd3ccb947
3
+ size 627
checkpoint-500/trainer_state.json ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": null,
3
+ "best_model_checkpoint": null,
4
+ "epoch": 2.5773195876288657,
5
+ "eval_steps": 500,
6
+ "global_step": 500,
7
+ "is_hyper_param_search": false,
8
+ "is_local_process_zero": true,
9
+ "is_world_process_zero": true,
10
+ "log_history": [
11
+ {
12
+ "epoch": 2.58,
13
+ "learning_rate": 7.0446735395189e-06,
14
+ "loss": 0.3528,
15
+ "step": 500
16
+ }
17
+ ],
18
+ "logging_steps": 500,
19
+ "max_steps": 582,
20
+ "num_train_epochs": 3,
21
+ "save_steps": 500,
22
+ "total_flos": 3.0997907103744e+17,
23
+ "trial_name": null,
24
+ "trial_params": null
25
+ }
checkpoint-500/training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f9e5ff1e2863c010b1ac4302ddaa8d909ea89a6225cbdc9ccc7a7035d9faf64f
3
+ size 4027
config.json ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "finetuning_task": "image-classification",
9
+ "hidden_act": "gelu",
10
+ "hidden_dropout_prob": 0.0,
11
+ "hidden_size": 768,
12
+ "id2label": {
13
+ "0": "Foi_Thong",
14
+ "1": "Hang_Kra_Rog_Phu_Phan_ST1",
15
+ "2": "Hang_Suea_Sakonnakhon_TT1",
16
+ "3": "Kroeng_Krawia",
17
+ "4": "Tanao_Si_Kan_Khaw_WA1",
18
+ "5": "Tanao_Si_Kan_Sang_RD1"
19
+ },
20
+ "image_size": 224,
21
+ "initializer_range": 0.02,
22
+ "intermediate_size": 3072,
23
+ "label2id": {
24
+ "Foi_Thong": "0",
25
+ "Hang_Kra_Rog_Phu_Phan_ST1": "1",
26
+ "Hang_Suea_Sakonnakhon_TT1": "2",
27
+ "Kroeng_Krawia": "3",
28
+ "Tanao_Si_Kan_Khaw_WA1": "4",
29
+ "Tanao_Si_Kan_Sang_RD1": "5"
30
+ },
31
+ "layer_norm_eps": 1e-12,
32
+ "model_type": "vit",
33
+ "num_attention_heads": 12,
34
+ "num_channels": 3,
35
+ "num_hidden_layers": 12,
36
+ "patch_size": 16,
37
+ "problem_type": "single_label_classification",
38
+ "qkv_bias": true,
39
+ "torch_dtype": "float32",
40
+ "transformers_version": "4.32.0.dev0"
41
+ }
eval_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 3.0,
3
+ "eval_accuracy": 1.0,
4
+ "eval_loss": 0.05963269993662834,
5
+ "eval_runtime": 1.6852,
6
+ "eval_samples_per_second": 162.591,
7
+ "eval_steps_per_second": 20.769
8
+ }
preprocessor_config.json ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_normalize": true,
3
+ "do_rescale": true,
4
+ "do_resize": true,
5
+ "image_mean": [
6
+ 0.5,
7
+ 0.5,
8
+ 0.5
9
+ ],
10
+ "image_processor_type": "ViTImageProcessor",
11
+ "image_std": [
12
+ 0.5,
13
+ 0.5,
14
+ 0.5
15
+ ],
16
+ "resample": 2,
17
+ "rescale_factor": 0.00392156862745098,
18
+ "size": {
19
+ "height": 224,
20
+ "width": 224
21
+ }
22
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:25b61b8857371e420457d7aa7fa95858f9c625af452d8c491e78b0adab3556ca
3
+ size 343281005
train_results.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 3.0,
3
+ "train_loss": 0.3140656472891057,
4
+ "train_runtime": 90.7552,
5
+ "train_samples_per_second": 51.303,
6
+ "train_steps_per_second": 6.413
7
+ }
trainer_state.json ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": null,
3
+ "best_model_checkpoint": null,
4
+ "epoch": 3.0,
5
+ "eval_steps": 500,
6
+ "global_step": 582,
7
+ "is_hyper_param_search": false,
8
+ "is_local_process_zero": true,
9
+ "is_world_process_zero": true,
10
+ "log_history": [
11
+ {
12
+ "epoch": 2.58,
13
+ "learning_rate": 7.0446735395189e-06,
14
+ "loss": 0.3528,
15
+ "step": 500
16
+ },
17
+ {
18
+ "epoch": 3.0,
19
+ "step": 582,
20
+ "total_flos": 3.6081563868758016e+17,
21
+ "train_loss": 0.3140656472891057,
22
+ "train_runtime": 90.7552,
23
+ "train_samples_per_second": 51.303,
24
+ "train_steps_per_second": 6.413
25
+ }
26
+ ],
27
+ "logging_steps": 500,
28
+ "max_steps": 582,
29
+ "num_train_epochs": 3,
30
+ "save_steps": 500,
31
+ "total_flos": 3.6081563868758016e+17,
32
+ "trial_name": null,
33
+ "trial_params": null
34
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f9e5ff1e2863c010b1ac4302ddaa8d909ea89a6225cbdc9ccc7a7035d9faf64f
3
+ size 4027