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

# vit-xray-pneumonia-classification

This model is a fine-tuned version of [google/vit-base-patch16-224-in21k](https://huggingface.co/google/vit-base-patch16-224-in21k) on an unknown dataset.
It achieves the following results on the evaluation set:
- Loss: 0.1222
- Accuracy: 0.9614

## 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: 16
- eval_batch_size: 16
- seed: 42
- gradient_accumulation_steps: 4
- total_train_batch_size: 64
- 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: 15
- mixed_precision_training: Native AMP

### Training results

| Training Loss | Epoch  | Step | Validation Loss | Accuracy |
|:-------------:|:------:|:----:|:---------------:|:--------:|
| 0.073         | 0.9882 | 63   | 0.1030          | 0.9639   |
| 0.0719        | 1.9882 | 126  | 0.1485          | 0.9519   |
| 0.0813        | 2.9882 | 189  | 0.1420          | 0.9494   |
| 0.0602        | 3.9882 | 252  | 0.0957          | 0.9674   |
| 0.0688        | 4.9882 | 315  | 0.1031          | 0.9665   |
| 0.0664        | 5.9882 | 378  | 0.1075          | 0.9657   |
| 0.0525        | 6.9882 | 441  | 0.1222          | 0.9614   |


### Framework versions

- Transformers 4.48.3
- Pytorch 2.5.1+cu124
- Datasets 3.3.1
- Tokenizers 0.21.0

normal pneumonia