DentalAI is a full-stack web application that assists clinicians in analyzing dental X-rays using computer vision. The system combines deep learning models with a clinician review interface to detect teeth, assign consistent tooth numbering, and identify common dental conditions.
The platform follows a human-in-the-loop workflow, allowing dentists to review, modify, and approve AI predictions before generating reports.
DentalAI integrates a modern web stack with custom-trained computer vision models to automate parts of dental radiograph analysis.
The system can:
- Detect teeth in dental X-rays
- Assign FDI tooth numbering
- Identify common dental conditions including:
- Caries
- Deep caries
- Impacted teeth
- Periapical lesions
- Display results with interactive overlays for clinician verification
- Store and manage cases securely in the cloud
The goal is to assist clinicians, not replace them. All AI predictions can be reviewed and edited before being finalized.
React Frontend │ ▼ Node.js / Express API │ ├── Firebase Authentication ├── Firestore (case data) └── Firebase Storage (X-ray images) │ ▼ FastAPI AI Service │ ▼ YOLOv8 Computer Vision Models
Custom YOLOv8 models detect teeth and identify dental conditions directly from radiographs.
Automatically assigns FDI tooth numbers to detected teeth for consistent clinical referencing.
Clinicians can:
- View X-rays with bounding box overlays
- Inspect predicted diagnoses
- Edit annotations
- Add notes
- Approve or reject AI predictions
AI results are always verified by clinicians before becoming part of the patient record.
Patient cases and X-rays are stored securely using Firebase services.
Approved findings can be exported into structured reports for documentation.
- React
- Modern UI components
- Interactive image viewer
- Node.js
- Express.js
- REST APIs
- FastAPI
- Python
- PyTorch
- YOLOv8
- Firebase Authentication
- Firestore
- Firebase Storage
The AI component uses YOLOv8 object detection models trained on dental X-ray datasets.
The models perform:
- Tooth detection
- Tooth numbering (FDI system)
- Condition classification
Example prediction output:
{
"tooth_id": 26,
"condition": "caries",
"confidence": 0.91,
"bounding_box": [x, y, width, height]
}
Workflow
1. Clinician uploads dental X-ray
2. Image stored in Firebase Storage
3. Backend sends image to AI service
4. YOLOv8 model runs inference
5. Results returned to frontend
6. Clinician reviews predictions
7. Edits or approves annotations
8. Case saved and report generated
Project Structure
DentalAI
│
├── frontend/ # React clinician dashboard
├── backend/ # Node.js / Express API
├── ai-service/ # FastAPI model inference service
├── models/ # YOLOv8 trained models
└── datasets/ # Training data and annotation scripts
Model Training (YOLOv8 Pipeline)
The AI models used in DentalAI are trained using the YOLOv8 object detection framework implemented in PyTorch. The training pipeline converts dental X-ray datasets into YOLO format and trains detection models capable of identifying teeth and diagnosing dental conditions.
Training Pipeline Overview
Dental X-ray Dataset
│
▼
JSON Annotations
│
▼
Dataset Conversion
(JSON → YOLO format)
│
▼
YOLOv8 Model Training
(PyTorch + Ultralytics)
│
▼
Model Evaluation
│
▼
Export Best Model (.pt)
│
▼
Deployment to AI Service
Dataset Preparation
The training dataset consists of dental X-ray images with annotated dental conditions.
Annotations include:
• Tooth locations
• Tooth numbering
• Condition labels
Example conditions:
• Caries
• Deep caries
• Periapical lesions
• Impacted teeth
Original annotations are provided in JSON format and converted into YOLO bounding box format.
Dataset Structure
dataset/
│
├── images/
│ ├── train/
│ └── val/
│
├── labels/
│ ├── train/
│ └── val/
│
└── data.yaml
Training Configuration
The models are trained using Ultralytics YOLOv8 with PyTorch.
from ultralytics import YOLO
model = YOLO("yolov8m.pt")
model.train(
data="data.yaml",
epochs=50,
imgsz=640,
batch=16,
device=0
)