Inspiration

Diabetic retinopathy, glaucoma and cataracts are three of the leading causes of blindness in the world, and all three are quiet for years before anyone notices. The reason they get caught late is access: screening normally means a clinic, a specialist and equipment most people never get near.

What people do have is a phone. A modern front camera plus a screen that can act as a controlled light source is, in principle, enough to watch a pupil react to light. So I wanted to find out how far that actually goes — not to replace an eye exam, but to tell someone when it is worth booking one.

What it does

Iris is a 30-second scan that runs in a phone browser and looks for signals linked to three conditions:

  • Diabetic retinopathy — resting pupil size, and how fast and how far each pupil constricts after the screen flashes. This is the most speculative of the three and is labelled as an open research question.
  • Glaucoma — a phone version of the swinging flashlight test, comparing how each pupil reacts when the left eye is lit versus the right.
  • Cataracts — whether the pupil looks hazy or grey rather than clear. This one has the strongest evidence behind it.

Every check returns one of four answers: looks typical, borderline, see a doctor, or unclear. It never returns a diagnosis, and "unclear" is a real outcome rather than a failure state — if the frames are bad, Iris says so instead of guessing.

Around the scan there is also:

  • an eye photo check with live framing coaching, red-flag symptom triage, an on-device match against 1,957 labelled reference images, and an optional AI second look
  • a dashboard where signed-in users can see their scan history and delete any individual scan
  • Ask Iris, a chat assistant answering eye-health questions from a small embedding-based knowledge base
  • plain-English explanations that put each number next to published reference ranges

How I built it

The web app is Next.js 16 (App Router), React 19 and TypeScript, styled with Tailwind CSS 4, Radix UI and Framer Motion.

The scan uses MediaPipe Tasks Vision for face landmarks, then my own circle-fitting pass on each frame to measure the pupil and iris. The screen flashes, the camera records the light reflex, low-quality frames are dropped, and the remaining measurements are scored against published ranges.

The photo classifier was trained in notebooks under ml/ on the Eye Diseases Classification dataset. On a 288-image test set it reached 85% overall accuracy, with 92% sensitivity and 99% specificity for "any condition vs normal". Uveitis was the weakest class, so its threshold was raised for phone use.

Accounts run on Clerk, scan history on Supabase Postgres, chat and explanations through the Hack Club AI proxy, and the whole thing is deployed on Vercel. All image processing happens in the browser — only the resulting numbers ever leave the device.

Challenges I ran into

Pupil measurement on a handheld phone is much harder than on a lab rig: the hand moves, the room light changes, eyelashes cut across the pupil, and the flash itself washes out the frame it is supposed to measure. Most of the work went into deciding which frames to throw away and when to refuse to answer at all.

The other hard part was restraint. It is easy to build something that prints a confident number. Getting it to say "unclear" or "borderline" honestly, and to keep the medical framing accurate, took more iterations than the computer vision did.

Accomplishments that I'm proud of

It is deployed, open source and actually works on a phone, and it is honest about what it cannot do. The cataract check is backed by real evidence, the glaucoma check mirrors a test clinicians already use, and the diabetic retinopathy check is clearly labelled as research rather than dressed up as a result.

What I learned

How to reason about sensitivity and specificity instead of accuracy alone, why threshold choice matters more than model architecture when the cost of a false negative is someone's sight, how to run computer vision fully on-device, and how to write a health tool that stays inside its evidence.

What's next for Iris Checks

Validation against clinical ground truth rather than curated photo datasets, data from real phone users in varied lighting, a native app for better camera control, and widening the reference set so the weaker checks can earn the confidence the cataract check already has.

Iris is a research prototype, not a medical device.

Built With

Share this project:

Updates

Submission history