This project implements a deep learning pipeline for Glaucoma detection using retinal fundus images.
It combines Convolutional Neural Networks (CNNs), Transfer Learning, and NSGA-II (Genetic Algorithm) for hyperparameter optimization.
A Flask web app is also included for real-time predictions and Grad-CAM visualizations.
-
main.py
→ Core training script with:- Custom Enhanced CNN with CBAM attention
- Transfer Learning support (ResNet18, MobileNetV3)
- K-Fold cross-validation
- NSGA-II for hyperparameter optimization
- Metrics, plots, and Grad-CAM generation
-
app.py
→ Flask web application for:- Uploading fundus images
- Running inference using trained model
- Viewing Grad-CAM heatmaps for predictions
-
results/
→ Trained models, metrics, and plots will be saved here. -
datasets/
→ Acrima, Drishti-GS1, HRF, ORIGA, Rim-One.
Install dependencies:
pip install -r requirements.txt