transformers pytorch swinv2 image-classification generated_from_trainer dataset:imagefolder base_model:microsoft/swinv2-tiny-patch4-window8-256 license:apache-2.0 model-index autotrain_compatible endpoints_compatible region:us
---
license: apache-2.0
base_model: microsoft/swinv2-tiny-patch4-window8-256
tags:
- generated_from_trainer
datasets:
- imagefolder
metrics:
- accuracy
model-index:
- name: swinv2-tiny-patch4-window8-256-finetuned-microbes
  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.7051282051282052
---

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

# swinv2-tiny-patch4-window8-256-finetuned-microbes

This model is a fine-tuned version of [microsoft/swinv2-tiny-patch4-window8-256](https://huggingface.co/microsoft/swinv2-tiny-patch4-window8-256) on the imagefolder dataset.
It achieves the following results on the evaluation set:
- Loss: 1.0939
- Accuracy: 0.7051

## 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: 20

### Training results

| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|:-------------:|:-----:|:----:|:---------------:|:--------:|
| 4.1153        | 0.97  | 16   | 3.8048          | 0.1239   |
| 3.2047        | 2.0   | 33   | 2.9123          | 0.2949   |
| 2.6979        | 2.97  | 49   | 2.2162          | 0.4231   |
| 1.9422        | 4.0   | 66   | 1.8476          | 0.5043   |
| 1.5677        | 4.97  | 82   | 1.6194          | 0.5684   |
| 1.3485        | 6.0   | 99   | 1.4825          | 0.5855   |
| 1.146         | 6.97  | 115  | 1.4073          | 0.5983   |
| 1.0408        | 8.0   | 132  | 1.2730          | 0.6325   |
| 0.9334        | 8.97  | 148  | 1.2782          | 0.6282   |
| 0.8702        | 10.0  | 165  | 1.1758          | 0.6752   |
| 0.8589        | 10.97 | 181  | 1.1652          | 0.6838   |
| 0.7607        | 12.0  | 198  | 1.2129          | 0.6795   |
| 0.7676        | 12.97 | 214  | 1.1509          | 0.6795   |
| 0.7359        | 14.0  | 231  | 1.1327          | 0.6966   |
| 0.7491        | 14.97 | 247  | 1.1059          | 0.6966   |
| 0.6664        | 16.0  | 264  | 1.1413          | 0.6923   |
| 0.618         | 16.97 | 280  | 1.0954          | 0.7009   |
| 0.6504        | 18.0  | 297  | 1.1030          | 0.7009   |
| 0.6241        | 18.97 | 313  | 1.0956          | 0.7009   |
| 0.6258        | 19.39 | 320  | 1.0939          | 0.7051   |


### Framework versions

- Transformers 4.32.1
- Pytorch 2.0.1+cpu
- Datasets 2.14.4
- Tokenizers 0.13.3
