Deep Learning Liver Segmentation Save

Application of Deep Learning to the segmentation of medical images

Project README

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

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 the predictions for a particular cut (delineated in yellow)

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

Acknowledgments

Open Source Agenda is not affiliated with "Deep Learning Liver Segmentation" Project. README Source: soribadiaby/Deep-Learning-liver-segmentation

Open Source Agenda Badge

Open Source Agenda Rating