CASE STUDY

Three diagnostic AI models, one dental photo, one API call

A computer vision system that segments and numbers every tooth in an intraoral photo, identifies restorative work like crowns and inlays, and flags likely caries with a confidence score — built for clinical and research use, not a lab demo.

Detectron2Computer VisionFlask APIDeep Learning
The problem

Manual tooth charting does not scale, and generic vision models do not understand teeth

Charting a mouth — numbering every tooth, noting existing restorations, flagging possible cavities — is normally done by hand, one photo at a time. It is slow, and two clinicians will not always chart the same photo identically.

Off-the-shelf object detection is not a shortcut here: teeth are small, tightly packed, visually similar to their neighbors, and the things worth detecting (a hairline cavity, a resin filling versus a gold crown) require domain-specific training, not a generic pretrained model.

The brief called for three distinct capabilities that still needed to work together: individually segment and number every tooth, detect and classify restorative materials, and localize caries — then expose all three through one simple interface a clinical front-end could actually call.

The approach

Three purpose-built models, run in a defined order

Each capability is its own trained model rather than one model doing everything — which keeps each one simpler to train and evaluate on its own, and means one model can be retrained or improved without touching the others.

01

Segmentation

A Detectron2 instance segmentation model outlines every tooth individually and assigns it a standard FDI number, with a per-tooth confidence score.

02

Prosthesis detection

A second model detects restorative elements — crowns, bridges, resin, gold inlays — and maps each one back to the tooth number it belongs to.

03

Caries detection

A third model locates likely cavities with precise bounding regions and a confidence score per detection, trained specifically to recognize caries rather than general dental anomalies.

04

Unified API

A Flask API takes one uploaded photo, runs all three models, and returns one JSON response — segmentation masks, tooth numbers, prosthesis map, and caries locations.

Dental AI: Segmentation & Detection Solutions — conversation flow mockup
Architecture

One upload, three models, one merged response

The Flask API is the only thing a client integration needs to know about — it fans a single uploaded image out to all three models and merges their outputs into one structured JSON response, including cross-referencing prosthesis detections against the segmentation model's tooth numbers.

Dental AI: Segmentation & Detection Solutions — system architecture diagram
SEGMENTATION MODEL
Detectron2 (instance segmentation)
DETECTION MODELS
Custom-trained CV models (prosthesis, caries)
BACKEND
Python + Flask
OUTPUT FORMAT
JSON — masks, numbering, detections, confidence
INTEGRATION
Single REST endpoint per image
USE CASE
Clinical charting & research tooling
Visibility

Two more models, cross-referenced back to tooth numbers

Prosthesis and caries detection do not just draw boxes — each detection is linked back to the specific tooth number the segmentation model already assigned, so the output reads like a chart, not a loose list of coordinates.

Dental AI: Segmentation & Detection Solutions — analytics dashboard mockup

This is a real, completed computer vision project. The images above are genuine outputs from the trained models — the tooth segmentation, numbering, prosthesis classifications, and caries confidence scores are all unmodified. Only the overlay colors were adjusted (from the models' original yellow/green markup to this site's violet/cyan palette) and each image was reframed with a consistent header and caption for presentation here.

Want something like this built for you?

Get a free consultation and see how a conversational AI agent could fit your product or sales process.

Let's Make Things Happen

Advanced software, advanced research for advanced people

"We have always looked for external resources that matched our core values and with Softyra and the leadership of Ahsan (CEO Softyra) we finally found a smart and conscientious team. I have personally referred Softyra and highly recommend"

Marc Vanschoenwinkel

Leadership 360

Company Logo
+92 300-457-9023

By submitting my data I agree to be contacted