🫁 DenseNet-121 (CheXNet) - Multi-Label Chest X-ray Classification (14 Pathologies)

Ce modèle a été entraîné pour la classification multi-label de 14 pathologies thoraciques à partir de radiographies X-ray du dataset ChestX-ray14.

📋 Description

  • Architecture: DenseNet-121 (CheXNet)
  • Tâche: Classification multi-label (14 pathologies)
  • Dataset: NIH Chest X-ray (ChestX-ray14)
  • Framework: PyTorch
  • Image Size: 224×224

📊 Performance Globale

Métrique Valeur
AUC-ROC (macro) 0.7486
AUC-ROC (micro) 0.8219
F1 (macro) 0.0472
mAP 0.1908

Comparaison avec l'article CheXNet

Modèle AUC Macro Δ
CheXNet (article) 0.8414 -
Notre modèle 0.7486 -0.0928

📈 Performance par Pathologie

Pathologie AUROC F1 Support
Atelectasis 0.7216 0.0216 3279
Cardiomegaly 0.8599 0.1680 1069
Effusion 0.7937 0.2974 4658
Infiltration 0.6757 0.0761 6112
Mass 0.7583 0.0747 1748
Nodule 0.6720 0.0061 1623
Pneumonia 0.6577 0.0000 555
Pneumothorax 0.7981 0.0082 2665
Consolidation 0.7023 0.0000 1815
Edema 0.7954 0.0085 925
Emphysema 0.7588 0.0000 1093
Fibrosis 0.7499 0.0000 435
Pleural_Thickening 0.7175 0.0000 1143
Hernia 0.8189 0.0000 86

🏷️ Les 14 Pathologies

ID Pathologie
0 Atelectasis
1 Cardiomegaly
2 Effusion
3 Infiltration
4 Mass
5 Nodule
6 Pneumonia
7 Pneumothorax
8 Consolidation
9 Edema
10 Emphysema
11 Fibrosis
12 Pleural_Thickening
13 Hernia

⚙️ Configuration d'entraînement

{
  "data_variant": "full",
  "batch_size": 16,
  "image_size": 224,
  "num_classes": 14,
  "learning_rate": 0.001,
  "num_epochs": 50,
  "scheduler": "plateau (factor=0.5, patience=5)",
  "optimizer": "Adam (betas=(0.9, 0.999))",
  "loss": "BCEWithLogitsLoss (non pond\u00e9r\u00e9e)"
}

🚀 Utilisation

import torch
from torchvision import transforms
from PIL import Image

# Charger le modèle
# Pour DenseNet-121
import timm

model = timm.create_model(
    'densenet121',
    pretrained=False,
    num_classes=14
)
model.load_state_dict(torch.load('pytorch_model.bin', map_location='cpu'))
model.eval()

# Préprocessing
transform = transforms.Compose([
    transforms.Resize((224, 224)),
    transforms.ToTensor(),
    transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225])
])

# Pathologies
PATHOLOGIES = [
    "Atelectasis", "Cardiomegaly", "Effusion", "Infiltration",
    "Mass", "Nodule", "Pneumonia", "Pneumothorax", "Consolidation",
    "Edema", "Emphysema", "Fibrosis", "Pleural_Thickening", "Hernia"
]

# Prédiction
image = Image.open('chest_xray.png').convert('RGB')
input_tensor = transform(image).unsqueeze(0)

with torch.no_grad():
    logits = model(input_tensor)
    probs = torch.sigmoid(logits)

# Afficher les probabilités
for name, prob in zip(PATHOLOGIES, probs[0]):
    print(f"{name}: {prob:.4f}")

📚 Citation

@inproceedings{Wang_2017,
    title = {ChestX-Ray8: Hospital-Scale Chest X-Ray Database and Benchmarks},
    author = {Wang, Xiaosong and Peng, Yifan and Lu, Le and Lu, Zhiyong and Bagheri, Mohammadhadi and Summers, Ronald M},
    booktitle = {IEEE CVPR},
    year = {2017}
}

@article{rajpurkar2017chexnet,
    title={CheXNet: Radiologist-Level Pneumonia Detection on Chest X-Rays with Deep Learning},
    author={Rajpurkar, Pranav and others},
    journal={arXiv preprint arXiv:1711.05225},
    year={2017}
}

📄 License

MIT License

Downloads last month
10
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train alex17cmbs/chexnet-multilabel-14