Chest X-Ray Classification Model (🦠)

πŸ“‹ Overview

This project focuses on building and evaluating a Convolutional Neural Network (CNN) model for classifying chest X-ray images into four categories:

  • Normal
  • Pneumonia
  • Lung Opacity
  • COVID-19

The model was trained using masked chest X-ray images (lungs only) to enhance focus on medically relevant areas.

βΈ»

🧠 Model Architecture

The CNN model includes:

  • Input size: (256, 256, 1) RGB masked lung images
  • Convolutional blocks: Conv2D(32) β†’ Conv2D(64) β†’ Conv2D(128) β†’ Conv2D(256) β†’ Conv2D(512)
  • ASPP Block: Atrous Spatial Pyramid Pooling (ASPP) to capture multi-scale features.
  • Attention Block: Squeeze-and-Excitation (SE Block) applied after key stages.
  • Pooling Layers: Global Average Pooling 2D
  • Custom Loss function: Focuses more on hard examples and less on easy one.
  • Classifier Head: Dense β†’ Softmax for multiclass classification (4 classes)

Additional techniques used:

  • Data Augmentation: Random flipping, rotation (range from 0 to 10 degrees)
  • Dropout: Regularization to prevent overfitting (20%)
  • EarlyStopping & ReduceLROnPlateau: For efficient training

πŸ“Š Metrics

Final evaluation results:

Metric Score
Accuracy ~93%
Precision ~92%
Recall ~92%
F1-Score ~92%

Note:

  • The dataset was balanced manually into training and validation datasets (80%/20%)
  • Grad-CAM visualization was used to verify model attention inside the lungs.
  • The model is still being improved for higher F1 scores.

πŸ—ƒ Dataset

πŸš€ Future Work

  • Fine-tuning with different loss functions
  • Model ensembling
  • Clinical-grade evaluation with external datasets
Downloads last month
2
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for rehabaam/ds-cxr-covid19

Unable to build the model tree, the base model loops to the model itself. Learn more.