Inspiration

India has 77+ million diabetic adults, and about 18% develop diabetic retinopathy (DR), a leading cause of preventable blindness. Early screening can prevent up to 90% of vision loss, but rural India has roughly 1 ophthalmologist per 100,000 people. Existing AI tools are black boxes that give a verdict without evidence, and they often break on the blurry, dark photos that portable field cameras produce. We wanted a screening aid that rejects bad photos, explains its reasoning, and keeps a doctor in the loop.

What it does

A health worker uploads a retinal (fundus) photo and the system:

  1. Quality gate: rejects blurry or underexposed images with a clear reason, so the photo can be retaken on the spot.
  2. Enhancement: applies CLAHE contrast enhancement to usable images.
  3. Grading: an EfficientNet-B0 model grades DR on the International Clinical severity scale (0 = No DR to 4 = Proliferative DR) and flags referable DR (grade 2+).
  4. Explanation: a Grad-CAM heatmap shows which regions drove the grade.
  5. Report: a one-page clinical report with the grade, referral status, heatmap, and a concur/override sign-off for an ophthalmologist, designed for review in under 30 seconds.

How we built it

  • Fine-tuned EfficientNet-B0 (via timm) on the APTOS 2019 dataset for 5-class grading.
  • Quality gate with Laplacian-variance (focus) and brightness (illumination) checks using OpenCV.
  • CLAHE on the LAB lightness channel, then ImageNet normalisation.
  • pytorch-grad-cam on the final convolutional layer for explanations.
  • Gradio web app for the live demo, Matplotlib for the report.
  • Our validation split reached a quadratic weighted kappa (QWK) of 0.86 on APTOS 2019.

Challenges we faced

  • APTOS is heavily imbalanced, with far more "No DR" than severe cases.
  • Choosing quality-gate thresholds that reject truly unusable images without discarding borderline-usable ones.
  • Grad-CAM shows where the model looked, not proof of a lesion, so we present it as supporting evidence for the clinician, not as a diagnosis.

What we learned

Accuracy alone isn't enough for rural deployment. Image-quality handling, explainability, and a human-review step matter just as much as the model.

What's next

  • Lesion-level segmentation (microaneurysms, exudates, hemorrhages) using IDRiD annotations
  • Calibrated confidence scores and external validation on Messidor-2
  • A workflow simulation (Simulink or SimPy) to size district-level programmes for 100,000+ patients a year
  • Deployment on low-cost field hardware with regional-language support

This is a screening aid for research and demonstration, not a medical diagnosis.

Built With

Share this project:

Updates

Submission history