RobertoMDLP commited on
Commit
68af918
·
verified ·
1 Parent(s): f520a7f

Model save

Browse files
README.md ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ license: apache-2.0
4
+ base_model: google/vit-base-patch16-224-in21k
5
+ tags:
6
+ - generated_from_trainer
7
+ datasets:
8
+ - imagefolder
9
+ metrics:
10
+ - accuracy
11
+ - f1
12
+ - precision
13
+ - recall
14
+ model-index:
15
+ - name: vit-tom-jerry-model
16
+ results:
17
+ - task:
18
+ name: Image Classification
19
+ type: image-classification
20
+ dataset:
21
+ name: imagefolder
22
+ type: imagefolder
23
+ config: default
24
+ split: validation
25
+ args: default
26
+ metrics:
27
+ - name: Accuracy
28
+ type: accuracy
29
+ value: 0.9810526315789474
30
+ - name: F1
31
+ type: f1
32
+ value: 0.9802102573360923
33
+ - name: Precision
34
+ type: precision
35
+ value: 0.9766839378238341
36
+ - name: Recall
37
+ type: recall
38
+ value: 0.9845360824742269
39
+ ---
40
+
41
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
42
+ should probably proofread and complete it, then remove this comment. -->
43
+
44
+ # vit-tom-jerry-model
45
+
46
+ 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.
47
+ It achieves the following results on the evaluation set:
48
+ - Loss: 0.0855
49
+ - Accuracy: 0.9811
50
+ - F1: 0.9802
51
+ - Precision: 0.9767
52
+ - Recall: 0.9845
53
+
54
+ ## Model description
55
+
56
+ More information needed
57
+
58
+ ## Intended uses & limitations
59
+
60
+ More information needed
61
+
62
+ ## Training and evaluation data
63
+
64
+ More information needed
65
+
66
+ ## Training procedure
67
+
68
+ ### Training hyperparameters
69
+
70
+ The following hyperparameters were used during training:
71
+ - learning_rate: 0.0002
72
+ - train_batch_size: 8
73
+ - eval_batch_size: 8
74
+ - seed: 42
75
+ - optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
76
+ - lr_scheduler_type: linear
77
+ - num_epochs: 5
78
+ - mixed_precision_training: Native AMP
79
+
80
+ ### Training results
81
+
82
+ | Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 | Precision | Recall |
83
+ |:-------------:|:------:|:----:|:---------------:|:--------:|:------:|:---------:|:------:|
84
+ | 0.0808 | 0.3597 | 100 | 0.1168 | 0.9705 | 0.9694 | 0.9646 | 0.9759 |
85
+ | 0.212 | 0.7194 | 200 | 0.1209 | 0.9705 | 0.9691 | 0.9667 | 0.9719 |
86
+ | 0.0008 | 1.0791 | 300 | 0.0403 | 0.9916 | 0.9911 | 0.9911 | 0.9911 |
87
+ | 0.0041 | 1.4388 | 400 | 0.0464 | 0.9895 | 0.9889 | 0.9884 | 0.9894 |
88
+ | 0.0004 | 1.7986 | 500 | 0.1313 | 0.9684 | 0.9671 | 0.9627 | 0.9732 |
89
+ | 0.0005 | 2.1583 | 600 | 0.0855 | 0.9811 | 0.9802 | 0.9767 | 0.9845 |
90
+
91
+
92
+ ### Framework versions
93
+
94
+ - Transformers 4.55.0
95
+ - Pytorch 2.6.0+cu124
96
+ - Datasets 4.0.0
97
+ - Tokenizers 0.21.4
config.json ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "ViTForImageClassification"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.0,
6
+ "encoder_stride": 16,
7
+ "hidden_act": "gelu",
8
+ "hidden_dropout_prob": 0.0,
9
+ "hidden_size": 768,
10
+ "id2label": {
11
+ "0": "jerry",
12
+ "1": "tom"
13
+ },
14
+ "image_size": 224,
15
+ "initializer_range": 0.02,
16
+ "intermediate_size": 3072,
17
+ "label2id": {
18
+ "jerry": "0",
19
+ "tom": "1"
20
+ },
21
+ "layer_norm_eps": 1e-12,
22
+ "model_type": "vit",
23
+ "num_attention_heads": 12,
24
+ "num_channels": 3,
25
+ "num_hidden_layers": 12,
26
+ "patch_size": 16,
27
+ "pooler_act": "tanh",
28
+ "pooler_output_size": 768,
29
+ "problem_type": "single_label_classification",
30
+ "qkv_bias": true,
31
+ "torch_dtype": "float32",
32
+ "transformers_version": "4.55.0"
33
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f5cfbd24857b62f289b9793f02ad9a203c08a6c7cb627025407671e222c1c5ab
3
+ size 343223968
preprocessor_config.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_convert_rgb": null,
3
+ "do_normalize": true,
4
+ "do_rescale": true,
5
+ "do_resize": true,
6
+ "image_mean": [
7
+ 0.5,
8
+ 0.5,
9
+ 0.5
10
+ ],
11
+ "image_processor_type": "ViTImageProcessor",
12
+ "image_std": [
13
+ 0.5,
14
+ 0.5,
15
+ 0.5
16
+ ],
17
+ "resample": 2,
18
+ "rescale_factor": 0.00392156862745098,
19
+ "size": {
20
+ "height": 224,
21
+ "width": 224
22
+ }
23
+ }
runs/Aug14_21-07-55_d6feb5af6e29/events.out.tfevents.1755205692.d6feb5af6e29.604.6 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6abcbd2213e5dbecbdc0c2bd7e8b064609fc60387c0f7165a11a1f28ca0a33f3
3
+ size 20831
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ece7b5e45c5f1304839da8ad84e23521afdb2028db7740438eec9ac19c65031c
3
+ size 5368