Skip to content

Application of Deep Learning to the segmentation of medical images

Notifications You must be signed in to change notification settings

prbprb2/Deep-Learning-liver-segmentation

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Liver segmentation project

Purpose : the objective is to automatically delineate liver on patient scans by computer vision. The method used is from the research paper "U-Net: Convolutional Networks for Biomedical Image Segmentation"

In this project we apply the method to the segmentation of liver images as described in this research paper https://arxiv.org/pdf/1702.05970.pdf.

Data

The data is available in NifTi format here. This dataset consists of 20 medical examinations in 3D, we have the source image as well as a mask of segmentation of the liver for each of these examinations. We use the nibabel library (http://nipy.org/nibabel/) to read associated images and masks.

Model

We train a U-net architecture, a fully convolutional network. The principle of this architecture is to add to a usual contracting network, layers with upsampling operators instead of pooling. This allow the network to learn context (contracting path), then localization (expansive path). Context information is propagated to higher resolution layers thanks to skip-connexions. So we have images of the same size as input

in the data.py script, we perform axial cuts of our 3D images. So 256x256 images are input to the network

Evaluation

As metric we use the Dice coefficient (which is quite similar to the Jaccard coefficient)

How it works

  1. First download the data whose link has been given previously
  2. Create a 'raw' folder
  3. In the 'raw' folder, create a 'test' folder, and a 'train' folder
  4. Then separate the data in two sets (train and test, typically we use 13 samples for the train set and 7 for the test set) and put them in the corresponding directories that you can find in the 'raw' folder
  5. Run data.py , this will save the train and test data in npy format
  6. Finally launch the notebook, you can observe a curve of the Dice coef according to the number of epochs and visualize your predictions in the folder 'preds'
(Feel free to play with the parameters : learning rate, optimizer etc.)

Some results

Finally we get this kind of predictions for a particular cut (you can reproduce this with the notebook), we delineate the liver with a yellow marker

The evolution of the Dice coef for 20 epochs, this plot shows that we have consistent results and a test Dice coef reaching almost 0.87

Acknowledgments

About

Application of Deep Learning to the segmentation of medical images

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 90.4%
  • Python 9.6%