<!-- 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_02
This model is a fine-tuned version of microsoft/swin-base-patch4-window7-224-in22k on the imagefolder dataset. It achieves the following results on the evaluation set:
- Loss: 0.5751
- Accuracy: 0.7637
- F1 Score: 0.7582
- Precision: 0.8412
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: 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: 20
Training results
Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 Score | Precision |
---|---|---|---|---|---|---|
1.2461 | 0.96 | 20 | 1.2674 | 0.4083 | 0.3093 | 0.4583 |
0.7271 | 1.98 | 41 | 0.9923 | 0.5666 | 0.5074 | 0.6374 |
0.3593 | 2.99 | 62 | 0.7205 | 0.7084 | 0.6803 | 0.7511 |
0.2162 | 4.0 | 83 | 0.7662 | 0.6925 | 0.6572 | 0.7751 |
0.1575 | 4.96 | 103 | 0.6434 | 0.7335 | 0.7161 | 0.8072 |
0.1174 | 5.98 | 124 | 0.6836 | 0.7141 | 0.6923 | 0.8004 |
0.0988 | 6.99 | 145 | 0.5644 | 0.7665 | 0.7572 | 0.8313 |
0.079 | 8.0 | 166 | 0.5964 | 0.7506 | 0.7376 | 0.8172 |
0.0786 | 8.96 | 186 | 0.5741 | 0.7574 | 0.7503 | 0.8315 |
0.0677 | 9.98 | 207 | 0.5306 | 0.7802 | 0.7697 | 0.8363 |
0.0518 | 10.99 | 228 | 0.5828 | 0.7625 | 0.7525 | 0.8331 |
0.0466 | 12.0 | 249 | 0.6159 | 0.7460 | 0.7370 | 0.8328 |
0.0344 | 12.96 | 269 | 0.6178 | 0.7489 | 0.7418 | 0.8339 |
0.0296 | 13.98 | 290 | 0.6194 | 0.7483 | 0.7389 | 0.8298 |
0.0246 | 14.99 | 311 | 0.6697 | 0.7329 | 0.7209 | 0.8281 |
0.0202 | 16.0 | 332 | 0.5769 | 0.7642 | 0.7570 | 0.8382 |
0.0261 | 16.96 | 352 | 0.5960 | 0.7551 | 0.7485 | 0.8363 |
0.0183 | 17.98 | 373 | 0.5145 | 0.7904 | 0.7856 | 0.8488 |
0.0169 | 18.99 | 394 | 0.5720 | 0.7648 | 0.7594 | 0.8412 |
0.0172 | 19.28 | 400 | 0.5751 | 0.7637 | 0.7582 | 0.8412 |
Framework versions
- Transformers 4.29.2
- Pytorch 2.0.1+cu117
- Datasets 2.12.0
- Tokenizers 0.13.3