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

GitHub Repository

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
75
Safetensors
Model size
27.9M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for kiselyovd/chest-xray-classifier

Finetuned
(7)
this model

Dataset used to train kiselyovd/chest-xray-classifier

Evaluation results