alyzbane commited on
Commit
c66cc97
·
verified ·
1 Parent(s): 465317a

End of training

Browse files
README.md ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ license: apache-2.0
4
+ base_model: google/vit-base-patch16-224
5
+ tags:
6
+ - generated_from_trainer
7
+ metrics:
8
+ - precision
9
+ - recall
10
+ - f1
11
+ - accuracy
12
+ model-index:
13
+ - name: 2025-01-21-16-13-04-vit-base-patch16-224
14
+ results: []
15
+ ---
16
+
17
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
18
+ should probably proofread and complete it, then remove this comment. -->
19
+
20
+ # 2025-01-21-16-13-04-vit-base-patch16-224
21
+
22
+ 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.
23
+ It achieves the following results on the evaluation set:
24
+ - Loss: 0.0188
25
+ - Precision: 0.9929
26
+ - Recall: 0.9926
27
+ - F1: 0.9926
28
+ - Accuracy: 0.9931
29
+ - Top1 Accuracy: 0.9926
30
+ - Error Rate: 0.0069
31
+
32
+ ## Model description
33
+
34
+ More information needed
35
+
36
+ ## Intended uses & limitations
37
+
38
+ More information needed
39
+
40
+ ## Training and evaluation data
41
+
42
+ More information needed
43
+
44
+ ## Training procedure
45
+
46
+ ### Training hyperparameters
47
+
48
+ The following hyperparameters were used during training:
49
+ - learning_rate: 0.0002
50
+ - train_batch_size: 32
51
+ - eval_batch_size: 32
52
+ - seed: 3407
53
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
54
+ - lr_scheduler_type: linear
55
+ - lr_scheduler_warmup_ratio: 0.1
56
+ - num_epochs: 10
57
+
58
+ ### Training results
59
+
60
+ | Training Loss | Epoch | Step | Validation Loss | Precision | Recall | F1 | Accuracy | Top1 Accuracy | Error Rate |
61
+ |:-------------:|:-----:|:----:|:---------------:|:---------:|:------:|:------:|:--------:|:-------------:|:----------:|
62
+ | 0.7465 | 1.0 | 34 | 0.1092 | 0.9536 | 0.9407 | 0.9400 | 0.9366 | 0.9407 | 0.0634 |
63
+ | 0.212 | 2.0 | 68 | 0.2754 | 0.9338 | 0.9111 | 0.9061 | 0.9049 | 0.9111 | 0.0951 |
64
+ | 0.115 | 3.0 | 102 | 0.0534 | 0.9854 | 0.9852 | 0.9852 | 0.9851 | 0.9852 | 0.0149 |
65
+ | 0.0723 | 4.0 | 136 | 0.0188 | 0.9929 | 0.9926 | 0.9926 | 0.9931 | 0.9926 | 0.0069 |
66
+ | 0.0716 | 5.0 | 170 | 0.0195 | 0.9928 | 0.9926 | 0.9926 | 0.992 | 0.9926 | 0.0080 |
67
+ | 0.0161 | 6.0 | 204 | 0.0389 | 0.9791 | 0.9778 | 0.9778 | 0.9775 | 0.9778 | 0.0225 |
68
+
69
+
70
+ ### Framework versions
71
+
72
+ - Transformers 4.45.2
73
+ - Pytorch 2.5.1+cu121
74
+ - Datasets 3.2.0
75
+ - Tokenizers 0.20.3
all_results.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 6.0,
3
+ "eval_accuracy": 0.993103448275862,
4
+ "eval_error_rate": 0.006896551724137945,
5
+ "eval_f1": 0.992600236975882,
6
+ "eval_loss": 0.01880481094121933,
7
+ "eval_precision": 0.9928774928774929,
8
+ "eval_recall": 0.9925925925925926,
9
+ "eval_runtime": 3.5639,
10
+ "eval_samples_per_second": 37.88,
11
+ "eval_steps_per_second": 1.403,
12
+ "eval_top1_accuracy": 0.9925925925925926,
13
+ "test_accuracy": 0.9933333333333334,
14
+ "test_error_rate": 0.006666666666666599,
15
+ "test_f1": 0.9925905344077058,
16
+ "test_loss": 0.02411273680627346,
17
+ "test_precision": 0.992831541218638,
18
+ "test_recall": 0.9925925925925926,
19
+ "test_runtime": 3.4349,
20
+ "test_samples_per_second": 39.302,
21
+ "test_steps_per_second": 1.456,
22
+ "test_top1_accuracy": 0.9925925925925926,
23
+ "total_flos": 5.0216159448612864e+17,
24
+ "train_loss": 0.2055974360190186,
25
+ "train_runtime": 303.9865,
26
+ "train_samples_per_second": 35.528,
27
+ "train_steps_per_second": 1.118
28
+ }
classification_report.csv ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ ,precision,recall,f1-score,support
2
+ Ilang-ilang,1.0,1.0,1.0,26.0
3
+ Mango,1.0,0.9666666666666667,0.9830508474576272,30.0
4
+ Narra,0.967741935483871,1.0,0.9836065573770492,30.0
5
+ Royal Palm,1.0,1.0,1.0,24.0
6
+ Tabebuia,1.0,1.0,1.0,25.0
7
+ accuracy,0.9925925925925926,0.9925925925925926,0.9925925925925926,0.9925925925925926
8
+ macro avg,0.9935483870967742,0.9933333333333334,0.9933314809669354,135.0
9
+ weighted avg,0.992831541218638,0.9925925925925926,0.9925905344077058,135.0
classification_report.png ADDED
config.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": "Ilang-ilang",
13
+ "1": "Mango",
14
+ "2": "Narra",
15
+ "3": "Royal Palm",
16
+ "4": "Tabebuia"
17
+ },
18
+ "image_size": 224,
19
+ "initializer_range": 0.02,
20
+ "intermediate_size": 3072,
21
+ "label2id": {
22
+ "Ilang-ilang": 0,
23
+ "Mango": 1,
24
+ "Narra": 2,
25
+ "Royal Palm": 3,
26
+ "Tabebuia": 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
+ "torch_dtype": "float32",
36
+ "transformers_version": "4.45.2"
37
+ }
eval_results.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 6.0,
3
+ "eval_accuracy": 0.993103448275862,
4
+ "eval_error_rate": 0.006896551724137945,
5
+ "eval_f1": 0.992600236975882,
6
+ "eval_loss": 0.01880481094121933,
7
+ "eval_precision": 0.9928774928774929,
8
+ "eval_recall": 0.9925925925925926,
9
+ "eval_runtime": 3.5639,
10
+ "eval_samples_per_second": 37.88,
11
+ "eval_steps_per_second": 1.403,
12
+ "eval_top1_accuracy": 0.9925925925925926
13
+ }
evaluation/classification_report.csv ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ ,precision,recall,f1-score,support
2
+ Ilang-ilang,1.0,1.0,1.0,26.0
3
+ Mango,1.0,0.9666666666666667,0.9830508474576272,30.0
4
+ Narra,0.967741935483871,1.0,0.9836065573770492,30.0
5
+ Royal Palm,1.0,1.0,1.0,24.0
6
+ Tabebuia,1.0,1.0,1.0,25.0
7
+ accuracy,0.9925925925925926,0.9925925925925926,0.9925925925925926,0.9925925925925926
8
+ macro avg,0.9935483870967742,0.9933333333333334,0.9933314809669354,135.0
9
+ weighted avg,0.992831541218638,0.9925925925925926,0.9925905344077058,135.0
evaluation/clf_bar.png ADDED
evaluation/confusion_matrix.csv ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ ,Ilang-ilang,Mango,Narra,Royal Palm,Tabebuia
2
+ Ilang-ilang,26,0,0,0,0
3
+ Mango,0,29,1,0,0
4
+ Narra,0,0,30,0,0
5
+ Royal Palm,0,0,0,24,0
6
+ Tabebuia,0,0,0,0,25
evaluation/confusion_matrix.png ADDED
evaluation/results.log ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-01-21 16:30:50,524 - INFO - plot_confusion_matrix - Confusion Matrix:
2
+ [[26 0 0 0 0]
3
+ [ 0 29 1 0 0]
4
+ [ 0 0 30 0 0]
5
+ [ 0 0 0 24 0]
6
+ [ 0 0 0 0 25]]
7
+ 2025-01-21 16:30:51,295 - INFO - plot_confusion_matrix - Confusion matrix saved to 2025-01-21-16-13-04-vit-base-patch16-224/evaluation/confusion_matrix.png
8
+ 2025-01-21 16:30:51,301 - INFO - plot_confusion_matrix - Confusion matrix report saved to 2025-01-21-16-13-04-vit-base-patch16-224/evaluation/confusion_matrix.csv
9
+ 2025-01-21 16:30:51,549 - INFO - classification_report_bar - Classification report saved to 2025-01-21-16-13-04-vit-base-patch16-224/evaluation/classification_report.csv
10
+ 2025-01-21 16:30:52,723 - INFO - classification_report_bar - Classification report bar chart saved to 2025-01-21-16-13-04-vit-base-patch16-224/evaluation/clf_bar.png
11
+ 2025-01-21 16:30:52,725 - INFO - classification_report_bar - Overall Accuracy: 0.993
12
+ 2025-01-21 16:30:53,985 - INFO - plot_classification_report_heatmap - Classification report heatmap saved to 2025-01-21-16-13-04-vit-base-patch16-224/classification_report.png
13
+ 2025-01-21 16:30:54,262 - INFO - plot_classification_report_heatmap - Classification report saved to 2025-01-21-16-13-04-vit-base-patch16-224/classification_report.csv
14
+ 2025-01-21 16:30:55,612 - INFO - plot_results - Training metrics saved to 2025-01-21-16-13-04-vit-base-patch16-224/training_metrics.csv
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bde6ecd4f010fa385a9908eb33e58a179c8060fdd0fe778604ea3da56e030246
3
+ size 343233204
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
+ }
test_results.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "test_accuracy": 0.9933333333333334,
3
+ "test_error_rate": 0.006666666666666599,
4
+ "test_f1": 0.9925905344077058,
5
+ "test_loss": 0.02411273680627346,
6
+ "test_precision": 0.992831541218638,
7
+ "test_recall": 0.9925925925925926,
8
+ "test_runtime": 3.4349,
9
+ "test_samples_per_second": 39.302,
10
+ "test_steps_per_second": 1.456,
11
+ "test_top1_accuracy": 0.9925925925925926
12
+ }
train_and_eval.png ADDED
train_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 6.0,
3
+ "total_flos": 5.0216159448612864e+17,
4
+ "train_loss": 0.2055974360190186,
5
+ "train_runtime": 303.9865,
6
+ "train_samples_per_second": 35.528,
7
+ "train_steps_per_second": 1.118
8
+ }
trainer_state.json ADDED
@@ -0,0 +1,201 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": 0.01880481094121933,
3
+ "best_model_checkpoint": "2025-01-21-16-13-04-vit-base-patch16-224/checkpoint-136",
4
+ "epoch": 6.0,
5
+ "eval_steps": 500,
6
+ "global_step": 204,
7
+ "is_hyper_param_search": false,
8
+ "is_local_process_zero": true,
9
+ "is_world_process_zero": true,
10
+ "log_history": [
11
+ {
12
+ "epoch": 1.0,
13
+ "train_accuracy": 0.7324074074074074
14
+ },
15
+ {
16
+ "epoch": 1.0,
17
+ "grad_norm": 3.5079495906829834,
18
+ "learning_rate": 0.0002,
19
+ "loss": 0.7465,
20
+ "step": 34
21
+ },
22
+ {
23
+ "epoch": 1.0,
24
+ "eval_accuracy": 0.9365925925925925,
25
+ "eval_error_rate": 0.06340740740740747,
26
+ "eval_f1": 0.9400418302275843,
27
+ "eval_loss": 0.10922861099243164,
28
+ "eval_precision": 0.9535535535535536,
29
+ "eval_recall": 0.9407407407407408,
30
+ "eval_runtime": 3.1454,
31
+ "eval_samples_per_second": 42.919,
32
+ "eval_steps_per_second": 1.59,
33
+ "eval_top1_accuracy": 0.9407407407407408,
34
+ "step": 34
35
+ },
36
+ {
37
+ "epoch": 2.0,
38
+ "train_accuracy": 0.9325102880658436
39
+ },
40
+ {
41
+ "epoch": 2.0,
42
+ "grad_norm": 7.9865288734436035,
43
+ "learning_rate": 0.00017777777777777779,
44
+ "loss": 0.212,
45
+ "step": 68
46
+ },
47
+ {
48
+ "epoch": 2.0,
49
+ "eval_accuracy": 0.9048571428571428,
50
+ "eval_error_rate": 0.0951428571428572,
51
+ "eval_f1": 0.9061150336512657,
52
+ "eval_loss": 0.2753830850124359,
53
+ "eval_precision": 0.9337830687830687,
54
+ "eval_recall": 0.9111111111111111,
55
+ "eval_runtime": 3.3128,
56
+ "eval_samples_per_second": 40.752,
57
+ "eval_steps_per_second": 1.509,
58
+ "eval_top1_accuracy": 0.9111111111111111,
59
+ "step": 68
60
+ },
61
+ {
62
+ "epoch": 3.0,
63
+ "train_accuracy": 0.9547325102880658
64
+ },
65
+ {
66
+ "epoch": 3.0,
67
+ "grad_norm": 5.545481204986572,
68
+ "learning_rate": 0.00015555555555555556,
69
+ "loss": 0.115,
70
+ "step": 102
71
+ },
72
+ {
73
+ "epoch": 3.0,
74
+ "eval_accuracy": 0.985103448275862,
75
+ "eval_error_rate": 0.014896551724137952,
76
+ "eval_f1": 0.9851769394626537,
77
+ "eval_loss": 0.05338314175605774,
78
+ "eval_precision": 0.9854497354497354,
79
+ "eval_recall": 0.9851851851851852,
80
+ "eval_runtime": 3.7379,
81
+ "eval_samples_per_second": 36.117,
82
+ "eval_steps_per_second": 1.338,
83
+ "eval_top1_accuracy": 0.9851851851851852,
84
+ "step": 102
85
+ },
86
+ {
87
+ "epoch": 4.0,
88
+ "train_accuracy": 0.9794238683127572
89
+ },
90
+ {
91
+ "epoch": 4.0,
92
+ "grad_norm": 0.0631272941827774,
93
+ "learning_rate": 0.00013333333333333334,
94
+ "loss": 0.0723,
95
+ "step": 136
96
+ },
97
+ {
98
+ "epoch": 4.0,
99
+ "eval_accuracy": 0.993103448275862,
100
+ "eval_error_rate": 0.006896551724137945,
101
+ "eval_f1": 0.992600236975882,
102
+ "eval_loss": 0.01880481094121933,
103
+ "eval_precision": 0.9928774928774929,
104
+ "eval_recall": 0.9925925925925926,
105
+ "eval_runtime": 3.324,
106
+ "eval_samples_per_second": 40.614,
107
+ "eval_steps_per_second": 1.504,
108
+ "eval_top1_accuracy": 0.9925925925925926,
109
+ "step": 136
110
+ },
111
+ {
112
+ "epoch": 5.0,
113
+ "train_accuracy": 0.9769547325102881
114
+ },
115
+ {
116
+ "epoch": 5.0,
117
+ "grad_norm": 2.755014657974243,
118
+ "learning_rate": 0.00011111111111111112,
119
+ "loss": 0.0716,
120
+ "step": 170
121
+ },
122
+ {
123
+ "epoch": 5.0,
124
+ "eval_accuracy": 0.992,
125
+ "eval_error_rate": 0.008000000000000007,
126
+ "eval_f1": 0.9925797814417668,
127
+ "eval_loss": 0.019506702199578285,
128
+ "eval_precision": 0.9928395061728394,
129
+ "eval_recall": 0.9925925925925926,
130
+ "eval_runtime": 3.2893,
131
+ "eval_samples_per_second": 41.043,
132
+ "eval_steps_per_second": 1.52,
133
+ "eval_top1_accuracy": 0.9925925925925926,
134
+ "step": 170
135
+ },
136
+ {
137
+ "epoch": 6.0,
138
+ "train_accuracy": 0.9934156378600824
139
+ },
140
+ {
141
+ "epoch": 6.0,
142
+ "grad_norm": 0.016526084393262863,
143
+ "learning_rate": 8.888888888888889e-05,
144
+ "loss": 0.0161,
145
+ "step": 204
146
+ },
147
+ {
148
+ "epoch": 6.0,
149
+ "eval_accuracy": 0.9774928774928775,
150
+ "eval_error_rate": 0.0225071225071225,
151
+ "eval_f1": 0.9777679307755747,
152
+ "eval_loss": 0.038870733231306076,
153
+ "eval_precision": 0.979122085048011,
154
+ "eval_recall": 0.9777777777777777,
155
+ "eval_runtime": 3.6761,
156
+ "eval_samples_per_second": 36.724,
157
+ "eval_steps_per_second": 1.36,
158
+ "eval_top1_accuracy": 0.9777777777777777,
159
+ "step": 204
160
+ },
161
+ {
162
+ "epoch": 6.0,
163
+ "step": 204,
164
+ "total_flos": 5.0216159448612864e+17,
165
+ "train_loss": 0.2055974360190186,
166
+ "train_runtime": 303.9865,
167
+ "train_samples_per_second": 35.528,
168
+ "train_steps_per_second": 1.118
169
+ }
170
+ ],
171
+ "logging_steps": 1,
172
+ "max_steps": 340,
173
+ "num_input_tokens_seen": 0,
174
+ "num_train_epochs": 10,
175
+ "save_steps": 500,
176
+ "stateful_callbacks": {
177
+ "EarlyStoppingCallback": {
178
+ "args": {
179
+ "early_stopping_patience": 2,
180
+ "early_stopping_threshold": 0.0
181
+ },
182
+ "attributes": {
183
+ "early_stopping_patience_counter": 2
184
+ }
185
+ },
186
+ "TrainerControl": {
187
+ "args": {
188
+ "should_epoch_stop": false,
189
+ "should_evaluate": false,
190
+ "should_log": false,
191
+ "should_save": true,
192
+ "should_training_stop": true
193
+ },
194
+ "attributes": {}
195
+ }
196
+ },
197
+ "total_flos": 5.0216159448612864e+17,
198
+ "train_batch_size": 32,
199
+ "trial_name": null,
200
+ "trial_params": null
201
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0128ddd46646ceb0e846500d094231136c9428d22b1098b0c6840a62d4abd11a
3
+ size 5176
training_metrics.csv ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ Epoch,Train Loss,Eval Loss,Train Accuracy,Eval Accuracy
2
+ 1,0.7465,0.10922861099243164,0.7324074074074074,0.9365925925925925
3
+ 2,0.212,0.2753830850124359,0.9325102880658436,0.9048571428571428
4
+ 3,0.115,0.05338314175605774,0.9547325102880658,0.985103448275862
5
+ 4,0.0723,0.01880481094121933,0.9794238683127572,0.993103448275862
6
+ 5,0.0716,0.019506702199578285,0.9769547325102881,0.992
7
+ 6,0.0161,0.038870733231306076,0.9934156378600824,0.9774928774928775