swin-tiny-patch4-window7-224-finetuned-skin-cancer
This model is a fine-tuned version of microsoft/swin-tiny-patch4-window7-224 on the imagefolder dataset. It achieves the following results on the evaluation set:
- Loss: 0.3824
- Accuracy: 0.8463
- F1 Macro: 0.7879
- F1 Weighted: 0.8529
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: 5e-05
- train_batch_size: 32
- eval_batch_size: 32
- seed: 42
- gradient_accumulation_steps: 4
- total_train_batch_size: 128
- optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: linear
- lr_scheduler_warmup_ratio: 0.1
- num_epochs: 10
Training results
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 Macro | F1 Weighted |
|---|---|---|---|---|---|---|
| 1.2296 | 1.0 | 71 | 1.2059 | 0.5210 | 0.3890 | 0.5941 |
| 0.8173 | 2.0 | 142 | 0.7907 | 0.5958 | 0.5587 | 0.6461 |
| 0.6813 | 3.0 | 213 | 0.5531 | 0.7335 | 0.6367 | 0.7620 |
| 0.6151 | 4.0 | 284 | 0.5160 | 0.7555 | 0.7260 | 0.7784 |
| 0.5621 | 5.0 | 355 | 0.5623 | 0.8094 | 0.6846 | 0.8140 |
| 0.421 | 6.0 | 426 | 0.4385 | 0.8234 | 0.7339 | 0.8343 |
| 0.376 | 7.0 | 497 | 0.4416 | 0.8363 | 0.7783 | 0.8429 |
| 0.3285 | 8.0 | 568 | 0.4228 | 0.8463 | 0.7734 | 0.8506 |
| 0.3225 | 9.0 | 639 | 0.4017 | 0.8204 | 0.7694 | 0.8324 |
| 0.3071 | 10.0 | 710 | 0.3824 | 0.8463 | 0.7879 | 0.8529 |
Framework versions
- Transformers 4.52.4
- Pytorch 2.6.0+cu124
- Datasets 3.6.0
- Tokenizers 0.21.2