--- license: apache-2.0 base_model: google/vit-base-patch16-224-in21k tags: - generated_from_trainer datasets: - chestxrayclassification metrics: - accuracy model-index: - name: pneumonia-classification-model results: - task: name: Image Classification type: image-classification dataset: name: chestxrayclassification type: chestxrayclassification config: full split: train args: full metrics: - name: Accuracy type: accuracy value: 0.9656862745098039 --- # pneumonia-classification-model 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 chestxrayclassification dataset. It achieves the following results on the evaluation set: - Loss: 0.1143 - Accuracy: 0.9657 ## 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: 32 ### Training results | Training Loss | Epoch | Step | Validation Loss | Accuracy | |:-------------:|:-----:|:----:|:---------------:|:--------:| | 0.6297 | 0.98 | 25 | 0.5258 | 0.7230 | | 0.3781 | 2.0 | 51 | 0.3011 | 0.9154 | | 0.2268 | 2.98 | 76 | 0.1981 | 0.9314 | | 0.1827 | 4.0 | 102 | 0.1602 | 0.9473 | | 0.1765 | 4.98 | 127 | 0.1446 | 0.9461 | | 0.1508 | 6.0 | 153 | 0.1449 | 0.9510 | | 0.1332 | 6.98 | 178 | 0.1510 | 0.9375 | | 0.1187 | 8.0 | 204 | 0.1169 | 0.9596 | | 0.131 | 8.98 | 229 | 0.1315 | 0.9559 | | 0.1043 | 10.0 | 255 | 0.1114 | 0.9571 | | 0.1022 | 10.98 | 280 | 0.1633 | 0.9375 | | 0.0893 | 12.0 | 306 | 0.1167 | 0.9596 | | 0.0848 | 12.98 | 331 | 0.0936 | 0.9694 | | 0.0885 | 14.0 | 357 | 0.1074 | 0.9608 | | 0.0928 | 14.98 | 382 | 0.1052 | 0.9645 | | 0.0776 | 16.0 | 408 | 0.1116 | 0.9608 | | 0.0895 | 16.98 | 433 | 0.1060 | 0.9645 | | 0.0817 | 18.0 | 459 | 0.1107 | 0.9632 | | 0.0766 | 18.98 | 484 | 0.0993 | 0.9669 | | 0.0697 | 20.0 | 510 | 0.0938 | 0.9681 | | 0.0626 | 20.98 | 535 | 0.1199 | 0.9620 | | 0.0665 | 22.0 | 561 | 0.1100 | 0.9657 | | 0.0613 | 22.98 | 586 | 0.1246 | 0.9620 | | 0.054 | 24.0 | 612 | 0.1066 | 0.9645 | | 0.0474 | 24.98 | 637 | 0.1100 | 0.9669 | | 0.0456 | 26.0 | 663 | 0.1118 | 0.9645 | | 0.0473 | 26.98 | 688 | 0.1137 | 0.9645 | | 0.0543 | 28.0 | 714 | 0.0955 | 0.9632 | | 0.0493 | 28.98 | 739 | 0.1300 | 0.9559 | | 0.043 | 30.0 | 765 | 0.1229 | 0.9669 | | 0.039 | 30.98 | 790 | 0.1125 | 0.9608 | | 0.0398 | 31.37 | 800 | 0.1143 | 0.9657 | ### Framework versions - Transformers 4.38.1 - Pytorch 2.1.2 - Datasets 2.1.0 - Tokenizers 0.15.2