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.
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.
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
As metric we use the Dice coefficient (which is quite similar to the Jaccard coefficient)
- First download the data whose link has been given previously
- Create a 'raw' folder
- In the 'raw' folder, create a 'test' folder, and a 'train' folder
- 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
- Run data.py , this will save the train and test data in npy format
- 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'
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