An AI screening tool for retinal fundus photos. It flags cataract, glaucoma or diabetic retinopathy, shows why with three heatmaps, and writes a patient-friendly PDF report.

[ Role ]

Full-stack & AI integration

[ Categories ]
  • AI & Automation
[ Stack ]
  • Python
  • FastAPI
  • Flask
  • Ultralytics YOLO
  • PyTorch
  • Roboflow Inference
  • Google Gemini API
  • LIME, SHAP, OpenCV

Eye disease screening needs specialists, and AI models that only output a label are hard to trust. I built a two-tier system: a Flask web app for upload and results, and a FastAPI service that runs a YOLO detector trained on fundus images. The key decision was to never show a prediction without an explanation, so every scan gets occlusion, LIME and SHAP heatmaps. Gemini writes the care report, and every external call has a local fallback so the demo never breaks.

  1. 01Explainable by default. Each scan returns occlusion sensitivity, LIME and SHAP heatmaps, so a doctor can see which part of the retina drove the result.
  2. 02Layered inference. Roboflow hosted inference runs first, with an HTTP retry and a local Ultralytics YOLO model as backup, so predictions keep working.
  3. 03Cleaner input, better focus. OpenCV contour detection finds the eye and blurs the background before inference, which keeps the model and heatmaps on the retina.
  4. 04Reports that always arrive. Gemini drafts a structured care plan with backoff on rate limits, and curated per-disease reports take over if it fails.

Want something like this built?