🩻 Built by an Ex-Surgeon turned ML Engineer
A simple yet powerful deep learning model for detecting pneumonia from chest X-ray images.
Left: Normal lungs | Right: Pneumonia with consolidation (source: educational medical video)
This is the first version (baseline) of PneumoScan – a binary classification model that distinguishes NORMAL from PNEUMONIA in chest X-rays.
- Dataset: Kaggle Chest X-Ray Images (Pneumonia) – ~5,863 images
- Model: Pretrained EfficientNet-B0 (transfer learning)
- Achieved Test Accuracy: 94.71% on hold-out test set
- Precision/Recall/F1 strong for pneumonia class (critical for clinical use)
As a former surgeon (with experience in thoracic cases), 10+ years mobile developer (Android/iOS), and self-taught ML engineer (TensorFlow Certified), I built this to create clinically relevant AI tools.
- Test Accuracy: 0.9471 (94.71%)
- Classification Report:
Here is the confusion matrix from the test set:
Similar pattern to our model: High recall for Pneumonia, low false negatives
More sample X-ray comparisons:
Clear visual difference: Pneumonia shows opacities/consolidation
- Framework: PyTorch 2.0+
- Model: torchvision.models.efficientnet_b0 (pretrained on ImageNet)
- Data: torchvision.datasets.ImageFolder + transforms
- Optimizer: AdamW (lr=3e-4, weight decay=1e-4)
- Scheduler: CosineAnnealingLR
- Evaluation: sklearn (classification_report, confusion_matrix), seaborn/matplotlib
- Training: 12 epochs on GPU (~15-25 min)
- Source: Kaggle – Chest X-Ray Images (Pneumonia)
- Structure: train/val/test folders with NORMAL and PNEUMONIA subfolders
- Classes: ['NORMAL', 'PNEUMONIA']


