GithubHelp home page GithubHelp logo

nlesc / yeap16-ai-3d-printing Goto Github PK

View Code? Open in Web Editor NEW
25.0 8.0 3.0 202 KB

CNN's for bone segmentation of CT-scans.

Home Page: https://www.esciencecenter.nl/redactional/young-escientist-2016

License: Apache License 2.0

Python 97.30% Shell 2.70%
medical-imaging convolutional-neural-networks segmentation ct-scans

yeap16-ai-3d-printing's Introduction

BuildStatus DOI

yeap16: CT-image bone segmentation

Code repository of the Young eScientist Award Project with the 3D Innovation Lab at the VUmc. This code accompanies a paper titled:

"CT image segmentation of bone for medical additive manufacturing using convolutional neural networks"

which is currently under review.

Purpose

Bone segmentation of CT scans is an essential step during medical treatment planning. The exact thickness, orientation and position of bony structures is required to make patient-specific constructs such as surgical guides and implants. During bone segmentation each pixel in a medical image is classified as either 'bone' or 'background'. Unfortunately, current algorithms either lack robustness and reliability, or require tedious manual interaction (Van Eijnatten et al., 2018). Therefore, this repository contains a fully-automated convolutional neural network (CNN) to perform bone segmentation of CT scans.

Model training

The CNN was trained using CT scans of three patients that were previously treated at the Vrije Universiteit Medical Center. Each pixel of the CT scans was labelled as either "bone" or "background" based on the knowledge of highly experienced medical engineers. A number of 500,000 pixels was randomly selected to create a axial patch of 33x33 around those selected pixels. These patches were subsequently used to train the CNN, which allow the CNN to learn the classification of pixels based on the local environment. Furthermore, a balanced training method was applied as proposed by Havaei et al. (2016), which implies that "bone" and "background" patches were equally represented in the dataset.

CNN architecture

Our CNN architecture was inspired by the one described in the Github repository of N.Aldenborgh. This architecture consists of four convolutional layers with additional ReLU, batch normalization and pooling layers. Pixel classification was performed using the softmax cost function. Furthermore, the RMSprop optimizer was used during the CNN training.

Installation

Clone the repository:

sudo apt-get install git
git clone https://github.com/NLeSC/yeap16-ai-3d-printing.git

Create an environment with all dependencies:

conda env create -f environment.yml
source activate deepy3d

Install the package:

python setup.py install

Usage

When called directly, the Deepy3d class runs an example script that reads in patient data according to a configuration file, trains a CNN model and visualizes its predictions on a held-out patient. For patient confidentiality reasons, we cannot include our CT data set in this repository. But we included a config.yml and ConfigReader class to facilitate reading in your own patient data.

In order to run the example script:

  1. Insert your local data directories in config.yml.
  2. Call Deepy3d class:
python ./deepy3d/Deepy3d.py

config.yml also contains network architecture and training parameters, should you want to change those as well.

3D-Slicer

The repository also contains a fork of a medical image processing and visualization package called 3D-Slicer. We used Slicer for manipulating CT-scans and performing global thresholding on the grayscale intensity values (Hounsfield units).

Installation

Install dependencies (Ubuntu):

sudo apt-get -y install unzip curl wget xz-utils bsdtar

Call Slicer installation script:

sh -c "./slicer/installSlicer.sh)"

Example script

Download sample data from slicer.org:

./tools/getSampleData.bash

Apply thresholding:

./tools/launchSlicer.sh examples/slicer_CT_threshold.py

Contact

Bugs, questions and comments can be submitted in the issues tracker.

yeap16-ai-3d-printing's People

Contributors

fdiblen avatar jomigi avatar wmkouw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

yeap16-ai-3d-printing's Issues

pretrained model

Hello and thank you for sharing your work!
Could you please provide the last checkpoint for the pretrained model?
Thank you in advance, Lucia

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.