transformers tensorboard safetensors swin image-classification generated_from_trainer dataset:imagefolder base_model:microsoft/swin-tiny-patch4-window7-224 license:apache-2.0 model-index autotrain_compatible endpoints_compatible region:us
---
license: apache-2.0
base_model: microsoft/swin-tiny-patch4-window7-224
tags:
- generated_from_trainer
datasets:
- imagefolder
metrics:
- accuracy
model-index:
- name: swin-tiny-patch4-window7-224-finetuned-eurosat
  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.9383116883116883
---

<!-- 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-tiny-patch4-window7-224-finetuned-eurosat

This model is a fine-tuned version of [microsoft/swin-tiny-patch4-window7-224](https://huggingface.co/microsoft/swin-tiny-patch4-window7-224) on the imagefolder dataset.
It achieves the following results on the evaluation set:
- Loss: 0.2469
- Accuracy: 0.9383

## 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: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_ratio: 0.1
- num_epochs: 30

### Training results

| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|:-------------:|:-----:|:----:|:---------------:|:--------:|
| 0.9843        | 0.99  | 43   | 0.8500          | 0.6948   |
| 0.5335        | 2.0   | 87   | 0.5584          | 0.7825   |
| 0.4263        | 2.99  | 130  | 0.4791          | 0.8117   |
| 0.3308        | 4.0   | 174  | 0.4269          | 0.8344   |
| 0.2882        | 4.99  | 217  | 0.3567          | 0.8636   |
| 0.2517        | 6.0   | 261  | 0.3317          | 0.8701   |
| 0.1908        | 6.99  | 304  | 0.3082          | 0.8815   |
| 0.187         | 8.0   | 348  | 0.3230          | 0.8799   |
| 0.1434        | 8.99  | 391  | 0.3323          | 0.9010   |
| 0.1277        | 10.0  | 435  | 0.2489          | 0.9075   |
| 0.156         | 10.99 | 478  | 0.3246          | 0.8880   |
| 0.0781        | 12.0  | 522  | 0.3121          | 0.9010   |
| 0.1001        | 12.99 | 565  | 0.2708          | 0.9058   |
| 0.0892        | 14.0  | 609  | 0.2582          | 0.9140   |
| 0.0644        | 14.99 | 652  | 0.2486          | 0.9221   |
| 0.0689        | 16.0  | 696  | 0.2465          | 0.9237   |
| 0.0547        | 16.99 | 739  | 0.2402          | 0.9334   |
| 0.0597        | 18.0  | 783  | 0.2534          | 0.9237   |
| 0.0512        | 18.99 | 826  | 0.2400          | 0.9318   |
| 0.041         | 20.0  | 870  | 0.2397          | 0.9286   |
| 0.0376        | 20.99 | 913  | 0.2663          | 0.9269   |
| 0.0412        | 22.0  | 957  | 0.3026          | 0.9221   |
| 0.0423        | 22.99 | 1000 | 0.2678          | 0.9302   |
| 0.0266        | 24.0  | 1044 | 0.2510          | 0.9318   |
| 0.0313        | 24.99 | 1087 | 0.2542          | 0.9334   |
| 0.0207        | 26.0  | 1131 | 0.2743          | 0.9334   |
| 0.0292        | 26.99 | 1174 | 0.2614          | 0.9318   |
| 0.0242        | 28.0  | 1218 | 0.2469          | 0.9383   |
| 0.0201        | 28.99 | 1261 | 0.2534          | 0.9367   |
| 0.0354        | 29.66 | 1290 | 0.2525          | 0.9367   |


### Framework versions

- Transformers 4.37.2
- Pytorch 2.1.0+cu121
- Datasets 2.17.0
- Tokenizers 0.15.1
