chest-xray-classifier
Production-grade 3-class chest X-ray classifier: normal vs bacterial pneumonia vs viral pneumonia.
Metrics
| Metric | Value |
|---|---|
| auroc_macro_ovr | 0.9752638346619307 |
| accuracy | 0.9134615384615384 |
| macro_f1 | 0.9029730638714358 |
Usage
from transformers import AutoImageProcessor, AutoModelForImageClassification
import torch
from PIL import Image
processor = AutoImageProcessor.from_pretrained("kiselyovd/chest-xray-classifier")
model = AutoModelForImageClassification.from_pretrained("kiselyovd/chest-xray-classifier")
image = Image.open("your_image.png")
inputs = processor(images=image, return_tensors="pt")
with torch.no_grad():
logits = model(**inputs).logits
predicted_class = logits.argmax(-1).item()
print(model.config.id2label[predicted_class])
Training Data
Trained on Chest X-Ray Images (Pneumonia).
Source Code
Intended Use
This model is provided for research and educational purposes. The authors make no warranties about its suitability for any particular application. Users are responsible for evaluating the model's fitness for their use case, including fairness, safety, and compliance with applicable regulations.
Note: This model card was generated from the ml-project-template scaffold.
- Downloads last month
- 73
Model tree for kiselyovd/chest-xray-classifier
Base model
facebook/convnextv2-tiny-22k-224Dataset used to train kiselyovd/chest-xray-classifier
Evaluation results
- auroc_macro_ovr on Chest X-Ray Images (Pneumonia)self-reported0.975
- accuracy on Chest X-Ray Images (Pneumonia)self-reported0.913
- macro_f1 on Chest X-Ray Images (Pneumonia)self-reported0.903