sharmajai901
commited on
Commit
•
ff3b9a9
1
Parent(s):
1046f5c
End of training
Browse files- README.md +80 -0
- all_results.json +13 -0
- config.json +73 -0
- eval_results.json +8 -0
- model.safetensors +3 -0
- preprocessor_config.json +36 -0
- runs/Apr27_10-05-01_6c9a76e1dd10/events.out.tfevents.1714212320.6c9a76e1dd10.2327.0 +3 -0
- runs/Apr27_10-05-01_6c9a76e1dd10/events.out.tfevents.1714213683.6c9a76e1dd10.2327.1 +3 -0
- train_results.json +8 -0
- trainer_state.json +64 -0
- training_args.bin +3 -0
README.md
ADDED
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
base_model: microsoft/swin-tiny-patch4-window7-224
|
4 |
+
tags:
|
5 |
+
- generated_from_trainer
|
6 |
+
datasets:
|
7 |
+
- imagefolder
|
8 |
+
metrics:
|
9 |
+
- accuracy
|
10 |
+
model-index:
|
11 |
+
- name: swin-tiny-patch4-window7-224-finetuned-eurosat
|
12 |
+
results:
|
13 |
+
- task:
|
14 |
+
name: Image Classification
|
15 |
+
type: image-classification
|
16 |
+
dataset:
|
17 |
+
name: imagefolder
|
18 |
+
type: imagefolder
|
19 |
+
config: default
|
20 |
+
split: train
|
21 |
+
args: default
|
22 |
+
metrics:
|
23 |
+
- name: Accuracy
|
24 |
+
type: accuracy
|
25 |
+
value: 0.5238095238095238
|
26 |
+
---
|
27 |
+
|
28 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
29 |
+
should probably proofread and complete it, then remove this comment. -->
|
30 |
+
|
31 |
+
# swin-tiny-patch4-window7-224-finetuned-eurosat
|
32 |
+
|
33 |
+
This model is a fine-tuned version of [microsoft/swin-tiny-patch4-window7-224](https://huggingface.co/microsoft/swin-tiny-patch4-window7-224) on the imagefolder dataset.
|
34 |
+
It achieves the following results on the evaluation set:
|
35 |
+
- Loss: 1.3752
|
36 |
+
- Accuracy: 0.5238
|
37 |
+
|
38 |
+
## Model description
|
39 |
+
|
40 |
+
More information needed
|
41 |
+
|
42 |
+
## Intended uses & limitations
|
43 |
+
|
44 |
+
More information needed
|
45 |
+
|
46 |
+
## Training and evaluation data
|
47 |
+
|
48 |
+
More information needed
|
49 |
+
|
50 |
+
## Training procedure
|
51 |
+
|
52 |
+
### Training hyperparameters
|
53 |
+
|
54 |
+
The following hyperparameters were used during training:
|
55 |
+
- learning_rate: 5e-05
|
56 |
+
- train_batch_size: 32
|
57 |
+
- eval_batch_size: 32
|
58 |
+
- seed: 42
|
59 |
+
- gradient_accumulation_steps: 4
|
60 |
+
- total_train_batch_size: 128
|
61 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
62 |
+
- lr_scheduler_type: linear
|
63 |
+
- lr_scheduler_warmup_ratio: 0.1
|
64 |
+
- num_epochs: 3
|
65 |
+
|
66 |
+
### Training results
|
67 |
+
|
68 |
+
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|
69 |
+
|:-------------:|:------:|:----:|:---------------:|:--------:|
|
70 |
+
| No log | 0.8889 | 4 | 1.7408 | 0.4444 |
|
71 |
+
| No log | 2.0 | 9 | 1.4351 | 0.4921 |
|
72 |
+
| 1.7494 | 2.6667 | 12 | 1.3752 | 0.5238 |
|
73 |
+
|
74 |
+
|
75 |
+
### Framework versions
|
76 |
+
|
77 |
+
- Transformers 4.40.0
|
78 |
+
- Pytorch 2.2.1+cu121
|
79 |
+
- Datasets 2.19.0
|
80 |
+
- Tokenizers 0.19.1
|
all_results.json
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 2.6666666666666665,
|
3 |
+
"eval_accuracy": 0.5238095238095238,
|
4 |
+
"eval_loss": 1.3751540184020996,
|
5 |
+
"eval_runtime": 23.1923,
|
6 |
+
"eval_samples_per_second": 2.716,
|
7 |
+
"eval_steps_per_second": 0.086,
|
8 |
+
"total_flos": 3.768799680376013e+16,
|
9 |
+
"train_loss": 1.699290931224823,
|
10 |
+
"train_runtime": 1294.0597,
|
11 |
+
"train_samples_per_second": 1.312,
|
12 |
+
"train_steps_per_second": 0.009
|
13 |
+
}
|
config.json
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "microsoft/swin-tiny-patch4-window7-224",
|
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": "amenities",
|
21 |
+
"1": "bathroom",
|
22 |
+
"2": "bedroom",
|
23 |
+
"3": "exterior",
|
24 |
+
"4": "floor_plan",
|
25 |
+
"5": "kitchen",
|
26 |
+
"6": "living_room",
|
27 |
+
"7": "others"
|
28 |
+
},
|
29 |
+
"image_size": 224,
|
30 |
+
"initializer_range": 0.02,
|
31 |
+
"label2id": {
|
32 |
+
"amenities": 0,
|
33 |
+
"bathroom": 1,
|
34 |
+
"bedroom": 2,
|
35 |
+
"exterior": 3,
|
36 |
+
"floor_plan": 4,
|
37 |
+
"kitchen": 5,
|
38 |
+
"living_room": 6,
|
39 |
+
"others": 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.40.0",
|
71 |
+
"use_absolute_embeddings": false,
|
72 |
+
"window_size": 7
|
73 |
+
}
|
eval_results.json
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 2.6666666666666665,
|
3 |
+
"eval_accuracy": 0.5238095238095238,
|
4 |
+
"eval_loss": 1.3751540184020996,
|
5 |
+
"eval_runtime": 23.1923,
|
6 |
+
"eval_samples_per_second": 2.716,
|
7 |
+
"eval_steps_per_second": 0.086
|
8 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5b8ff454c280ea6a7b23ec27f826c2ee8bf0ab69bacafb4379c6198ce949661c
|
3 |
+
size 110361288
|
preprocessor_config.json
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_valid_processor_keys": [
|
3 |
+
"images",
|
4 |
+
"do_resize",
|
5 |
+
"size",
|
6 |
+
"resample",
|
7 |
+
"do_rescale",
|
8 |
+
"rescale_factor",
|
9 |
+
"do_normalize",
|
10 |
+
"image_mean",
|
11 |
+
"image_std",
|
12 |
+
"return_tensors",
|
13 |
+
"data_format",
|
14 |
+
"input_data_format"
|
15 |
+
],
|
16 |
+
"do_normalize": true,
|
17 |
+
"do_rescale": true,
|
18 |
+
"do_resize": true,
|
19 |
+
"image_mean": [
|
20 |
+
0.485,
|
21 |
+
0.456,
|
22 |
+
0.406
|
23 |
+
],
|
24 |
+
"image_processor_type": "ViTImageProcessor",
|
25 |
+
"image_std": [
|
26 |
+
0.229,
|
27 |
+
0.224,
|
28 |
+
0.225
|
29 |
+
],
|
30 |
+
"resample": 3,
|
31 |
+
"rescale_factor": 0.00392156862745098,
|
32 |
+
"size": {
|
33 |
+
"height": 224,
|
34 |
+
"width": 224
|
35 |
+
}
|
36 |
+
}
|
runs/Apr27_10-05-01_6c9a76e1dd10/events.out.tfevents.1714212320.6c9a76e1dd10.2327.0
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:794a5e6e6740c0a023b918694c6d2905755681fc08b35aa4ad49e0089c73dde4
|
3 |
+
size 6895
|
runs/Apr27_10-05-01_6c9a76e1dd10/events.out.tfevents.1714213683.6c9a76e1dd10.2327.1
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:53ffaaa1e420777a846756e425f577f2f00eae401cc8842f1a1ec30a075fd76d
|
3 |
+
size 405
|
train_results.json
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 2.6666666666666665,
|
3 |
+
"total_flos": 3.768799680376013e+16,
|
4 |
+
"train_loss": 1.699290931224823,
|
5 |
+
"train_runtime": 1294.0597,
|
6 |
+
"train_samples_per_second": 1.312,
|
7 |
+
"train_steps_per_second": 0.009
|
8 |
+
}
|
trainer_state.json
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"best_metric": 0.5238095238095238,
|
3 |
+
"best_model_checkpoint": "swin-tiny-patch4-window7-224-finetuned-eurosat/checkpoint-12",
|
4 |
+
"epoch": 2.6666666666666665,
|
5 |
+
"eval_steps": 500,
|
6 |
+
"global_step": 12,
|
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.8888888888888888,
|
13 |
+
"eval_accuracy": 0.4444444444444444,
|
14 |
+
"eval_loss": 1.740828037261963,
|
15 |
+
"eval_runtime": 17.227,
|
16 |
+
"eval_samples_per_second": 3.657,
|
17 |
+
"eval_steps_per_second": 0.116,
|
18 |
+
"step": 4
|
19 |
+
},
|
20 |
+
{
|
21 |
+
"epoch": 2.0,
|
22 |
+
"eval_accuracy": 0.49206349206349204,
|
23 |
+
"eval_loss": 1.4351359605789185,
|
24 |
+
"eval_runtime": 16.2702,
|
25 |
+
"eval_samples_per_second": 3.872,
|
26 |
+
"eval_steps_per_second": 0.123,
|
27 |
+
"step": 9
|
28 |
+
},
|
29 |
+
{
|
30 |
+
"epoch": 2.2222222222222223,
|
31 |
+
"grad_norm": 5.383830547332764,
|
32 |
+
"learning_rate": 1e-05,
|
33 |
+
"loss": 1.7494,
|
34 |
+
"step": 10
|
35 |
+
},
|
36 |
+
{
|
37 |
+
"epoch": 2.6666666666666665,
|
38 |
+
"eval_accuracy": 0.5238095238095238,
|
39 |
+
"eval_loss": 1.3751540184020996,
|
40 |
+
"eval_runtime": 16.3345,
|
41 |
+
"eval_samples_per_second": 3.857,
|
42 |
+
"eval_steps_per_second": 0.122,
|
43 |
+
"step": 12
|
44 |
+
},
|
45 |
+
{
|
46 |
+
"epoch": 2.6666666666666665,
|
47 |
+
"step": 12,
|
48 |
+
"total_flos": 3.768799680376013e+16,
|
49 |
+
"train_loss": 1.699290931224823,
|
50 |
+
"train_runtime": 1294.0597,
|
51 |
+
"train_samples_per_second": 1.312,
|
52 |
+
"train_steps_per_second": 0.009
|
53 |
+
}
|
54 |
+
],
|
55 |
+
"logging_steps": 10,
|
56 |
+
"max_steps": 12,
|
57 |
+
"num_input_tokens_seen": 0,
|
58 |
+
"num_train_epochs": 3,
|
59 |
+
"save_steps": 500,
|
60 |
+
"total_flos": 3.768799680376013e+16,
|
61 |
+
"train_batch_size": 32,
|
62 |
+
"trial_name": null,
|
63 |
+
"trial_params": null
|
64 |
+
}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cd9a3de2951ff8bf514987e7c99588bc5b6dbcea08d1954853dcfea2aaf07a99
|
3 |
+
size 5048
|