Skip to content

azhKING69/Pneumonia-Classifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 

Repository files navigation

🫁 Pneumonia Detection from Chest X-Ray Images using Transfer Learning


🧠 Project Domain

Category Description
Domain Computer Vision, Machine Learning
Subdomain Deep Learning, Image Classification
Techniques CNN, Transfer Learning (InceptionV3, ImageNet)
Application Medical Imaging, Disease Diagnosis, Radiology

πŸ“„ Project Description

This project aims to detect Pneumonia from chest X-ray images using both a custom-built Convolutional Neural Network (CNN) and a fine-tuned InceptionV3 model.

  • Utilized a dataset of 5,856 labeled X-ray images (1.15 GB) categorized into two classes: Pneumonia and Normal.
  • For transfer learning:
    • Removed the top layers of the pre-trained InceptionV3 model.
    • Froze the early convolutional blocks.
    • Fine-tuned deeper layers on the new dataset.
  • The custom CNN achieved:
    • Accuracy: 89.53% on test set
    • Loss: 0.41

πŸ”§ Tools & Libraries

Category Tools / Libraries
Language Python
Environment Anaconda
Libraries Keras, TensorFlow, InceptionV3, ImageNet

🧾 Dataset Details

Dataset Name: Chest X-Ray Images (Pneumonia)

πŸ§ͺ Dataset Breakdown

Set Images Size
Training 5,216 ~1.07 GB
Validation 320 ~42.8 MB
Testing 320 ~35.4 MB
Total 5,856 ~1.15 GB
  • Number of Classes: 2 (Pneumonia, Normal)

πŸ› οΈ Model Architectures

πŸ”¬ Custom Deep Convolutional Neural Network

  • Batch Size: 64
  • Epochs: 30
  • Training Time: ~2 Hours
  • Optimizer: Adam
  • Loss Function: Categorical Crossentropy

πŸ— Transfer Learning with InceptionV3

  • Base model pre-trained on ImageNet.
  • Top layers removed and replaced with custom dense layers.
  • Lower layers frozen; deeper layers fine-tuned for medical image specificity.

πŸ“Š Evaluation Metrics (Test Set)

Metric Value
Accuracy (F1) 89.53%
Loss 0.41
Precision 88.37%
Recall (Pneumonia) 95.48%

πŸ” The high recall for Pneumonia ensures minimal false negatives β€” a critical requirement in medical diagnostics.


βœ… Summary

This project highlights the effectiveness of deep learning in medical imaging, especially in life-critical applications like pneumonia detection. While the custom CNN provided strong baseline results, transfer learning with InceptionV3 further accelerated model convergence and enhanced generalization.


About

Fine-tuned InceptionV3 CNN on 5,856 chest X-rays to classify pneumonia versus normal .

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors