Skip to content

About

🫁 Medical image AI β€” Pneumonia detection via deep learning & CNN on chest X-rays

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

7 Commits

Folders and files

Repository files navigation

🌐 Live Demo

Hugging Face Spaces


🩺 Pneumonia Detection from Chest X-Rays

A deep learning project that leverages Convolutional Neural Networks (CNNs) to automatically detect Pneumonia from chest X-ray images. Our model is trained on a publicly available dataset and achieves an impressive 97.12% accuracy on the test set.


πŸš€ Features

βœ… Preprocessing and augmentation of X-ray images βœ… Convolutional Neural Network (CNN) for classification βœ… Achieved 97.12% accuracy on test dataset βœ… Training & evaluation pipeline included βœ… Works on Google Colab and local environments


πŸ“Š Dataset

  • Chest X-ray images (Normal vs Pneumonia)
  • Preprocessing applied: resizing, normalization, and data augmentation (flip, rotation, zoom, etc.)
  • Balanced dataset for robust training

πŸ—οΈ Model Architecture

  • Input Layer β†’ Preprocessed chest X-ray images
  • Convolutional + Pooling Layers β†’ Feature extraction
  • Fully Connected Layers β†’ Classification
  • Output Layer β†’ Binary prediction: Normal βœ… or Pneumonia ⚠️

πŸ“ˆ Results

  • Accuracy: 97.12%
  • Evaluation Metrics: Loss curve & Accuracy curve (visualized in the notebook)

πŸ“· Example Predictions

Image Prediction
Normal Chest X-ray βœ… Normal
Pneumonia Chest X-ray ⚠️ Pneumonia

⚑ How to Run

πŸ”Ή On Google Colab

  1. Open the notebook in Google Colab
  2. Upload dataset or mount Google Drive
  3. Run all cells to train & test the model

πŸ”Ή On Local Machine

# Clone this repository
git clone https://github.com/Aan9758/pneumonia-detection.git

# Navigate to project folder
cd pneumonia-detection

# Install dependencies
pip install -r requirements.txt

# Run the notebook / script
jupyter notebook pneumonia_detection.ipynb

πŸ› οΈ Tech Stack

  • Python 🐍
  • TensorFlow / Keras πŸ€–
  • OpenCV πŸ”
  • Matplotlib / Seaborn πŸ“Š

πŸ“Œ Future Improvements

  • Deploy model as a web app / mobile app
  • Use transfer learning with pretrained CNNs (ResNet, VGG16, EfficientNet)
  • Expand dataset for higher generalization

🀝 Contributing

Contributions are welcome! Feel free to fork this repo and submit a pull request.


πŸ“œ License

This project is licensed under the MIT License – you’re free to use, modify, and distribute.


About

🫁 Medical image AI β€” Pneumonia detection via deep learning & CNN on chest X-rays

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages