This is an AI-powered web application for detecting eye diseases from retinal images. It uses a custom-trained CNN based on the VGG16 architecture.
👉 Click here to try the app
Hosted on Render — no installation needed.
- 👁 Cataract
- 🩸 Diabetic Retinopathy
- 🌫 Glaucoma
- ✅ Normal
- ❓ Unknown (for cases the model can't classify confidently)
- Upload a retina image from your local system.
- The image is preprocessed and fed into a CNN.
- The model outputs the predicted class and confidence score.
- The result is shown visually in the browser.
- Architecture: Transfer learning using VGG16
- Input Size: 224 x 224
- Framework: TensorFlow + Keras
- Classes: ["Unknown", "Cataract", "Diabetic Retinopathy", "Glaucoma", "Normal"]
.
├── app.py # Flask web app
├── templates/
│ ├── index.html # Upload page
│ ├── result.html # Result page
│ └── partials/
│ ├── _disease_info.html # Info about eye diseases
│ └── _how_it_works.html # Model explanation section
├── static/
│ ├── styles.css # Custom styles
│ └── js/
│ └── main.js # JavaScript for interactivity
├── models/
│ ├── eye_disease_model.h5 # Trained model (downloaded automatically)
│ └── eye_diseases_detection_vgg16.ipynb # Model training notebook
└── requirements.txt # Required Python packages
- Python 3.8+
- TensorFlow
- Flask
- Pillow
- NumPy
- gdown (for Google Drive file download)
Install all dependencies:
pip install -r requirements.txt
If models/eye_disease_model.h5
is not found, the app automatically downloads it from:
👉 https://drive.google.com/file/d/11nt9ilopu9RmYIjCeAhOjaQbaREG3PG-/view
python app.py
Visit http://127.0.0.1:5000/
in your browser.
This project is open for contributions! If you have suggestions, fixes, or ideas for improvement, feel free to open an issue or PR.
- 📧 Email: mdiibrahim549@gmail.com
- 💼 LinkedIn: Mohammad Ibrahim
This project is licensed under the MIT License.