This project aims to detect various dental diseases from panoramic images using object detection and segmentation models. The Flask API allows for image input, processing, and visualization of the results in the browser.
Follow the steps below to set up the project on your local machine.
cd
git clone https://github.com/Loki-Silvres/Dental-Disease-Detection.git
cd Dental-Disease-Detection/
git checkout Flask
Ensure you have Python 3.7+ installed on your system. Then, install the required dependencies by running:
pip install -r requirements.txt
Download the model weights from Kaggle and place the files in the root of the Dental-Disease-Detection
directory.
Once the model is downloaded and placed correctly, you can run the Flask server:
python app.py
The server will run locally on port 5000
by default. You can test the API by uploading images for detection and viewing the results.
- Access the API at
http://localhost:5000/
. - Use the
/coordinates
endpoint to send an image file for detection and segmentation. - The response will be an image with bounding boxes and segmentation masks for detected dental diseases, along with a color-coded palette for easy interpretation.
- Via Terminal:
curl -X POST http://localhost:5000/coordinates -F "image=@sample_img.jpg" --output output.jpg
The detection model is trained to detect the following dental conditions:
0: Caries
1: Crown
2: Filling
3: Implant
4: Malaligned
5: Mandibular Canal
6: Missing teeth
7: Periapical lesion
8: Retained root
9: Root Canal Treatment
10: Root Piece
11: Impacted tooth
12: Maxillary sinus
13: Bone Loss
14: Fracture teeth
15: Permanent Teeth
16: Supra Eruption
17: TAD
18: Abutment
19: Attrition
20: Bone defect
21: Gingival former
22: Metal band
23: Orthodontic brackets
24: Permanent retainer
25: Post-core
26: Plating
27: Wire
28: Cyst
29: Root resorption
30: Primary teeth
Here is an example of a panoramic dental X-ray image being processed by the model.
The sample panoramic dental X-ray image that was uploaded for analysis.
The same image after processing, with bounding boxes and segmentation masks applied. The palette on the right indicates which color corresponds to each detected condition.
X-Ray_Disease_Detection_Sample_Video.webm
- Model trained using the dataset available on Kaggle.