GithubHelp home page GithubHelp logo

nexusx12 / dental-x-ray-analysis Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 1.0 323 KB

Automating dental X-ray analysis using computer vision. Scripts classify dental conditions.

Python 100.00%
computervision dental dentist healthtech xray dentalxray

dental-x-ray-analysis's Introduction

Dental X-ray Analysis

Project Status Python application GitHub Issues GitHub License Python Version

Dependencies

Download data

Dataset structure

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

Abstract

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.

Introduction

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.

Code Basis

The project consists of two main scripts:

Script 1: Dental X-ray Classification

  • 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.

Script 2: Tooth Segmentation and Boundary Drawing

  • 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 the draw_tooth_boundaries function for optimal segmentation.
    • Provide an input X-ray image to visualize tooth boundaries.

Installation

To run the scripts, follow these installation steps:

  1. Clone the repository:

    git clone https://github.com/NexusX12/Dental-X-ray-Analysis
  2. cd Dental-X-ray-Analysis:

    cd Dental-X-ray-Analysis
  3. Install dependencies:

    pip install -r requirements.txt

Usage

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

screenshot 1 screenshot 2 screenshot 3

Future Work

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.

Authors

References

  1. scikit-learn: Machine Learning in Python. https://scikit-learn.org/
  2. OpenCV: Open Source Computer Vision Library. https://opencv.org/
  3. NumPy: The fundamental package for scientific computing with Python. https://numpy.org/
  4. Pandas: Powerful data structures for data analysis. https://pandas.pydata.org/

Conclusion

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.

License

  • The MIT License (MIT) Copyright (c) 2018 École Polytechnique, Université de Montréal
  • Dataset - CC BY-SA 4.0

dental-x-ray-analysis's People

Contributors

tharunbirla avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

tharunbirla

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.