Dental ML Project

YOLOv11 object detection on dental imagery — Roboflow fine-tuning & inference

Computer Vision | Roboflow
  • Two fine-tuned detection models
  • Roboflow Inference SDK
  • Serverless + local backends
  • Supervision visualization

Object detection on dental imagery using models trained and fine-tuned in Roboflow. This project documents two YOLOv11 fine-tuned tracks (tooth and panoramic X-ray), training metrics from the Roboflow dashboard, and a runnable CLI for inference via HTTP serverless API or local inference weights. Source on GitHub. A planned comparison with a locally trained Faster R-CNN baseline is listed as future work.

Naming note: Folders coco and yolo in assets refer to the tooth and pano training tracks in this repo — both models are YOLOv11 on Roboflow, not COCO-format vs raw YOLO dataset formats.

Models at a glance

Track Roboflow name Model ID mAP@50 Precision Recall F1
Tooth (coco) tooth 1 tooth-bqo56-ez1w4/1 87.7% 89.3% 80.4% 84.6%
Pano (yolo) pano 1 pano-fcjgf-nn0ku/1 70.3% 72.1% 68.4% 70.2%

Both models use YOLOv11 Object Detection (Accurate) in Roboflow (license AGPL-3.0). Pano model on Roboflow Universe · github.com/Harish-nika/Dental_ML_project.

Tooth track — classes & labels (coco)

ClassAnnotations
Cavity641
Fillings6,097
Impacted Tooth498
Implant2,047

Pano track — classes & labels (yolo)

14 panoramic classes; largest label counts include Filling (55,964), impacted tooth (32,520), Root Canal Treatment (25,108), Crown (14,476), and Caries (13,316).

ClassAnnotations
Filling55,964
impacted tooth32,520
Root Canal Treatment25,108
Crown14,476
Caries13,316
Periapical lesion8,104
Missing teeth5,108
Root Piece4,100
Implant2,736

Technical highlights

  • End-to-end Roboflow workflow: Dataset annotation, fine-tuning, and deployment IDs for private inference.
  • Dual inference backends: inference-sdk HTTP client against serverless Roboflow, or local get_model from the inference package.
  • Visualization pipeline: Predictions converted via Supervision Detections.from_inference, boxed and labeled, saved under outputs/.
  • Tooth classes: Cavity, Fillings, Impacted Tooth, Implant — per-class validation mAP@50 up to 97% (Implant).
  • Pano classes: 14 panoramic labels (Caries, Filling, Crown, RCT, canals, sinuses, etc.) — UI example highlights Caries/Filling at 40% confidence.
  • Future work: Local Faster R-CNN training and side-by-side evaluation vs these YOLOv11 models.
Roboflow tooth 1 fine-tuned model dashboard

Tooth model — Roboflow fine-tuned summary (tooth 1)

Roboflow pano 1 fine-tuned model dashboard

Pano model — Roboflow fine-tuned summary (pano 1)

Tooth detection model (coco track)

Model ID tooth-bqo56-ez1w4/1. Four classes with 9k+ Roboflow labels. Per-class mAP@50 on the validation set: Cavity 71%, Fillings 92%, Impacted Tooth 90%, Implant 97%; overall mAP ~88%.

Tooth dataset classes and annotation counts

Tooth classes & tags — Cavity, Fillings, Impacted Tooth, Implant

Tooth model mAP loss curves and per-class AP

mAP, loss curves, and average precision by class over training

Advanced tooth training metrics

Extended training metrics

Tooth fine-tuning parameters

Fine-tuning configuration

Panoramic X-ray model (yolo track)

Model ID pano-fcjgf-nn0ku/1. Fourteen panoramic classes (Caries, Filling, Crown, Root Canal Treatment, impacted tooth, Implant, Mandibular Canal, maxillary sinus, Missing teeth, Periapical lesion, and more). Example UI inference below highlights Caries and Filling at 40% confidence.

Pano dataset 14 classes and counts

Pano classes & tags — 14 classes and annotation volumes

Example pano inference Caries and Filling

Example predictions on a panoramic X-ray (Caries, Filling)

Pano training mAP and loss

Training mAP and loss curves

Advanced pano training metrics

Extended training metrics

Roboflow annotated dataset preview

Annotated dataset preview

Pano fine-tuning parameters

Fine-tuning configuration

Project structure

Dental_ML_project/
├── app.py                 # CLI entry point
├── requirements.txt
├── src/
│   ├── config.py          # Model IDs and API key helpers
│   ├── annotate.py        # Load image, annotate, save
│   ├── inference_http.py  # Serverless HTTP inference
│   └── inference_local.py # Local inference (get_model)
├── assets/
│   ├── coco/              # Tooth model screenshots
│   └── yolo/              # Pano model screenshots
└── outputs/               # Annotated images (runtime)

Install

git clone https://github.com/Harish-nika/Dental_ML_project.git
cd Dental_ML_project
python -m venv .venv
source .venv/bin/activate   # Windows: .venv\Scripts\activate
pip install -r requirements.txt

Optional GPU: pip install --extra-index-url https://download.pytorch.org/whl/cu124 inference-gpu — see Roboflow install docs.

Run inference

Set your API key from Roboflow dashboard → Deploy:

export ROBOFLOW_API_KEY=<your_api_key>
# or: cp .env.example .env

HTTP / serverless (default)InferenceHTTPClient:

python app.py --model tooth --image path/to/tooth_image.jpg
python app.py --model pano --image path/to/pano_image.jpg
python app.py --model pano --image https://example.com/xray.jpg --output outputs/result.png
python app.py --model pano --image xray.jpg --display

Local weightsget_model:

python app.py --model pano --image path/to/pano_image.jpg --backend local
python app.py --model tooth --image path/to/tooth_image.jpg --backend local

Annotated images save under outputs/ by default (e.g. outputs/tooth_annotated.png). For a self-hosted Inference Server, use api_url=http://localhost:9001 in src/config.py.

References

Back to Portfolio