bombshelll commited on
Commit
63c614f
·
verified ·
1 Parent(s): 4d34025

Model save

Browse files
Files changed (5) hide show
  1. README.md +78 -0
  2. config.json +63 -0
  3. model.safetensors +3 -0
  4. preprocessor_config.json +22 -0
  5. training_args.bin +3 -0
README.md ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ license: apache-2.0
4
+ base_model: microsoft/swin-tiny-patch4-window7-224
5
+ tags:
6
+ - generated_from_trainer
7
+ metrics:
8
+ - accuracy
9
+ model-index:
10
+ - name: swin-brain-abnormalities-classification-fold3
11
+ results: []
12
+ ---
13
+
14
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
15
+ should probably proofread and complete it, then remove this comment. -->
16
+
17
+ # swin-brain-abnormalities-classification-fold3
18
+
19
+ This model is a fine-tuned version of [microsoft/swin-tiny-patch4-window7-224](https://huggingface.co/microsoft/swin-tiny-patch4-window7-224) on an unknown dataset.
20
+ It achieves the following results on the evaluation set:
21
+ - Loss: 0.1552
22
+ - Accuracy: 0.9566
23
+
24
+ ## Model description
25
+
26
+ More information needed
27
+
28
+ ## Intended uses & limitations
29
+
30
+ More information needed
31
+
32
+ ## Training and evaluation data
33
+
34
+ More information needed
35
+
36
+ ## Training procedure
37
+
38
+ ### Training hyperparameters
39
+
40
+ The following hyperparameters were used during training:
41
+ - learning_rate: 5e-05
42
+ - train_batch_size: 32
43
+ - eval_batch_size: 32
44
+ - seed: 42
45
+ - gradient_accumulation_steps: 4
46
+ - total_train_batch_size: 128
47
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
48
+ - lr_scheduler_type: linear
49
+ - lr_scheduler_warmup_ratio: 0.1
50
+ - num_epochs: 15
51
+
52
+ ### Training results
53
+
54
+ | Training Loss | Epoch | Step | Validation Loss | Accuracy |
55
+ |:-------------:|:-------:|:----:|:---------------:|:--------:|
56
+ | 0.9031 | 0.9714 | 17 | 0.6752 | 0.7286 |
57
+ | 0.5553 | 2.0 | 35 | 0.3278 | 0.8806 |
58
+ | 0.3599 | 2.9714 | 52 | 0.2776 | 0.8942 |
59
+ | 0.3013 | 4.0 | 70 | 0.1906 | 0.9281 |
60
+ | 0.2276 | 4.9714 | 87 | 0.1999 | 0.9335 |
61
+ | 0.1906 | 6.0 | 105 | 0.1566 | 0.9430 |
62
+ | 0.1736 | 6.9714 | 122 | 0.1731 | 0.9403 |
63
+ | 0.1593 | 8.0 | 140 | 0.1662 | 0.9444 |
64
+ | 0.1318 | 8.9714 | 157 | 0.1761 | 0.9417 |
65
+ | 0.1117 | 10.0 | 175 | 0.1714 | 0.9403 |
66
+ | 0.1335 | 10.9714 | 192 | 0.1594 | 0.9525 |
67
+ | 0.0996 | 12.0 | 210 | 0.1820 | 0.9417 |
68
+ | 0.0954 | 12.9714 | 227 | 0.1528 | 0.9539 |
69
+ | 0.0913 | 14.0 | 245 | 0.1547 | 0.9566 |
70
+ | 0.0878 | 14.5714 | 255 | 0.1552 | 0.9566 |
71
+
72
+
73
+ ### Framework versions
74
+
75
+ - Transformers 4.45.1
76
+ - Pytorch 2.4.0
77
+ - Datasets 3.0.1
78
+ - Tokenizers 0.20.0
config.json ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": "lesion",
21
+ "1": "normal",
22
+ "2": "tumor"
23
+ },
24
+ "image_size": 224,
25
+ "initializer_range": 0.02,
26
+ "label2id": {
27
+ "lesion": 0,
28
+ "normal": 1,
29
+ "tumor": 2
30
+ },
31
+ "layer_norm_eps": 1e-05,
32
+ "mlp_ratio": 4.0,
33
+ "model_type": "swin",
34
+ "num_channels": 3,
35
+ "num_heads": [
36
+ 3,
37
+ 6,
38
+ 12,
39
+ 24
40
+ ],
41
+ "num_layers": 4,
42
+ "out_features": [
43
+ "stage4"
44
+ ],
45
+ "out_indices": [
46
+ 4
47
+ ],
48
+ "patch_size": 4,
49
+ "path_norm": true,
50
+ "problem_type": "single_label_classification",
51
+ "qkv_bias": true,
52
+ "stage_names": [
53
+ "stem",
54
+ "stage1",
55
+ "stage2",
56
+ "stage3",
57
+ "stage4"
58
+ ],
59
+ "torch_dtype": "float32",
60
+ "transformers_version": "4.45.1",
61
+ "use_absolute_embeddings": false,
62
+ "window_size": 7
63
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5c705f4e7879760508e321cc8ffd56b029f97c1cc9a8b037d635ab12d380f2bf
3
+ size 110345908
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
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:43b207d3a410a1cc43fe118696dc41d59a101c5cefeec6c599ce7ad6697ffd2e
3
+ size 5304