Akshay0706
commited on
Commit
·
0826093
1
Parent(s):
a339e93
End of training
Browse files- README.md +99 -0
- all_results.json +9 -0
- config.json +40 -0
- model.safetensors +3 -0
- preprocessor_config.json +22 -0
- train_results.json +9 -0
- training_args.bin +3 -0
README.md
ADDED
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
base_model: google/vit-base-patch16-224-in21k
|
4 |
+
tags:
|
5 |
+
- generated_from_trainer
|
6 |
+
datasets:
|
7 |
+
- imagefolder
|
8 |
+
metrics:
|
9 |
+
- accuracy
|
10 |
+
- f1
|
11 |
+
model-index:
|
12 |
+
- name: Rice-Plant-20-Epochs-Model
|
13 |
+
results:
|
14 |
+
- task:
|
15 |
+
name: Image Classification
|
16 |
+
type: image-classification
|
17 |
+
dataset:
|
18 |
+
name: imagefolder
|
19 |
+
type: imagefolder
|
20 |
+
config: default
|
21 |
+
split: train
|
22 |
+
args: default
|
23 |
+
metrics:
|
24 |
+
- name: Accuracy
|
25 |
+
type: accuracy
|
26 |
+
value: 0.9719626168224299
|
27 |
+
- name: F1
|
28 |
+
type: f1
|
29 |
+
value: 0.9719154614454629
|
30 |
+
---
|
31 |
+
|
32 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
33 |
+
should probably proofread and complete it, then remove this comment. -->
|
34 |
+
|
35 |
+
# Rice-Plant-20-Epochs-Model
|
36 |
+
|
37 |
+
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.
|
38 |
+
It achieves the following results on the evaluation set:
|
39 |
+
- Loss: 0.1306
|
40 |
+
- Accuracy: 0.9720
|
41 |
+
- F1: 0.9719
|
42 |
+
|
43 |
+
## Model description
|
44 |
+
|
45 |
+
More information needed
|
46 |
+
|
47 |
+
## Intended uses & limitations
|
48 |
+
|
49 |
+
More information needed
|
50 |
+
|
51 |
+
## Training and evaluation data
|
52 |
+
|
53 |
+
More information needed
|
54 |
+
|
55 |
+
## Training procedure
|
56 |
+
|
57 |
+
### Training hyperparameters
|
58 |
+
|
59 |
+
The following hyperparameters were used during training:
|
60 |
+
- learning_rate: 2e-05
|
61 |
+
- train_batch_size: 16
|
62 |
+
- eval_batch_size: 16
|
63 |
+
- seed: 42
|
64 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
65 |
+
- lr_scheduler_type: linear
|
66 |
+
- num_epochs: 20
|
67 |
+
|
68 |
+
### Training results
|
69 |
+
|
70 |
+
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 |
|
71 |
+
|:-------------:|:-----:|:----:|:---------------:|:--------:|:------:|
|
72 |
+
| 1.0906 | 1.0 | 116 | 0.6826 | 0.8660 | 0.8676 |
|
73 |
+
| 0.3792 | 2.0 | 232 | 0.3327 | 0.9470 | 0.9474 |
|
74 |
+
| 0.1934 | 3.0 | 348 | 0.2876 | 0.9283 | 0.9285 |
|
75 |
+
| 0.1157 | 4.0 | 464 | 0.2187 | 0.9470 | 0.9470 |
|
76 |
+
| 0.0849 | 5.0 | 580 | 0.1614 | 0.9688 | 0.9689 |
|
77 |
+
| 0.0675 | 6.0 | 696 | 0.1326 | 0.9688 | 0.9688 |
|
78 |
+
| 0.0561 | 7.0 | 812 | 0.1227 | 0.9688 | 0.9688 |
|
79 |
+
| 0.0485 | 8.0 | 928 | 0.1306 | 0.9720 | 0.9719 |
|
80 |
+
| 0.0416 | 9.0 | 1044 | 0.1356 | 0.9720 | 0.9719 |
|
81 |
+
| 0.0369 | 10.0 | 1160 | 0.1184 | 0.9688 | 0.9688 |
|
82 |
+
| 0.0335 | 11.0 | 1276 | 0.1281 | 0.9720 | 0.9720 |
|
83 |
+
| 0.0308 | 12.0 | 1392 | 0.1129 | 0.9720 | 0.9719 |
|
84 |
+
| 0.0285 | 13.0 | 1508 | 0.1074 | 0.9720 | 0.9719 |
|
85 |
+
| 0.0267 | 14.0 | 1624 | 0.1061 | 0.9720 | 0.9719 |
|
86 |
+
| 0.0253 | 15.0 | 1740 | 0.1049 | 0.9720 | 0.9719 |
|
87 |
+
| 0.0241 | 16.0 | 1856 | 0.1048 | 0.9720 | 0.9719 |
|
88 |
+
| 0.0232 | 17.0 | 1972 | 0.1045 | 0.9720 | 0.9719 |
|
89 |
+
| 0.0225 | 18.0 | 2088 | 0.1036 | 0.9720 | 0.9719 |
|
90 |
+
| 0.0221 | 19.0 | 2204 | 0.1035 | 0.9720 | 0.9719 |
|
91 |
+
| 0.0219 | 20.0 | 2320 | 0.1036 | 0.9720 | 0.9719 |
|
92 |
+
|
93 |
+
|
94 |
+
### Framework versions
|
95 |
+
|
96 |
+
- Transformers 4.35.0
|
97 |
+
- Pytorch 2.1.0+cu118
|
98 |
+
- Datasets 2.14.6
|
99 |
+
- Tokenizers 0.14.1
|
all_results.json
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 20.0,
|
3 |
+
"total_flos": 2.861106825675571e+18,
|
4 |
+
"train_loss": 0.11864709494442775,
|
5 |
+
"train_runtime": 3416.3962,
|
6 |
+
"train_samples": 1846,
|
7 |
+
"train_samples_per_second": 10.807,
|
8 |
+
"train_steps_per_second": 0.679
|
9 |
+
}
|
config.json
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
"hidden_act": "gelu",
|
9 |
+
"hidden_dropout_prob": 0.0,
|
10 |
+
"hidden_size": 768,
|
11 |
+
"id2label": {
|
12 |
+
"0": 0,
|
13 |
+
"1": 1,
|
14 |
+
"2": 2,
|
15 |
+
"3": 3,
|
16 |
+
"4": 4,
|
17 |
+
"5": 5
|
18 |
+
},
|
19 |
+
"image_size": 224,
|
20 |
+
"initializer_range": 0.02,
|
21 |
+
"intermediate_size": 3072,
|
22 |
+
"label2id": {
|
23 |
+
"0": 0,
|
24 |
+
"1": 1,
|
25 |
+
"2": 2,
|
26 |
+
"3": 3,
|
27 |
+
"4": 4,
|
28 |
+
"5": 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 |
+
"problem_type": "single_label_classification",
|
37 |
+
"qkv_bias": true,
|
38 |
+
"torch_dtype": "float32",
|
39 |
+
"transformers_version": "4.35.0"
|
40 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8216f82a102db62670f57135ca2b77d0dcd1867fb25b9539cf1f1b8241808f87
|
3 |
+
size 343236280
|
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 |
+
}
|
train_results.json
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 20.0,
|
3 |
+
"total_flos": 2.861106825675571e+18,
|
4 |
+
"train_loss": 0.11864709494442775,
|
5 |
+
"train_runtime": 3416.3962,
|
6 |
+
"train_samples": 1846,
|
7 |
+
"train_samples_per_second": 10.807,
|
8 |
+
"train_steps_per_second": 0.679
|
9 |
+
}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c49d6a1f4eb77052d99ca64aa6a91d078a5d20ed69adf3b2a1ab9bfa2a50b3a9
|
3 |
+
size 4536
|