https://github.com/bennourines/pneumonia-detection-cnn
CNN model for pneumonia detection from chest X-ray images, fine-tuned with ResNet50 and achieving 94% accuracy on ChestX-ray dataset.
https://github.com/bennourines/pneumonia-detection-cnn
cnn computer-vision deep-learning image-classification machine-learning resnet-50 tensorflow
Last synced: 20 days ago
JSON representation
CNN model for pneumonia detection from chest X-ray images, fine-tuned with ResNet50 and achieving 94% accuracy on ChestX-ray dataset.
- Host: GitHub
- URL: https://github.com/bennourines/pneumonia-detection-cnn
- Owner: bennourines
- Created: 2025-11-12T01:37:33.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-11-12T01:41:32.000Z (8 months ago)
- Last Synced: 2025-11-12T03:19:58.248Z (8 months ago)
- Topics: cnn, computer-vision, deep-learning, image-classification, machine-learning, resnet-50, tensorflow
- Language: Jupyter Notebook
- Homepage:
- Size: 3.32 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# π©Ί Pneumonia Detection from Chest X-Ray Images
### π Project β ESPRIT (2024)
**Author:** Inès Bennour
**Institution:** ESPRIT, Tunisia
**Year:** 2024
---
## π§ Project Overview
This project focuses on building a **Convolutional Neural Network (CNN)** for the **automatic detection of pneumonia** from chest X-ray images.
The goal is to assist radiologists in early diagnosis by leveraging **deep learning** and **computer vision**.
---
## π Objectives
- Design a CNN architecture capable of classifying X-ray images into **Pneumonia** vs **Normal**.
- Enhance model performance through:
- **Data Augmentation**
- **Fine-tuning of the ResNet50** pre-trained model.
- Achieve high diagnostic accuracy on real-world medical data.
---
## π§© Dataset
- **Dataset Used:** [ChestX-ray Pneumonia Dataset (Kaggle)](https://www.kaggle.com/datasets/paultimothymooney/chest-xray-pneumonia)
- **Classes:**
- `PNEUMONIA`
- `NORMAL`
- **Dataset Split:**
- 70% training
- 20% validation
- 10% testing
---
## ποΈ Model Architecture
### 1οΈβ£ Baseline CNN
- Custom CNN with convolutional + pooling layers.
- Activation: ReLU
- Optimizer: Adam
- Loss: Binary Crossentropy
### 2οΈβ£ Fine-Tuned ResNet50
- Pre-trained on **ImageNet**.
- Top layers replaced with custom dense layers.
- Data augmentation applied (rotation, zoom, horizontal flip).
- Fine-tuning performed on last layers for optimal performance.
---
## π Results
| Model | Accuracy | Precision | Recall | F1-Score |
|----------------------|-----------|------------|--------|-----------|
| Baseline CNN | 87% | 85% | 88% | 86% |
| **ResNet50 (Fine-Tuned)** | **94%** | **93%** | **95%** | **94%** |
β
**Final Model Accuracy: 94%**
---
## π οΈ Technologies & Tools
- **Python**
- **TensorFlow / Keras**
- **OpenCV**
- **Matplotlib / Seaborn**
- **NumPy / Pandas**
- **Jupyter Notebook**
---