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

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.5534
- Accuracy: 0.7433
- Precision: 0.7306
- Recall: 0.7433
- F1 Score: 0.7344

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

### Training results

| Training Loss | Epoch | Step | Validation Loss | Accuracy | Precision | Recall | F1 Score |
|:-------------:|:-----:|:----:|:---------------:|:--------:|:---------:|:------:|:--------:|
| No log        | 1.0   | 4    | 0.7306          | 0.4      | 0.6521    | 0.4    | 0.3821   |
| No log        | 2.0   | 8    | 0.5815          | 0.7333   | 0.8050    | 0.7333 | 0.6286   |
| No log        | 3.0   | 12   | 0.5700          | 0.725    | 0.5256    | 0.725  | 0.6094   |
| No log        | 4.0   | 16   | 0.5635          | 0.725    | 0.5256    | 0.725  | 0.6094   |
| No log        | 5.0   | 20   | 0.5509          | 0.7292   | 0.8028    | 0.7292 | 0.6191   |
| No log        | 6.0   | 24   | 0.5356          | 0.7417   | 0.7438    | 0.7417 | 0.6589   |
| No log        | 7.0   | 28   | 0.5353          | 0.75     | 0.7360    | 0.75   | 0.6895   |
| No log        | 8.0   | 32   | 0.5299          | 0.7375   | 0.7090    | 0.7375 | 0.6668   |
| No log        | 9.0   | 36   | 0.5335          | 0.7667   | 0.7509    | 0.7667 | 0.7310   |
| No log        | 10.0  | 40   | 0.5344          | 0.7417   | 0.7315    | 0.7417 | 0.6644   |
| No log        | 11.0  | 44   | 0.5297          | 0.7458   | 0.7279    | 0.7458 | 0.6821   |
| No log        | 12.0  | 48   | 0.5202          | 0.75     | 0.7360    | 0.75   | 0.6895   |
| 0.5942        | 13.0  | 52   | 0.5325          | 0.7542   | 0.7411    | 0.7542 | 0.7452   |
| 0.5942        | 14.0  | 56   | 0.5139          | 0.7583   | 0.7505    | 0.7583 | 0.7039   |
| 0.5942        | 15.0  | 60   | 0.5528          | 0.7417   | 0.7347    | 0.7417 | 0.7377   |
| 0.5942        | 16.0  | 64   | 0.5070          | 0.7625   | 0.7437    | 0.7625 | 0.7277   |
| 0.5942        | 17.0  | 68   | 0.5193          | 0.775    | 0.7594    | 0.775  | 0.7592   |
| 0.5942        | 18.0  | 72   | 0.5090          | 0.7583   | 0.7448    | 0.7583 | 0.7487   |
| 0.5942        | 19.0  | 76   | 0.5189          | 0.7792   | 0.7847    | 0.7792 | 0.7816   |
| 0.5942        | 20.0  | 80   | 0.5214          | 0.775    | 0.7795    | 0.775  | 0.7770   |
| 0.5942        | 21.0  | 84   | 0.5188          | 0.775    | 0.7710    | 0.775  | 0.7728   |
| 0.5942        | 22.0  | 88   | 0.5029          | 0.7667   | 0.7526    | 0.7667 | 0.7557   |
| 0.5942        | 23.0  | 92   | 0.5061          | 0.7833   | 0.7734    | 0.7833 | 0.7761   |
| 0.5942        | 24.0  | 96   | 0.5350          | 0.7667   | 0.7713    | 0.7667 | 0.7687   |
| 0.4829        | 25.0  | 100  | 0.5149          | 0.7542   | 0.7330    | 0.7542 | 0.7337   |
| 0.4829        | 26.0  | 104  | 0.5283          | 0.7583   | 0.7737    | 0.7583 | 0.7641   |
| 0.4829        | 27.0  | 108  | 0.5109          | 0.7792   | 0.7647    | 0.7792 | 0.7646   |
| 0.4829        | 28.0  | 112  | 0.5258          | 0.775    | 0.7729    | 0.775  | 0.7739   |
| 0.4829        | 29.0  | 116  | 0.5207          | 0.7625   | 0.745     | 0.7625 | 0.7468   |
| 0.4829        | 30.0  | 120  | 0.5306          | 0.75     | 0.7357    | 0.75   | 0.7400   |
| 0.4829        | 31.0  | 124  | 0.5455          | 0.75     | 0.7375    | 0.75   | 0.7417   |
| 0.4829        | 32.0  | 128  | 0.5653          | 0.7458   | 0.7380    | 0.7458 | 0.7412   |
| 0.4829        | 33.0  | 132  | 0.5565          | 0.7417   | 0.7212    | 0.7417 | 0.7256   |
| 0.4829        | 34.0  | 136  | 0.5468          | 0.7708   | 0.7658    | 0.7708 | 0.7679   |
| 0.4829        | 35.0  | 140  | 0.5268          | 0.7833   | 0.7723    | 0.7833 | 0.7747   |
| 0.4829        | 36.0  | 144  | 0.5260          | 0.775    | 0.7710    | 0.775  | 0.7728   |
| 0.4829        | 37.0  | 148  | 0.5281          | 0.775    | 0.7659    | 0.775  | 0.7689   |
| 0.3846        | 38.0  | 152  | 0.5385          | 0.7708   | 0.7742    | 0.7708 | 0.7724   |
| 0.3846        | 39.0  | 156  | 0.5253          | 0.7708   | 0.7623    | 0.7708 | 0.7653   |
| 0.3846        | 40.0  | 160  | 0.5319          | 0.7708   | 0.7719    | 0.7708 | 0.7714   |
| 0.3846        | 41.0  | 164  | 0.5311          | 0.775    | 0.7631    | 0.775  | 0.7660   |
| 0.3846        | 42.0  | 168  | 0.5325          | 0.7792   | 0.7683    | 0.7792 | 0.7711   |
| 0.3846        | 43.0  | 172  | 0.5254          | 0.7667   | 0.7606    | 0.7667 | 0.7631   |
| 0.3846        | 44.0  | 176  | 0.5232          | 0.7708   | 0.7623    | 0.7708 | 0.7653   |
| 0.3846        | 45.0  | 180  | 0.5291          | 0.7708   | 0.7640    | 0.7708 | 0.7667   |
| 0.3846        | 46.0  | 184  | 0.5356          | 0.7708   | 0.7607    | 0.7708 | 0.7639   |
| 0.3846        | 47.0  | 188  | 0.5400          | 0.7708   | 0.7607    | 0.7708 | 0.7639   |
| 0.3846        | 48.0  | 192  | 0.5409          | 0.7667   | 0.7540    | 0.7667 | 0.7573   |
| 0.3846        | 49.0  | 196  | 0.5403          | 0.7667   | 0.7540    | 0.7667 | 0.7573   |
| 0.3353        | 50.0  | 200  | 0.5397          | 0.7708   | 0.7592    | 0.7708 | 0.7624   |


### Framework versions

- Transformers 4.33.3
- Pytorch 2.0.1+cu118
- Datasets 2.14.5
- Tokenizers 0.13.3

normal abnormal