AI-Powered Chest X-ray Pathology Detection

An advanced deep learning system that simultaneously detects 14 thoracic pathologies from chest X-ray images. Using transfer learning with DenseNet121 on 5,000 medical images, this model provides automated screening assistance to accelerate diagnosis in emergency departments and extend diagnostic capabilities to resource-limited settings.

January 2026
PyTorch, DenseNet121, GradCAM
Deep Learning Computer Vision Transfer Learning Multi-Label Classification Medical AI Model Interpretability Class Imbalance

Key Results

14
Pathologies Detected
3K+
Training Images
74.04%
Mean AUC-ROC
GradCAM
Model Interpretability

Problem Statement

Chest X-rays are one of the most common diagnostic imaging procedures worldwide, with millions performed annually. However, accurate interpretation requires specialized expertise, is time-intensive, and prone to inter-observer variability. In emergency departments and resource-limited settings, delays in diagnosis can lead to adverse patient outcomes, while high-volume screening programs struggle with throughput and quality consistency.

The Objective: Develop an AI model capable of automatically of detecting 14 thoracic pathologies from chest X-ray images, providing rapid screening assistance to radiologists while maintaining interpretability and clinical significance.

Clinical Impact: Automated pathology detection can accelerate screening and triage, reduce missed findings, provide second opinions to improve diagnostic accuracy, and enhance educational training for pattern recognition.

Target Pathologies (Multi-Label Classification)

Each X-ray image can have multiple co-occurring conditions, reflecting real clinical scenarios:

Technical Challenges

Methodology

This project implements a comprehensive deep learning pipeline optimized for medical image classification. The methodology prioritizes both model performance and clinical interpretability, employing state-of-the-art techniques to handle class imbalance and ensure robust generalization.

Results & Key Findings

Transfer Learning Success: Pretrained DenseNet121 weights from ImageNet effectively transferred to chest X-ray classification despite significant domain differences. The model learned to recognize complex pathological patterns without training from scratch, validating transfer learning as a powerful technique for medical AI with limited labeled data. Fine-tuning enabled adaptation of natural image features to clinical patterns, achieving convergence within reasonable computational resources.

Critical Discovery - Artifact Learning: GradCAM interpretability analysis uncovered a fundamental limitation. Visualizations showed the model frequently focusing on image borders and non-anatomical artifacts (patient IDs, markers, edge effects) rather than disease regions. While achieving reasonable validation metrics, the model may have learned spurious correlations that could fail when deployed in different clinical environments. This highlights the critical importance of interpretability tools before clinical deployment.

Model Performance Analysis

Overall Performance Metrics:
Metric Validation Test Difference Interpretation
Mean AUC-ROC 0.7299 0.7404 +0.0105 Fair discriminative ability - model fairly distinguishes between positive and negative cases. Difference < 0.02 indicates strong generalization with no overfitting.
Mean Average Precision 0.1477 0.1419 -0.0058 Robust performance on imbalanced classes - AP emphasizes rare disease detection. Stable validation-test performance confirms model reliability given severe class imbalance.
Mean F1-Score 0.1685 0.1701 +0.0016 Reflects precision-recall balance at 0.5 threshold. Consistent across validation and test sets, demonstrating stable classification performance.

✓ Overall Assessment: Test performance ≥ validation across primary metrics with differences < 0.02 = excellent generalization, no overfitting. Model successfully transfers learning from validation to unseen test data.

Per-Disease Performance Breakdown

Best Performing Diseases (Test AUC-ROC):

Worst Performing Diseases (Test AUC-ROC):

Most Stable Performance (Smallest Val-Test Difference):

Limitations & Deployment Considerations

Recommendations for Future Improvement

1. Address Artifact Learning (Critical Priority)

2. External Validation on Independent Datasets

Technical Skills Demonstrated

This project showcases advanced deep learning and medical AI capabilities from data preprocessing through model interpretability.

PyTorch Deep Learning Transfer Learning DenseNet Architecture Multi-Label Classification Class Imbalance Handling Weighted Loss Functions Stratified Splitting GradCAM Visualization Model Interpretability Medical Image Processing AUC-ROC Analysis Precision-Recall Curves NumPy Pandas scikit-learn Data Augmentation

Explore the Full Project

Dive into the complete analysis, code, training pipeline, and GradCAM visualizations