How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("image-classification", model="radiovision/Pneumonia-Detection")
pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoImageProcessor, AutoModelForImageClassification

processor = AutoImageProcessor.from_pretrained("radiovision/Pneumonia-Detection")
model = AutoModelForImageClassification.from_pretrained("radiovision/Pneumonia-Detection", device_map="auto")
Quick Links

vit-finetuned-chest-xray-pneumonia

This model is a fine-tuned version of google/vit-base-patch16-224-in21k on the chest-xray-pneumonia dataset. It achieves the following results on the evaluation set:

  • Loss: 0.1271
  • Accuracy: 0.9551

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

Training results

Training Loss Epoch Step Validation Loss Accuracy
No log 1.0 326 0.2739 0.9167
0.2238 2.0 652 0.2892 0.9071
0.2238 3.0 978 0.2077 0.9407
0.1385 4.0 1304 0.1349 0.9535
0.1347 5.0 1630 0.1271 0.9551
0.1347 6.0 1956 0.1458 0.9535
0.1112 7.0 2282 0.2040 0.9375
0.1063 8.0 2608 0.1423 0.9567
0.1063 9.0 2934 0.1473 0.9535
0.0944 10.0 3260 0.1385 0.9583

Example Images

Pneumonia Chest X-Ray

Pneumonia

Normal Chest X-Ray

Normal

Framework versions

  • Transformers 4.17.0
  • Pytorch 1.10.0+cu111
  • Datasets 1.18.4
  • Tokenizers 0.11.6
Downloads last month
8
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support