File size: 4,359 Bytes
d560031
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7f75cd1
d560031
 
7f75cd1
d560031
 
 
 
 
 
 
 
 
7f75cd1
 
 
 
 
 
d560031
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
---
license: apache-2.0
tags:
- generated_from_trainer
datasets:
- imagefolder
metrics:
- accuracy
- precision
model-index:
- name: swin-base-patch4-window7-224-in22k-finetuned-brain-tumor-final_09
  results:
  - task:
      name: Image Classification
      type: image-classification
    dataset:
      name: imagefolder
      type: imagefolder
      config: default
      split: train
      args: default
    metrics:
    - name: Accuracy
      type: accuracy
      value: 0.9076983503534957
    - name: Precision
      type: precision
      value: 0.9184297970931635
---

<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# swin-base-patch4-window7-224-in22k-finetuned-brain-tumor-final_09

This model is a fine-tuned version of [microsoft/swin-base-patch4-window7-224-in22k](https://huggingface.co/microsoft/swin-base-patch4-window7-224-in22k) on the imagefolder dataset.
It achieves the following results on the evaluation set:
- Loss: 0.2586
- Accuracy: 0.9077
- F1 Score: 0.9093
- Precision: 0.9184
- Sensitivity: 0.9071
- Specificity: 0.9766

## Model description

More information needed

## Intended uses & limitations

More information needed

## Training and evaluation data

More information needed

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 1e-05
- train_batch_size: 100
- eval_batch_size: 100
- seed: 42
- gradient_accumulation_steps: 4
- total_train_batch_size: 400
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_ratio: 0.1
- num_epochs: 20

### Training results

| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 Score | Precision | Sensitivity | Specificity |
|:-------------:|:-----:|:----:|:---------------:|:--------:|:--------:|:---------:|:-----------:|:-----------:|
| 1.4243        | 0.99  | 19   | 1.2818          | 0.4124   | 0.3570   | 0.4910    | 0.4019      | 0.8403      |
| 1.1046        | 1.97  | 38   | 0.8873          | 0.6658   | 0.6584   | 0.7235    | 0.6608      | 0.9117      |
| 0.5232        | 2.96  | 57   | 0.5753          | 0.7671   | 0.7654   | 0.8063    | 0.7631      | 0.9395      |
| 0.3235        | 4.0   | 77   | 0.4476          | 0.8256   | 0.8272   | 0.8496    | 0.8228      | 0.9549      |
| 0.2586        | 4.99  | 96   | 0.3886          | 0.8590   | 0.8608   | 0.8764    | 0.8567      | 0.9638      |
| 0.1986        | 5.97  | 115  | 0.3538          | 0.8641   | 0.8663   | 0.8816    | 0.8624      | 0.9652      |
| 0.166         | 6.96  | 134  | 0.3543          | 0.8649   | 0.8668   | 0.8849    | 0.8637      | 0.9655      |
| 0.1345        | 8.0   | 154  | 0.3729          | 0.8586   | 0.8610   | 0.8837    | 0.8571      | 0.9640      |
| 0.1197        | 8.99  | 173  | 0.2879          | 0.8975   | 0.8987   | 0.9098    | 0.8961      | 0.9740      |
| 0.1033        | 9.97  | 192  | 0.2810          | 0.8998   | 0.9013   | 0.9128    | 0.8983      | 0.9746      |
| 0.0957        | 10.96 | 211  | 0.3239          | 0.8802   | 0.8818   | 0.8988    | 0.8795      | 0.9696      |
| 0.085         | 12.0  | 231  | 0.2586          | 0.9077   | 0.9093   | 0.9184    | 0.9071      | 0.9766      |
| 0.0769        | 12.99 | 250  | 0.2662          | 0.9018   | 0.9036   | 0.9149    | 0.9011      | 0.9751      |
| 0.0758        | 13.97 | 269  | 0.2830          | 0.8951   | 0.8970   | 0.9102    | 0.8945      | 0.9734      |
| 0.068         | 14.96 | 288  | 0.2757          | 0.8967   | 0.8986   | 0.9113    | 0.8960      | 0.9738      |
| 0.0641        | 16.0  | 308  | 0.2743          | 0.8991   | 0.9008   | 0.9136    | 0.8984      | 0.9744      |
| 0.0623        | 16.99 | 327  | 0.2713          | 0.8987   | 0.9001   | 0.9127    | 0.8982      | 0.9743      |
| 0.0542        | 17.97 | 346  | 0.2650          | 0.8987   | 0.9005   | 0.9128    | 0.8980      | 0.9743      |
| 0.0573        | 18.96 | 365  | 0.2709          | 0.8963   | 0.8981   | 0.9112    | 0.8957      | 0.9737      |
| 0.058         | 19.74 | 380  | 0.2778          | 0.8947   | 0.8965   | 0.9101    | 0.8942      | 0.9733      |


### Framework versions

- Transformers 4.29.2
- Pytorch 2.0.1+cu117
- Datasets 2.12.0
- Tokenizers 0.13.3