Skip to content
 
 

Repository files navigation

DentalAI

AI-Powered Dental X-ray Analysis Platform

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.


Overview

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.


System Architecture

React Frontend │ ▼ Node.js / Express API │ ├── Firebase Authentication ├── Firestore (case data) └── Firebase Storage (X-ray images) │ ▼ FastAPI AI Service │ ▼ YOLOv8 Computer Vision Models


Key Features

AI-Powered X-ray Analysis

Custom YOLOv8 models detect teeth and identify dental conditions directly from radiographs.

Tooth Numbering

Automatically assigns FDI tooth numbers to detected teeth for consistent clinical referencing.

Interactive X-ray Viewer

Clinicians can:

  • View X-rays with bounding box overlays
  • Inspect predicted diagnoses
  • Edit annotations
  • Add notes
  • Approve or reject AI predictions

Human-in-the-Loop Workflow

AI results are always verified by clinicians before becoming part of the patient record.

Secure Cloud Storage

Patient cases and X-rays are stored securely using Firebase services.

Report Generation

Approved findings can be exported into structured reports for documentation.


Technology Stack

Frontend

  • React
  • Modern UI components
  • Interactive image viewer

Backend

  • Node.js
  • Express.js
  • REST APIs

AI Service

  • FastAPI
  • Python
  • PyTorch
  • YOLOv8

Cloud Services

  • Firebase Authentication
  • Firestore
  • Firebase Storage

AI Models

The AI component uses YOLOv8 object detection models trained on dental X-ray datasets.

The models perform:

  1. Tooth detection
  2. Tooth numbering (FDI system)
  3. 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
)














About

Dental AI

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages