The Dentist Is the Training Loop

Designing a dental X-ray review workflow that captures clinician corrections for future model training.

In this case study↓

DentalAI is a prototype for reviewing model annotations on dental X-rays. The viewer gives each model’s output its own layer, so a clinician can inspect and correct individual findings before an image is eligible for training export.

At a glance

Timeframe
Early 2026
My role
Full-stack and ML engineering
Models
Three YOLO models: quadrant, tooth numbering, disease
Stack
React 19 · Vite · Express 5 · Firebase · FastAPI
3models, one job each
3services: client, API, AI
1 loopreview before training export

The job

I treated image review as three distinct tasks: identifying the quadrant, numbering teeth, and spotting candidate regions for closer review. Keeping those tasks visible gives a reviewer a way to locate the source of an error and correct the relevant layer.

The product

DentalAI is built for a clinic. Dentists sign in, keep patients and cases, upload X-rays and review what the models found. The interface is dark and quiet so the images stand out.

DentalAI sign-in screen
Sign-in. The clinician signs in before opening patient cases and reviewing model annotations.

Three small models instead of one big one

My first instinct was one model that does everything. I split it into three YOLO models, each with one job:

  • Quadrant detection: which part of the mouth we're looking at.
  • Enumeration: numbering each tooth.
  • Disease detection: flagging regions that might need attention.

Smaller models are easier to train, easier to debug and easier to explain. When something goes wrong, you can see which step got it wrong.

Designing around layers

That split shaped the interface too. The X-ray viewer has a layer panel, like a design tool: each model's output is its own layer that you can switch on and off, and a findings panel lists everything that was detected. A dentist can hide the noise, focus on one tooth and fix what's wrong directly on the image.

A correction isn't a bug report. It's the next piece of training data.

Closing the loop

This is the part I care about most. Corrections are saved to the case. Training export checks that every tooth in an annotation is approved, and the batch retraining path checks for a minimum of five fully approved X-rays for that clinician. This makes eligibility explicit and gives a reviewer time to finish a case before its labels are exported.

Uploaddentist adds an X-ray
→
Inferquadrant · teeth · disease
→
Reviewtoggle layers, fix boxes
→
Approvesent to /train/queue
→
Retrain/train/run → optional retraining

The review loop produces eligible examples for a separate training step.

The architecture

ClientReact 19 + Vite: viewer, layers, findings, patients, cases
→
APIExpress 5: verifies the Firebase token, stores data in Firestore and images in Cloud Storage
→
AI serviceFastAPI + YOLO: /infer, /train/queue, /train/run

The browser never talks to the AI service directly. Its internal training-export endpoints need a separate internal key.

Patient data should take as few routes as possible. The AI service only accepts calls from the API, and nothing about the models is exposed to the browser.

Separating feedback from model improvement

A corrected annotation is evidence that the reviewer could fix an output. Model improvement requires a separate evaluation. I’d hold out cases by patient and compare model versions before making performance claims about the retraining workflow.

Keep reading

View all