COVID-19 Diagnosis via Chest X-Ray

Category:

Healthcare

Skills:

Tensorflow,Transfer Learning,Model Optimization

Problem Context

This project explored whether deep learning could assist in detecting COVID-19 from chest X-ray images. While chest imaging cannot replace medical gold standards like RT-PCR, the project’s aim was to practice end-to-end model building, evaluation, and interpretation using real medical data.

Collection

I used publicly available chest X-ray datasets (~5,000+ images) that included COVID-19, pneumonia, and normal cases.

  • Datasets combined from open sources and Kaggle.

  • Labels verified from dataset metadata.

Preparation

I standardized and augmented the images for training.

  • Resized to 224×224, normalized pixel values.

  • Augmentations: rotation, flips, brightness shifts for generalization.

  • Split into train/validation/test sets (70/15/15).


Baseline

A simple CNN was trained to set expectations.

  • Accuracy ~88% on validation set.

  • Provided a benchmark before trying transfer learning.

Modeling

I applied transfer learning using ResNet50 and DenseNet121.

  • Fine-tuned pretrained weights on the chest X-ray dataset.

  • Best model (ResNet50) achieved ~94–95% accuracy.

  • Grad-CAM heatmaps showed the model focusing on lung regions.

Evaluation

Used standard metrics to assess classification performance.

  • Accuracy ~95%, Precision ~94%, Recall ~95%, F1-score ~95%

  • Confusion matrices revealed most misclassifications occurred between COVID and pneumonia cases.

  • ROC-AUC ~0.98 indicated strong separability.

Refinement

I optimized the model for efficiency and interpretation.

  • Balanced class weights to handle uneven samples.

  • Simplified architecture for faster inference (~30ms per image on CPU).

Conclusion

The project demonstrated how deep learning can be applied to medical imaging. The final transfer learning model (ResNet50) achieved ~95% accuracy on the dataset and produced meaningful heatmaps for interpretation. While not clinically deployable, the project showed understanding of the ML pipeline—from dataset preparation to model evaluation and reflection on limitations.

Do you have any project idea you want to discuss about?