Skip to content

Scoring patient photos with a vision model, without making uploads wait

OrthoTrack scores every progress photo against reference images with a vision model, in a background job rather than inside the upload. Here is why.

Written by The Jinn Tea team

Healthcare3 min read

A soft 3D scene of clear dental aligners beside a phone on a stand showing a glowing outline of a smile with alignment guides.

In short

In OrthoTrack, a patient's photo upload finishes immediately. A background job then scores it against reference images the therapist assigned, using a vision model, and only a score below a threshold sends a notification to the patient and their therapist. Keeping the model out of the request means the slowest, least reliable dependency never stands between a patient and the one thing you need them to do.

Progress photos only help if they can be compared

Orthodontic outcomes depend on what happens at home, and between appointments a clinician sees none of it. Progress photos should fix that, but taken at inconsistent angles and distances they cannot be compared to each other. They show change without showing whether it is real.

The fix in OrthoTrack was not better scoring. It was giving every photo something to be compared against.

Reference images are what make scoring possible

A therapist assigns up to four reference poses to each patient. The patient sees those references while taking their own photos, so the new picture is framed like the old one. A vision model then scores each upload against the references.

This one idea does two jobs. It makes a series of phone photos comparable at all, and it gives the model something concrete to score against, rather than asking it to judge teeth in the abstract.

The model runs after the upload, not during it

Photo review is a background job, not part of the upload. The patient's capture completes immediately; scoring happens afterwards. Putting the model in the request path would have made the slowest, least reliable dependency the thing standing between a patient and the one action you need them to take every day.

// The upload handler stores the photo and returns at once.
async function uploadPhoto(patientId: string, file: Photo) {
  const photo = await photos.save(patientId, file);
  await jobs.enqueue("score-photo", { photoId: photo.id });
  return photo; // the patient is done here
}

// A worker scores it later and only alerts below a threshold.
async function scorePhoto({ photoId }: { photoId: string }) {
  const photo = await photos.find(photoId);
  const refs = await references.forPatient(photo.patientId);
  const score = await visionModel.compare(photo, refs);
  await photos.saveScore(photoId, score);
  if (score < THRESHOLD) await notifyPatientAndTherapist(photo);
}
A simplified sketch of the pattern, not OrthoTrack's production code.
  • The capture never waits on the model, so a slow or failed model call cannot break the daily habit.
  • Alerts only fire below a threshold, so nobody is notified about photos that are fine.
  • Both sides hear the same day: the patient and the therapist get the alert through Firebase Cloud Messaging.

Patient and clinician need different products

A patient needs a two-minute daily habit; a clinician needs a review tool. So an OrthoTrack account chooses its side at sign-up and the interfaces diverge from there, on one Flutter codebase with Clean Architecture and BLoC/Cubit.

The patient's home is four tasks and a progress ring: elastics, brushing, a photo and a breathing exercise. The clinician's side starts with patient search, then a record with photos, compliance and reference images as tabs. The Node.js and MongoDB backend holds the records, media and compliance history for both.

OrthoTrack's photo screen on a phone: a patient's dated grid of teeth photos, with Uploaded and Annotated tabs and a low match flagged in red.
From the case studyOrthoTrack: Orthodontic care that stays connected between appointmentsRead the case study →

Questions

Does the patient wait for the AI to review their photo?

No. The upload completes straight away and a background job scores the photo afterwards.

What does the vision model compare the photo to?

To reference images the patient's therapist assigned, which the patient also sees while taking the photo.

Who is told when a photo scores low?

Both the patient and their therapist, through a push notification, the same day.

Book a call

Building something like this?

Tell us what your app needs to do, and we will tell you how we would build it.

Prefer to write?
  1. 01You pick the slot
  2. 02Bring anything you have
  3. 03We come prepared

Your idea stays yours. Read only by the people who would build it, never reused, never passed on. Happy to sign your NDA first.

Pick a time. We'll tell you what it takes.

Thirty minutes, no pitch deck. Bring a rough idea or a finished spec, and leave with a straight answer on scope, cost and whether we're the right team.

  1. 01
    You pick the slotA live calendar, not a queue. Most people find something inside forty-eight hours.
  2. 02
    Bring anything you haveA spec, a Figma link, screenshots, a competitor you like, or nothing at all.
  3. 03
    We come preparedWe read whatever you send beforehand, so the call starts at the interesting part.

Your idea stays yours

  • What you share stays between you and the people on your project.
  • We never reuse your concept, your research or your materials elsewhere.
  • Happy to sign your NDA before the call, or send ours.

We read every brief and reply within 60 minutes.

Prefer to write? with your files instead, or email abdullahmughal1976@gmail.com.