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.
This project automates the full workflow of intraoral data processing:
- Classify intraoral images and apply consistent naming
- Detect the mouth region using SAM3 to remove irrelevant areas
- Segment teeth using SAT (Segment Any Tooth)
- Refine segmentation with post-processing
- Allow annotators to correct results via a web interface
- Model: ResNet18 (custom trained)
- Source model must be requested from:
👉 https://github.com/AImageLab-zip/Intraoral-photo-classification after download the model you can use the script Classification_tooth.py inside folderclassification - Classifies images into:
- Center
- Left
- Right
- Upper
- Down
✔ Automatically renames images
✔ Fixes missing/duplicate predictions
- Uses SAM3 to isolate the oral cavity
- Removes:
- Gloves
- Tools
- Reflections
- Background noise
✔ Applied to:
- Center / Left / Right views
- Uses Segment Any Tooth (SAT)
- Generates per-tooth segmentation masks
✔ Runs on:
- Full image (upper/lower)
- SAM3-guided cropped region (others)
- 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
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
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.
✔ 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
