ahmedesmail16
commited on
Commit
•
5898fbe
1
Parent(s):
720dedd
End of training
Browse files- README.md +87 -0
- config.json +87 -0
- model.safetensors +3 -0
- preprocessor_config.json +36 -0
- runs/Jun27_21-54-24_163828ad6818/events.out.tfevents.1719525269.163828ad6818.34.0 +3 -0
- training_args.bin +3 -0
README.md
ADDED
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
base_model: microsoft/swinv2-base-patch4-window12-192-22k
|
4 |
+
tags:
|
5 |
+
- generated_from_trainer
|
6 |
+
datasets:
|
7 |
+
- imagefolder
|
8 |
+
metrics:
|
9 |
+
- accuracy
|
10 |
+
model-index:
|
11 |
+
- name: Psoriasis-500-100aug-224-swinv2-base-patch4-window12-192-22k
|
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: validation
|
21 |
+
args: default
|
22 |
+
metrics:
|
23 |
+
- name: Accuracy
|
24 |
+
type: accuracy
|
25 |
+
value: 0.8200873362445414
|
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 |
+
# Psoriasis-500-100aug-224-swinv2-base-patch4-window12-192-22k
|
32 |
+
|
33 |
+
This model is a fine-tuned version of [microsoft/swinv2-base-patch4-window12-192-22k](https://huggingface.co/microsoft/swinv2-base-patch4-window12-192-22k) on the imagefolder dataset.
|
34 |
+
It achieves the following results on the evaluation set:
|
35 |
+
- Loss: 1.1589
|
36 |
+
- Accuracy: 0.8201
|
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: 16
|
57 |
+
- eval_batch_size: 16
|
58 |
+
- seed: 42
|
59 |
+
- gradient_accumulation_steps: 4
|
60 |
+
- total_train_batch_size: 64
|
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: 10
|
65 |
+
|
66 |
+
### Training results
|
67 |
+
|
68 |
+
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|
69 |
+
|:-------------:|:------:|:----:|:---------------:|:--------:|
|
70 |
+
| 0.5248 | 0.9973 | 92 | 0.7503 | 0.7694 |
|
71 |
+
| 0.2461 | 1.9946 | 184 | 0.8202 | 0.7764 |
|
72 |
+
| 0.1164 | 2.9919 | 276 | 0.8260 | 0.8052 |
|
73 |
+
| 0.0656 | 4.0 | 369 | 1.0366 | 0.7860 |
|
74 |
+
| 0.0525 | 4.9973 | 461 | 1.0025 | 0.8148 |
|
75 |
+
| 0.0223 | 5.9946 | 553 | 1.1363 | 0.7965 |
|
76 |
+
| 0.0022 | 6.9919 | 645 | 1.1911 | 0.8061 |
|
77 |
+
| 0.009 | 8.0 | 738 | 1.2139 | 0.7965 |
|
78 |
+
| 0.0073 | 8.9973 | 830 | 1.2066 | 0.8166 |
|
79 |
+
| 0.0014 | 9.9729 | 920 | 1.1589 | 0.8201 |
|
80 |
+
|
81 |
+
|
82 |
+
### Framework versions
|
83 |
+
|
84 |
+
- Transformers 4.41.2
|
85 |
+
- Pytorch 2.1.2
|
86 |
+
- Datasets 2.19.2
|
87 |
+
- Tokenizers 0.19.1
|
config.json
ADDED
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "microsoft/swinv2-base-patch4-window12-192-22k",
|
3 |
+
"architectures": [
|
4 |
+
"Swinv2ForImageClassification"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.0,
|
7 |
+
"depths": [
|
8 |
+
2,
|
9 |
+
2,
|
10 |
+
18,
|
11 |
+
2
|
12 |
+
],
|
13 |
+
"drop_path_rate": 0.1,
|
14 |
+
"embed_dim": 128,
|
15 |
+
"encoder_stride": 32,
|
16 |
+
"hidden_act": "gelu",
|
17 |
+
"hidden_dropout_prob": 0.0,
|
18 |
+
"hidden_size": 1024,
|
19 |
+
"id2label": {
|
20 |
+
"0": "Abnormal",
|
21 |
+
"1": "Erythrodermic",
|
22 |
+
"2": "Guttate",
|
23 |
+
"3": "Inverse",
|
24 |
+
"4": "Nail",
|
25 |
+
"5": "Normal",
|
26 |
+
"6": "Not Define",
|
27 |
+
"7": "Palm Soles",
|
28 |
+
"8": "Plaque",
|
29 |
+
"9": "Psoriatic Arthritis",
|
30 |
+
"10": "Pustular",
|
31 |
+
"11": "Scalp"
|
32 |
+
},
|
33 |
+
"image_size": 192,
|
34 |
+
"initializer_range": 0.02,
|
35 |
+
"label2id": {
|
36 |
+
"Abnormal": 0,
|
37 |
+
"Erythrodermic": 1,
|
38 |
+
"Guttate": 2,
|
39 |
+
"Inverse": 3,
|
40 |
+
"Nail": 4,
|
41 |
+
"Normal": 5,
|
42 |
+
"Not Define": 6,
|
43 |
+
"Palm Soles": 7,
|
44 |
+
"Plaque": 8,
|
45 |
+
"Psoriatic Arthritis": 9,
|
46 |
+
"Pustular": 10,
|
47 |
+
"Scalp": 11
|
48 |
+
},
|
49 |
+
"layer_norm_eps": 1e-05,
|
50 |
+
"mlp_ratio": 4.0,
|
51 |
+
"model_type": "swinv2",
|
52 |
+
"num_channels": 3,
|
53 |
+
"num_heads": [
|
54 |
+
4,
|
55 |
+
8,
|
56 |
+
16,
|
57 |
+
32
|
58 |
+
],
|
59 |
+
"num_layers": 4,
|
60 |
+
"out_features": [
|
61 |
+
"stage4"
|
62 |
+
],
|
63 |
+
"out_indices": [
|
64 |
+
4
|
65 |
+
],
|
66 |
+
"patch_size": 4,
|
67 |
+
"path_norm": true,
|
68 |
+
"pretrained_window_sizes": [
|
69 |
+
0,
|
70 |
+
0,
|
71 |
+
0,
|
72 |
+
0
|
73 |
+
],
|
74 |
+
"problem_type": "single_label_classification",
|
75 |
+
"qkv_bias": true,
|
76 |
+
"stage_names": [
|
77 |
+
"stem",
|
78 |
+
"stage1",
|
79 |
+
"stage2",
|
80 |
+
"stage3",
|
81 |
+
"stage4"
|
82 |
+
],
|
83 |
+
"torch_dtype": "float32",
|
84 |
+
"transformers_version": "4.41.2",
|
85 |
+
"use_absolute_embeddings": false,
|
86 |
+
"window_size": 12
|
87 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dbdd2ba310667ed27b550e7c31a3c3574f0f23542f65d17594c9391ece409c31
|
3 |
+
size 347686496
|
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": 192,
|
34 |
+
"width": 192
|
35 |
+
}
|
36 |
+
}
|
runs/Jun27_21-54-24_163828ad6818/events.out.tfevents.1719525269.163828ad6818.34.0
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f7530dda3f0e022bb508d1f911bf261a3fb59be0fd84dd8b90d1ae08107d08fc
|
3 |
+
size 28778
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:50e2eaf588de3137c3f298559404ae5e78295efb0056709a1d8137d94032398c
|
3 |
+
size 5240
|