Skip to content

A deep learning-powered system for early detection of diabetic retinopathy using advanced ensemble techniques and transfer learning. This project aims to assist healthcare professionals in accurate and efficient diagnosis of retinal conditions, potentially preventing vision loss through early intervention.

Notifications You must be signed in to change notification settings

hsn07pk/EyeAI-Retinopathy-Detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EyeAI-Retinopathy-Detection

License: MIT Python 3.10+ PyTorch

🔍 Overview

EyeAI is an advanced deep learning system designed to detect and classify diabetic retinopathy from retinal images. Using state-of-the-art transfer learning and ensemble techniques, the system achieves high accuracy in identifying different stages of retinopathy, from mild to proliferative DR.

Key Features

  • Multi-model ensemble learning with ResNet and VGG architectures
  • Advanced image preprocessing techniques
  • Explainable AI visualizations using GradCAM
  • Comprehensive performance metrics including Cohen's Kappa

🏗️ Project Structure

EyeAI-Retinopathy-Detection/
├── bagging/
│   ├── resnet18Bagging.py
│   ├── resnet34Bagging.py
│   └── vgg16Bagging.py
├── boosting/
│   ├── resnet18Boosting.py
│   ├── resnet34Boosting.py
│   └── vgg16Boosting.py
├── stacking/
│   ├── resnet18Stacking.py
│   ├── resnet34Stacking.py
│   └── vgg16Stacking.py
├── aio.py
├── visualizations/
│   ├── gradcam/
│   └── training_metrics/
├── trained_models/
│   ├── resnet18/
│   ├── resnet34/
│   └── vgg16/
├── requirements.txt
└── README.md

🛠️ Installation

  1. Clone the repository:
git clone https://github.com/yourusername/EyeAI-Retinopathy-Detection.git
cd EyeAI-Retinopathy-Detection
  1. Create and activate virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt

📊 Data Preparation

  1. Download the DeepDRiD dataset from the provided source
  2. Place the dataset in the appropriate directory:
mkdir data
mv downloaded_dataset data/deepdrid

🚀 Running the System

Quick Start with All-in-One Script

python aio.py

Running Specific Ensemble Methods

Bagging

cd bagging
python resnet18Bagging.py

Boosting

cd boosting
python resnet18Boosting.py

Stacking

cd stacking
python resnet18Stacking.py

🔧 Model Configuration

Available Models

  • ResNet18
  • ResNet34
  • VGG16

Preprocessing Options

  • Ben Graham Preprocessing
  • Circle Cropping
  • CLAHE
  • Gaussian Blur
  • Image Sharpening

Ensemble Techniques

  • Bagging
  • Boosting
  • Stacking

📈 Performance Metrics

The system evaluates performance using:

  • Cohen's Kappa Score
  • Accuracy
  • Loss Metrics
  • ROC-AUC Curves

🎯 Results Visualization

Training Metrics

python visualizations/plot_metrics.py

Generate GradCAM Visualizations

python visualizations/generate_gradcam.py --model resnet18 --image_path path/to/image

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit changes
  4. Push to the branch
  5. Create a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

📚 References

🙏 Acknowledgments

Special thanks to the DeepDRiD dataset creators and the medical professionals who contributed to the ground truth labeling.

📧 Contact

For questions or collaborations, please open an issue in the repository.

About

A deep learning-powered system for early detection of diabetic retinopathy using advanced ensemble techniques and transfer learning. This project aims to assist healthcare professionals in accurate and efficient diagnosis of retinal conditions, potentially preventing vision loss through early intervention.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages