Diabetic retinopathy grading
Grades retina photos for diabetic retinopathy and flags who should see a specialist.
The problem
Screening needs a model that grades disease, not the camera that took the photo, measured on photos it never tuned on.
The approach
Leakage-aware splits grouped by patient, a classical baseline, then fine-tuned CNNs with test-time augmentation; every run scored once on a locked 523-photo test split with bootstrap confidence intervals and a check on cameras that give the grade away.
What stands out
- Fine-tuned ResNet-50 with test-time augmentation: quadratic weighted kappa 0.925 (95% CI 0.910–0.939) on 523 locked test photos.
- Referable-disease screening at 96.5% sensitivity and 90.3% specificity.
- Live demo on Cloudflare Workers.
Measured
-
0.925
ResNet-50 with test-time augmentation scored a quadratic weighted kappa of 0.925 (95% CI 0.910–0.939) on 523 locked test photos.
Agreement with specialist grades is close to the level reported for human graders.
28 Sep 2026
-
96.5%
At the referral threshold the model found 96.5% of patients needing a specialist, with 90.3% specificity.
A screening tool earns its keep by not missing the people who need referral.
28 Sep 2026