File size: 3,228 Bytes
d7713b9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8f67d75
d7713b9
 
8f67d75
d7713b9
 
 
 
 
 
 
 
 
8f67d75
 
 
 
 
 
d7713b9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
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_12
  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.9760408483896308
    - name: Precision
      type: precision
      value: 0.9762470546227865
---

<!-- 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_12

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.0789
- Accuracy: 0.9760
- F1 Score: 0.9761
- Precision: 0.9762
- Sensitivity: 0.9762
- Specificity: 0.9940

## 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: 0.0001
- train_batch_size: 64
- eval_batch_size: 64
- seed: 42
- gradient_accumulation_steps: 4
- total_train_batch_size: 256
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_ratio: 0.1
- num_epochs: 10

### Training results

| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 Score | Precision | Sensitivity | Specificity |
|:-------------:|:-----:|:----:|:---------------:|:--------:|:--------:|:---------:|:-----------:|:-----------:|
| 0.3644        | 1.0   | 30   | 0.2918          | 0.8955   | 0.8974   | 0.9070    | 0.8957      | 0.9734      |
| 0.2177        | 2.0   | 60   | 0.2319          | 0.9152   | 0.9155   | 0.9237    | 0.9156      | 0.9786      |
| 0.1171        | 3.0   | 90   | 0.1654          | 0.9489   | 0.9494   | 0.9532    | 0.9492      | 0.9872      |
| 0.068         | 4.0   | 120  | 0.1600          | 0.9450   | 0.9451   | 0.9466    | 0.9455      | 0.9861      |
| 0.0499        | 5.0   | 150  | 0.0947          | 0.9654   | 0.9656   | 0.9656    | 0.9657      | 0.9913      |
| 0.0302        | 6.0   | 180  | 0.0882          | 0.9713   | 0.9714   | 0.9715    | 0.9715      | 0.9928      |
| 0.0207        | 7.0   | 210  | 0.1002          | 0.9698   | 0.9699   | 0.9708    | 0.9699      | 0.9924      |
| 0.0205        | 8.0   | 240  | 0.1550          | 0.9525   | 0.9521   | 0.9544    | 0.9529      | 0.9881      |
| 0.0163        | 9.0   | 270  | 0.0789          | 0.9760   | 0.9761   | 0.9762    | 0.9762      | 0.9940      |
| 0.0181        | 10.0  | 300  | 0.0923          | 0.9737   | 0.9737   | 0.9740    | 0.9738      | 0.9934      |


### Framework versions

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