An open API service indexing awesome lists of open source software.

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.

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**

---