Skip to content

Repository files navigation

🦷 ToothFairy4M - Intraoral Tooth Segmentation System

Tooth Segmentation UI

An end-to-end pipeline for intraoral image classification, tooth segmentation, and interactive annotation correction.

This system combines deep learning models with a Django-based web interface to streamline dental dataset preparation.


Overview

This project automates the full workflow of intraoral data processing:

  1. Classify intraoral images and apply consistent naming
  2. Detect the mouth region using SAM3 to remove irrelevant areas
  3. Segment teeth using SAT (Segment Any Tooth)
  4. Refine segmentation with post-processing
  5. Allow annotators to correct results via a web interface

Pipeline

1. Intraoral Classification & Renaming

✔ Automatically renames images
✔ Fixes missing/duplicate predictions


2. Mouth ROI Detection (SAM3)

  • Uses SAM3 to isolate the oral cavity
  • Removes:
    • Gloves
    • Tools
    • Reflections
    • Background noise

✔ Applied to:

  • Center / Left / Right views

3. Tooth Segmentation (SAT)

  • Uses Segment Any Tooth (SAT)
  • Generates per-tooth segmentation masks

✔ Runs on:

  • Full image (upper/lower)
  • SAM3-guided cropped region (others)

4. Post-processing & Verification

  • Removes noise
  • Applies ROI constraints
  • Filters invalid regions
  • Keeps best tooth components
    To run the clean automatic segmentation pipline run Model_run.py under the folder SAT_SAM3_Segmentation so you will get clean json files, masks and original images

5. Web Annotation Interface

Built using:

  • Django (backend)
  • JavaScript Canvas (interactive editing)
  • CSS (UI styling)

Annotators can:

  • Select teeth and upload the json files with masks for patients
  • Edit segmentation boundaries
  • Add / split / delete masks
  • Assign FDI labels
  • Zoom and navigate
  • Save corrections

Evaluation

To evaluate the methodology please run Model_run_evaluation.py which generate all steps of outputs such as -01_SegmentAnyTooth_only -02_SegmentAnyTooth_postprocessing -03_SAM3_ROI_SegmentAnyTooth -04_full_automatic_pipeline And then run evaluate_segmentation_detail.py shows the full evaluation numbers and statues of our methodology.

🖥️ Annotation Interface

✔ Features:

  • Canvas-based editing
  • Real-time mask interaction
  • Color-coded FDI labeling
  • Dynamic loading of predictions
  • Save status tracking

You can look at : https://github.com/AImageLab-zip/ToothFairy4M

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages