All projects

AI & data

Pneumonia detection from chest X-rays

A ResNet50 transfer-learning model that classifies pediatric chest X-rays as normal or pneumonia, followed by a critical audit of my own model and a reproducible pipeline.

  • Individual project
baseline ROC AUC
0.868
pneumonia recall (baseline)
0.95
weaknesses found and fixed
4
X-ray images
5,856

01Starting point

Context & mission

The problem

On medical images, a good score is not enough: you need to know what it really measures, especially when classes are imbalanced and a false negative is costly.

The mission

Classify the 5,856 X-rays of the Kermany dataset, then audit and rebuild my own work.

My role

Done on my own: model, audit, rebuild as a package and documentation.

02Execution

What I did

  1. Baseline

    An ImageNet-pretrained ResNet50, frozen, with a classification head: 0.868 ROC AUC and 0.95 pneumonia recall.

  2. Baseline audit

    Four weaknesses found: a 16-image validation set, a 1:2.9 class imbalance, mismatched ResNet50 preprocessing, and a fine-tuning phase that never ran.

  3. Rebuild

    A command-line Python package (train, evaluate, predict): seeded validation split, class weights, ResNet50’s own preprocessing, two-phase fine-tuning.

  4. Traceability

    AUC, precision and recall tracking, saved metrics and plots, and a model card.

03Design

Architecture

Two stages: a baseline notebook on Google Colab (GPU), then a command-line Python package that makes every step reproducible, from training to prediction.

From baseline to reproducible pipeline
  1. Kermany5,856 X-rays
  2. BaselineFrozen ResNet50
  3. Audit4 weaknesses
  4. CLI packagetrain · evaluate · predict
  5. Model cardMetrics · plots

04Impact

Results

  • Baseline: 0.868 ROC AUC and 0.95 pneumonia recall on the 624 test images.
  • Four baseline flaws identified and fixed in the rebuild.
  • A reproducible command-line pipeline, documented with a model card.

05Wrap-up

Takeaways

What this project proves

That I can critique my own model, fix what skews the results, and ship a reproducible pipeline instead of a one-off notebook.

06Technology

Full stack

  • Python
  • TensorFlow
  • Keras
  • ResNet50
  • scikit-learn
  • NumPy
  • pandas
  • Matplotlib
  • Google Colab