- Dependencies
- Dataset structure
- Abstract
- Introduction
- Code Basis
- Installation
- Usage
- Future Work
- Authors
- References
- Conclusion
- License
The dataset should be arranged in a structured fashion, as the following:
unlabeled_images/
- 0001_jpg.rf.30a42966fb9c51553f6949b70234218d.jpg
- 0001_jpg.rf.57229a11e925669019e179341e22c97a.jpg
- 0001_jpg.rf.f94abcb7858bb419a7202ef60ef95bd6.jpg
- ......
- 1000_jpg.rf.c9dd4b2cf2f9c945b8d1921990531852.jpg
_annotations.csv
train.py
tooth_segmentation.py
This project aims to develop a tool for dental X-ray analysis using computer vision techniques. The primary objective is to segment and identify teeth in panoramic X-ray images, providing a foundation for future applications in dental diagnosis and treatment planning. The project is currently under development, and this document outlines the basis of the code, its underlying ideas, and how to use the tool.
Dental X-rays are essential for diagnosing and treating various dental conditions. Automating the analysis of X-ray images can significantly aid dental professionals in their decision-making processes. This project leverages computer vision, specifically image segmentation, to identify and mark teeth in panoramic X-ray images.
The project consists of two main scripts:
- Objective: Train a machine learning model to classify dental conditions based on annotated X-ray images.
- Implementation: Utilizes a Random Forest classifier to predict dental conditions (e.g., Fillings, Impacted Tooth, Implant).
- Usage:
- Modify the threshold value in
create_teeth_mask
function for optimal segmentation. - Train the model using annotated data in the
_annotations.csv
file. - Save the trained model as a pickle file using
train.py
.
- Modify the threshold value in
- Objective: Segment individual teeth and draw boundaries around them in a given X-ray image.
- Implementation: Applies adaptive thresholding and contour detection to identify teeth regions and draw rectangles around them.
- Usage:
- Adjust the
threshold_value
parameter in thedraw_tooth_boundaries
function for optimal segmentation. - Provide an input X-ray image to visualize tooth boundaries.
- Adjust the
To run the scripts, follow these installation steps:
-
Clone the repository:
git clone https://github.com/NexusX12/Dental-X-ray-Analysis
-
cd Dental-X-ray-Analysis:
cd Dental-X-ray-Analysis
-
Install dependencies:
pip install -r requirements.txt
Script 1: Dental X-ray Classification
python train.py
This script will generate trained_model.pkl
in current directory.
Script 2: Tooth Segmentation and Boundary Drawing
Make sure the trained_model.pkl
is in the same directory.
python tooth_segmentation.py
This project is currently under development, and future work will focus on:
- Refining segmentation techniques for improved accuracy.
- Integrating deep learning approaches for more sophisticated tooth detection.
- Developing a user-friendly interface for easy adoption by dental professionals.
- scikit-learn: Machine Learning in Python. https://scikit-learn.org/
- OpenCV: Open Source Computer Vision Library. https://opencv.org/
- NumPy: The fundamental package for scientific computing with Python. https://numpy.org/
- Pandas: Powerful data structures for data analysis. https://pandas.pydata.org/
Dental X-ray analysis through computer vision holds great promise for enhancing dental diagnosis and treatment planning. This project provides a foundation for further research and development in this domain.
Note: This project is under active development, and contributions are welcome. Please check the repository for updates and improvements.
- The MIT License (MIT) Copyright (c) 2018 École Polytechnique, Université de Montréal
- Dataset - CC BY-SA 4.0