Skip to content

samir650/Pneumonia-Detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿฉบ Pneumonia Detection using Deep Learning

๐Ÿ“Œ Introduction

Pneumonia is an inflammatory condition of the lungs affecting the small air sacs known as alveoli. Symptoms typically include cough, chest pain, fever, and difficulty breathing. The severity varies, and the condition is often diagnosed using chest X-rays, blood tests, and sputum cultures.

This project utilizes deep learning techniques to classify chest X-ray images as either normal or pneumonia-affected using Convolutional Neural Networks (CNNs).

๐Ÿ“‚ Dataset

The dataset consists of chest X-ray images categorized into two classes:

  • โœ… Normal: X-ray images of healthy individuals
  • โŒ Pneumonia: X-ray images showing pneumonia infection

The dataset is preprocessed using image augmentation techniques to improve model generalization.

๐Ÿ”ง Dependencies and Installation

To run this project, install the required dependencies:

pip install numpy pandas matplotlib seaborn keras tensorflow scikit-learn

๐Ÿ— Model Architecture

The deep learning model used is a CNN built using Keras with TensorFlow as the backend. The architecture consists of:

  • ๐Ÿงฉ Convolutional layers with ReLU activation
  • ๐Ÿ” Max-pooling layers
  • โš™๏ธ Batch normalization
  • ๐Ÿ”— Fully connected dense layers
  • ๐Ÿš€ Dropout for regularization

๐ŸŽฏ Training Process

The model is trained using:

  • Loss Function: Categorical Crossentropy
  • Optimizer: Adam
  • Evaluation Metrics: Accuracy and loss

The dataset is split into training, validation, and testing sets. Image augmentation is applied to improve performance.

๐Ÿ“Š Evaluation Metrics

The model is evaluated using:

  • ๐Ÿ“ˆ Accuracy
  • ๐Ÿ“‰ Precision
  • ๐ŸŽฏ Recall
  • ๐Ÿ† F1 Score
  • ๐Ÿงฎ Confusion Matrix

๐Ÿ›  Usage

To run the model, execute the Jupyter Notebook file:

jupyter notebook pneumonia_detection.ipynb

Ensure the dataset is correctly placed in the directory specified in the notebook.

๐Ÿ“ธ Results and Visualization

The notebook includes:

  • ๐Ÿ“Š Model training and validation accuracy plots
  • ๐Ÿ“‘ Confusion matrix visualization
  • ๐Ÿ” Sample predictions with actual vs. predicted labels

๐Ÿค Contributors and Acknowledgments

This project was inspired by medical imaging research and Kaggle datasets. Contributions from deep learning enthusiasts and healthcare professionals helped refine the model.

About

Deep Learning model to detect pneumonia from chest X-ray images

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors