Downloads · 30 days
0
mdsajjadullah/chest-xray-pneumonia-resnet50
chest-xray-pneumonia-resnet50 is a image classification model from mdsajjadullah. Use it when you need a label for an image. The card lists the license as mit.
Downloads · 30 days
0
Access
Public
Updated Jun 1, 2026
Repo size
94.4 MB
Likes
0
Public
Click a slice to open those files.
.pth94.4 MB · 100%
From the Hugging Face model README
Author: Md. Sajjad Ullah
Fine-tuned ResNet-50 for binary chest X-ray classification (NORMAL vs PNEUMONIA). Trained on 5,216 images with weighted sampling to handle class imbalance (1:2.9 ratio).
| Metric | Score |
|---|---|
| Accuracy | 91.83% |
| ROC-AUC | 96.50% |
| Recall (Pneumonia) | 98.21% |
| F1-Score | 93.76% |
import torch
from torchvision.models import resnet50
CLASS_NAMES = ['NORMAL', 'PNEUMONIA']
model = resnet50()
model.fc = torch.nn.Sequential(
torch.nn.Dropout(0.4),
torch.nn.Linear(2048, 2)
)
model.load_state_dict(
torch.load("best_ResNet-50_.pth", map_location="cpu")
)
model.eval()
Chest X-Ray Images (Pneumonia) — Paul Mooney / Kaggle
https://www.kaggle.com/datasets/mdsajjadullah/chest-x-ray-pneumonia-classification