transformers tensorboard safetensors vit image-classification generated_from_trainer dataset:imagefolder base_model:google/vit-base-patch16-224-in21k license:apache-2.0 model-index autotrain_compatible endpoints_compatible region:us
---
license: apache-2.0
base_model: google/vit-base-patch16-224-in21k
tags:
- generated_from_trainer
datasets:
- imagefolder
metrics:
- accuracy
model-index:
- name: vit-Covid
  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.9847036328871893
---

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

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

## 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: 0.0002
- train_batch_size: 16
- eval_batch_size: 8
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 10
- mixed_precision_training: Native AMP

### Training results

| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|:-------------:|:-----:|:----:|:---------------:|:--------:|
| 0.1283        | 0.38  | 100  | 0.1878          | 0.9484   |
| 0.0312        | 0.76  | 200  | 0.1484          | 0.9560   |
| 0.0655        | 1.15  | 300  | 0.0976          | 0.9713   |
| 0.0587        | 1.53  | 400  | 0.0887          | 0.9713   |
| 0.0106        | 1.91  | 500  | 0.0980          | 0.9732   |
| 0.0137        | 2.29  | 600  | 0.1479          | 0.9618   |
| 0.07          | 2.67  | 700  | 0.0882          | 0.9751   |
| 0.0068        | 3.05  | 800  | 0.1160          | 0.9675   |
| 0.0321        | 3.44  | 900  | 0.0872          | 0.9694   |
| 0.0027        | 3.82  | 1000 | 0.0790          | 0.9809   |
| 0.0041        | 4.2   | 1100 | 0.1029          | 0.9713   |
| 0.0014        | 4.58  | 1200 | 0.0947          | 0.9809   |
| 0.0018        | 4.96  | 1300 | 0.1399          | 0.9713   |
| 0.001         | 5.34  | 1400 | 0.0689          | 0.9847   |
| 0.001         | 5.73  | 1500 | 0.0852          | 0.9790   |
| 0.0008        | 6.11  | 1600 | 0.1111          | 0.9790   |
| 0.0013        | 6.49  | 1700 | 0.0695          | 0.9866   |
| 0.0049        | 6.87  | 1800 | 0.0728          | 0.9885   |
| 0.0007        | 7.25  | 1900 | 0.0963          | 0.9790   |
| 0.0012        | 7.63  | 2000 | 0.0886          | 0.9847   |
| 0.0006        | 8.02  | 2100 | 0.0811          | 0.9847   |
| 0.0015        | 8.4   | 2200 | 0.0796          | 0.9847   |
| 0.0143        | 8.78  | 2300 | 0.0804          | 0.9847   |
| 0.0005        | 9.16  | 2400 | 0.0816          | 0.9847   |
| 0.0006        | 9.54  | 2500 | 0.0811          | 0.9847   |
| 0.0005        | 9.92  | 2600 | 0.0805          | 0.9847   |


### Framework versions

- Transformers 4.38.0.dev0
- Pytorch 2.1.0+cu121
- Datasets 2.16.1
- Tokenizers 0.15.1
