juniorjukeko
commited on
Commit
•
cc16033
1
Parent(s):
de857b3
End of training
Browse files- README.md +83 -0
- all_results.json +13 -0
- config.json +73 -0
- preprocessor_config.json +22 -0
- pytorch_model.bin +3 -0
- test_results.json +8 -0
- train_results.json +8 -0
- trainer_state.json +73 -0
- training_args.bin +3 -0
README.md
ADDED
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model: swin-tiny-patch4-window7-224
|
3 |
+
tags:
|
4 |
+
- image-classification
|
5 |
+
- timm
|
6 |
+
- generated_from_trainer
|
7 |
+
datasets:
|
8 |
+
- imagefolder
|
9 |
+
metrics:
|
10 |
+
- accuracy
|
11 |
+
model-index:
|
12 |
+
- name: swin-tiny-patch4-window7-224_ft_mango_leaf_disease
|
13 |
+
results:
|
14 |
+
- task:
|
15 |
+
name: Image Classification
|
16 |
+
type: image-classification
|
17 |
+
dataset:
|
18 |
+
name: mango_leaf_disease
|
19 |
+
type: imagefolder
|
20 |
+
config: default
|
21 |
+
split: train
|
22 |
+
args: default
|
23 |
+
metrics:
|
24 |
+
- name: Accuracy
|
25 |
+
type: accuracy
|
26 |
+
value: 0.9916666666666667
|
27 |
+
---
|
28 |
+
|
29 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
30 |
+
should probably proofread and complete it, then remove this comment. -->
|
31 |
+
|
32 |
+
# swin-tiny-patch4-window7-224_ft_mango_leaf_disease
|
33 |
+
|
34 |
+
This model is a fine-tuned version of [swin-tiny-patch4-window7-224](https://huggingface.co/swin-tiny-patch4-window7-224) on the mango_leaf_disease dataset.
|
35 |
+
It achieves the following results on the evaluation set:
|
36 |
+
- Loss: 0.1712
|
37 |
+
- Accuracy: 0.9917
|
38 |
+
|
39 |
+
## Model description
|
40 |
+
|
41 |
+
More information needed
|
42 |
+
|
43 |
+
## Intended uses & limitations
|
44 |
+
|
45 |
+
More information needed
|
46 |
+
|
47 |
+
## Training and evaluation data
|
48 |
+
|
49 |
+
More information needed
|
50 |
+
|
51 |
+
## Training procedure
|
52 |
+
|
53 |
+
### Training hyperparameters
|
54 |
+
|
55 |
+
The following hyperparameters were used during training:
|
56 |
+
- learning_rate: 1e-05
|
57 |
+
- train_batch_size: 64
|
58 |
+
- eval_batch_size: 64
|
59 |
+
- seed: 143
|
60 |
+
- gradient_accumulation_steps: 4
|
61 |
+
- total_train_batch_size: 256
|
62 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
63 |
+
- lr_scheduler_type: linear
|
64 |
+
- lr_scheduler_warmup_ratio: 0.1
|
65 |
+
- num_epochs: 5
|
66 |
+
|
67 |
+
### Training results
|
68 |
+
|
69 |
+
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|
70 |
+
|:-------------:|:-----:|:----:|:---------------:|:--------:|
|
71 |
+
| No log | 0.93 | 10 | 0.6785 | 0.9306 |
|
72 |
+
| No log | 1.95 | 21 | 0.3613 | 0.9736 |
|
73 |
+
| No log | 2.98 | 32 | 0.2289 | 0.9847 |
|
74 |
+
| No log | 4.0 | 43 | 0.1783 | 0.9917 |
|
75 |
+
| No log | 4.65 | 50 | 0.1712 | 0.9917 |
|
76 |
+
|
77 |
+
|
78 |
+
### Framework versions
|
79 |
+
|
80 |
+
- Transformers 4.33.3
|
81 |
+
- Pytorch 2.0.1+cu118
|
82 |
+
- Datasets 2.14.5
|
83 |
+
- Tokenizers 0.13.3
|
all_results.json
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 4.65,
|
3 |
+
"test_accuracy": 1.0,
|
4 |
+
"test_loss": 0.16256704926490784,
|
5 |
+
"test_runtime": 19.1855,
|
6 |
+
"test_samples_per_second": 9.382,
|
7 |
+
"test_steps_per_second": 0.156,
|
8 |
+
"total_flos": 3.1303908690827674e+17,
|
9 |
+
"train_loss": 0.40170501708984374,
|
10 |
+
"train_runtime": 365.1652,
|
11 |
+
"train_samples_per_second": 36.97,
|
12 |
+
"train_steps_per_second": 0.137
|
13 |
+
}
|
config.json
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "/content/swin-tiny-patch4-window7-224-mango_leaf_disease-2023-10-01",
|
3 |
+
"architectures": [
|
4 |
+
"SwinForImageClassification"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.0,
|
7 |
+
"depths": [
|
8 |
+
2,
|
9 |
+
2,
|
10 |
+
6,
|
11 |
+
2
|
12 |
+
],
|
13 |
+
"drop_path_rate": 0.1,
|
14 |
+
"embed_dim": 96,
|
15 |
+
"encoder_stride": 32,
|
16 |
+
"hidden_act": "gelu",
|
17 |
+
"hidden_dropout_prob": 0.0,
|
18 |
+
"hidden_size": 768,
|
19 |
+
"id2label": {
|
20 |
+
"0": "Anthracnose",
|
21 |
+
"1": "Bacterial Canker",
|
22 |
+
"2": "Cutting Weevil",
|
23 |
+
"3": "Die Back",
|
24 |
+
"4": "Gall Midge",
|
25 |
+
"5": "Healthy",
|
26 |
+
"6": "Powdery Mildew",
|
27 |
+
"7": "Sooty Mould"
|
28 |
+
},
|
29 |
+
"image_size": 224,
|
30 |
+
"initializer_range": 0.02,
|
31 |
+
"label2id": {
|
32 |
+
"Anthracnose": "0",
|
33 |
+
"Bacterial Canker": "1",
|
34 |
+
"Cutting Weevil": "2",
|
35 |
+
"Die Back": "3",
|
36 |
+
"Gall Midge": "4",
|
37 |
+
"Healthy": "5",
|
38 |
+
"Powdery Mildew": "6",
|
39 |
+
"Sooty Mould": "7"
|
40 |
+
},
|
41 |
+
"layer_norm_eps": 1e-05,
|
42 |
+
"mlp_ratio": 4.0,
|
43 |
+
"model_type": "swin",
|
44 |
+
"num_channels": 3,
|
45 |
+
"num_heads": [
|
46 |
+
3,
|
47 |
+
6,
|
48 |
+
12,
|
49 |
+
24
|
50 |
+
],
|
51 |
+
"num_layers": 4,
|
52 |
+
"out_features": [
|
53 |
+
"stage4"
|
54 |
+
],
|
55 |
+
"out_indices": [
|
56 |
+
4
|
57 |
+
],
|
58 |
+
"patch_size": 4,
|
59 |
+
"path_norm": true,
|
60 |
+
"problem_type": "single_label_classification",
|
61 |
+
"qkv_bias": true,
|
62 |
+
"stage_names": [
|
63 |
+
"stem",
|
64 |
+
"stage1",
|
65 |
+
"stage2",
|
66 |
+
"stage3",
|
67 |
+
"stage4"
|
68 |
+
],
|
69 |
+
"torch_dtype": "float32",
|
70 |
+
"transformers_version": "4.33.3",
|
71 |
+
"use_absolute_embeddings": false,
|
72 |
+
"window_size": 7
|
73 |
+
}
|
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.485,
|
7 |
+
0.456,
|
8 |
+
0.406
|
9 |
+
],
|
10 |
+
"image_processor_type": "ViTImageProcessor",
|
11 |
+
"image_std": [
|
12 |
+
0.229,
|
13 |
+
0.224,
|
14 |
+
0.225
|
15 |
+
],
|
16 |
+
"resample": 3,
|
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:390dfa3fec73294099886d4eea3694eaaba3c97a7942595c222c88b148a9d705
|
3 |
+
size 110413297
|
test_results.json
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 4.65,
|
3 |
+
"test_accuracy": 1.0,
|
4 |
+
"test_loss": 0.16256704926490784,
|
5 |
+
"test_runtime": 19.1855,
|
6 |
+
"test_samples_per_second": 9.382,
|
7 |
+
"test_steps_per_second": 0.156
|
8 |
+
}
|
train_results.json
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 4.65,
|
3 |
+
"total_flos": 3.1303908690827674e+17,
|
4 |
+
"train_loss": 0.40170501708984374,
|
5 |
+
"train_runtime": 365.1652,
|
6 |
+
"train_samples_per_second": 36.97,
|
7 |
+
"train_steps_per_second": 0.137
|
8 |
+
}
|
trainer_state.json
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"best_metric": 0.9916666666666667,
|
3 |
+
"best_model_checkpoint": "swin-tiny-patch4-window7-224-mango_leaf_disease-2023-10-01/checkpoint-43",
|
4 |
+
"epoch": 4.651162790697675,
|
5 |
+
"eval_steps": 500,
|
6 |
+
"global_step": 50,
|
7 |
+
"is_hyper_param_search": false,
|
8 |
+
"is_local_process_zero": true,
|
9 |
+
"is_world_process_zero": true,
|
10 |
+
"log_history": [
|
11 |
+
{
|
12 |
+
"epoch": 0.93,
|
13 |
+
"eval_accuracy": 0.9305555555555556,
|
14 |
+
"eval_loss": 0.6785286664962769,
|
15 |
+
"eval_runtime": 74.8256,
|
16 |
+
"eval_samples_per_second": 9.622,
|
17 |
+
"eval_steps_per_second": 0.16,
|
18 |
+
"step": 10
|
19 |
+
},
|
20 |
+
{
|
21 |
+
"epoch": 1.95,
|
22 |
+
"eval_accuracy": 0.9736111111111111,
|
23 |
+
"eval_loss": 0.3613281548023224,
|
24 |
+
"eval_runtime": 1.8755,
|
25 |
+
"eval_samples_per_second": 383.906,
|
26 |
+
"eval_steps_per_second": 6.398,
|
27 |
+
"step": 21
|
28 |
+
},
|
29 |
+
{
|
30 |
+
"epoch": 2.98,
|
31 |
+
"eval_accuracy": 0.9847222222222223,
|
32 |
+
"eval_loss": 0.22890280187129974,
|
33 |
+
"eval_runtime": 1.8891,
|
34 |
+
"eval_samples_per_second": 381.125,
|
35 |
+
"eval_steps_per_second": 6.352,
|
36 |
+
"step": 32
|
37 |
+
},
|
38 |
+
{
|
39 |
+
"epoch": 4.0,
|
40 |
+
"eval_accuracy": 0.9916666666666667,
|
41 |
+
"eval_loss": 0.17830978333950043,
|
42 |
+
"eval_runtime": 1.8501,
|
43 |
+
"eval_samples_per_second": 389.168,
|
44 |
+
"eval_steps_per_second": 6.486,
|
45 |
+
"step": 43
|
46 |
+
},
|
47 |
+
{
|
48 |
+
"epoch": 4.65,
|
49 |
+
"eval_accuracy": 0.9916666666666667,
|
50 |
+
"eval_loss": 0.17116190493106842,
|
51 |
+
"eval_runtime": 1.8622,
|
52 |
+
"eval_samples_per_second": 386.635,
|
53 |
+
"eval_steps_per_second": 6.444,
|
54 |
+
"step": 50
|
55 |
+
},
|
56 |
+
{
|
57 |
+
"epoch": 4.65,
|
58 |
+
"step": 50,
|
59 |
+
"total_flos": 3.1303908690827674e+17,
|
60 |
+
"train_loss": 0.40170501708984374,
|
61 |
+
"train_runtime": 365.1652,
|
62 |
+
"train_samples_per_second": 36.97,
|
63 |
+
"train_steps_per_second": 0.137
|
64 |
+
}
|
65 |
+
],
|
66 |
+
"logging_steps": 500,
|
67 |
+
"max_steps": 50,
|
68 |
+
"num_train_epochs": 5,
|
69 |
+
"save_steps": 500,
|
70 |
+
"total_flos": 3.1303908690827674e+17,
|
71 |
+
"trial_name": null,
|
72 |
+
"trial_params": null
|
73 |
+
}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4dd0d44326b85a052314c7e1c19abe710fd727b1334bc7a988da83c4f1b36860
|
3 |
+
size 4219
|