readme: ---
  license: apache-2.0
  tags:
  - generated_from_trainer
  datasets:
  - imagefolder
  metrics:
  - accuracy
  model-index:
  - name: pneumonia-vit
    results:
    - task:
        name: Image Classification
        type: image-classification
      dataset:
        name: imagefolder
        type: imagefolder
        args: default
      metrics:
      - name: Accuracy
        type: accuracy
        value: 0.9503205128205128
  ---
  
  <!-- 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. -->
  
  # pneumonia-vit
  
  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.1305
  - Accuracy: 0.9503
  
  ## 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: 2e-05
  - train_batch_size: 32
  - eval_batch_size: 64
  - seed: 42
  - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  - lr_scheduler_type: linear
  - num_epochs: 10
  
  ### Training results
  
  | Training Loss | Epoch | Step | Validation Loss | Accuracy |
  |:-------------:|:-----:|:----:|:---------------:|:--------:|
  | No log        | 1.0   | 163  | 0.2303          | 0.9071   |
  | No log        | 2.0   | 326  | 0.1758          | 0.9423   |
  | No log        | 3.0   | 489  | 0.1801          | 0.9391   |
  | 0.1999        | 4.0   | 652  | 0.1729          | 0.9343   |
  | 0.1999        | 5.0   | 815  | 0.1744          | 0.9407   |
  | 0.1999        | 6.0   | 978  | 0.1677          | 0.9423   |
  | 0.1208        | 7.0   | 1141 | 0.1640          | 0.9455   |
  | 0.1208        | 8.0   | 1304 | 0.1366          | 0.9487   |
  | 0.1208        | 9.0   | 1467 | 0.1284          | 0.9519   |
  | 0.1005        | 10.0  | 1630 | 0.1305          | 0.9503   |
  
  
  ### Framework versions
  
  - Transformers 4.20.1
  - Pytorch 1.12.0+cu116
  - Datasets 2.3.2
  - Tokenizers 0.12.1
  