All Projects → mirzaevinom → prostate_segmentation

mirzaevinom / prostate_segmentation

Licence: other
NCI-ISBI 2013 Challenge - Automated Segmentation of Prostate Structures

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to prostate segmentation

Semanticsegpapercollection
Stars: ✭ 102 (+264.29%)
Mutual labels:  fully-convolutional-networks, instance-segmentation
Segmentation
Tensorflow implementation : U-net and FCN with global convolution
Stars: ✭ 101 (+260.71%)
Mutual labels:  unet, fully-convolutional-networks
Pytorch Unet
Simple PyTorch implementations of U-Net/FullyConvNet (FCN) for image segmentation
Stars: ✭ 470 (+1578.57%)
Mutual labels:  unet, fully-convolutional-networks
image-segmentation
Mask R-CNN, FPN, LinkNet, PSPNet and UNet with multiple backbone architectures support readily available
Stars: ✭ 62 (+121.43%)
Mutual labels:  unet, instance-segmentation
Data Science Bowl 2018
End-to-end one-class instance segmentation based on U-Net architecture for Data Science Bowl 2018 in Kaggle
Stars: ✭ 56 (+100%)
Mutual labels:  unet, instance-segmentation
celldetection
Cell Detection with PyTorch.
Stars: ✭ 44 (+57.14%)
Mutual labels:  unet, instance-segmentation
segmentation-enhanced-resunet
Urban building extraction in Daejeon region using Modified Residual U-Net (Modified ResUnet) and applying post-processing.
Stars: ✭ 34 (+21.43%)
Mutual labels:  unet
SimCal
Implementation of ECCV20 paper: the devil is in classification: a simple framework for long-tail object detection and instance segmentation
Stars: ✭ 99 (+253.57%)
Mutual labels:  instance-segmentation
Unets
Implemenation of UNets for Lung Segmentation
Stars: ✭ 18 (-35.71%)
Mutual labels:  unet
R Unet
Video prediction using lstm and unet
Stars: ✭ 25 (-10.71%)
Mutual labels:  unet
labelme2coco
How to create custom COCO data set for instance segmentation
Stars: ✭ 125 (+346.43%)
Mutual labels:  instance-segmentation
tiny-pix2pix
Redesigning the Pix2Pix model for small datasets with fewer parameters and different PatchGAN architecture
Stars: ✭ 21 (-25%)
Mutual labels:  unet
pytorch solov2
SOLOv2 pytorch (without mmdetection and mmcv)
Stars: ✭ 68 (+142.86%)
Mutual labels:  instance-segmentation
Brainy
Brainy is a virtual MRI analyzer. Just upload the MRI scan file and get 3 different classes of tumors detected and segmented. In Beta.
Stars: ✭ 29 (+3.57%)
Mutual labels:  unet
U-Time
U-Time: A Fully Convolutional Network for Time Series Segmentation
Stars: ✭ 156 (+457.14%)
Mutual labels:  fully-convolutional-networks
3d-prostate-segmentation
Segmentation of prostate from MRI scans
Stars: ✭ 36 (+28.57%)
Mutual labels:  fully-convolutional-networks
Brain-MRI-Segmentation
Smart India Hackathon 2019 project given by the Department of Atomic Energy
Stars: ✭ 29 (+3.57%)
Mutual labels:  unet
open-solution-ship-detection
Open solution to the Airbus Ship Detection Challenge
Stars: ✭ 54 (+92.86%)
Mutual labels:  unet
caffe-unet-docker
The U-Net Segmentation server (caffe_unet) for Docker
Stars: ✭ 25 (-10.71%)
Mutual labels:  unet
Tensorflow-YOLACT
Implementation of the paper "YOLACT Real-time Instance Segmentation" in Tensorflow 2
Stars: ✭ 97 (+246.43%)
Mutual labels:  instance-segmentation

NCI-ISBI 2013 Challenge - Automated Segmentation of Prostate Structures (using Keras Data Augmentation)

In this work, I used deep learning methods in automated segmentation of prostate gland.

images/prostate_seg.png

The data was originally posted on Cancer Imaging Archive website in 2013 for NCI-ISBI competition. More info on this NCI-ISBI competition can be found on Cancer Imaging Archive website.

The network architecture was inspired by U-Net: Convolutional Networks for Biomedical Image Segmentation and by Keras implementation of the model by Marko Josic

This deep neural network (which I call simple U-net) achieves ~0.70 Dice coefficient (max Dice similarity coefficient is 1) on the test images (10 patients and ~300 images), and can be tuned further to achieve better results.

Overview

Data Pre-processing

Provided data is processed by dicom_to_array function. After downloading the data extract the files in the following directory structure:

-codes
 |
-data
 |
 ---- train
 |    |
 |    ---- PatientID
 |    |    |
 |    |    ---- 00001.dcm
 |    |---- PatientID.nrrd
 |    |---- ....
 ---- test
 |    |
 |    ---- PatientID
 |    |    |
 |    |    ---- 00001.dcm
 |    |---- PatientID.nrrd
 |    |---- ....
 ---- validate
 |    |
 |    ---- PatientID
 |    |    |
 |    |    ---- 00001.dcm
 |    |---- PatientID.nrrd
 |    |---- ....

The histogram of the images are equalized using skimage.exposure.equalize_hist.

All the images were resized to 96x96 (better resolution will likely provide better results)

Segmentations (masks) are provided as nrrd files. Peripheral zone (PZ) of the prostate gland is masked with some value close to 1 and the less accessible central gland (CG) is masked with values close to 2. The masks are converted to binary arrays for 1 masking whole prostate gland (not differentiating between CG and PG in this particular model).

Model

The provided model is basically modification of U-Net architecture. Original U-net has millions of weights but there only ~1000 training data available for this segmentation problem. Therefore, to avoid over-fitting, I got rid convolutional layers (both downsampling and upsampling) with 128 and 256 filters. Moreover, I have reduced number of filters in each layer. This gave me ~30k weights to be optimized.

img

Training

The training set has only ~1000 images with masks. I used Keras's ImageDataGenerator to augment data with random rotations, flips, zooms and shifts. Note that I have used the same image augmentation parameters and random seed for both images and masks. Overall, I have trained the model with fit_generator for ~150k augmented dataset. The model is trained for 30 epochs with batch size 32, where each epoch took ~3 minutes on Nvidia P100 GPUs provided by Ohio Supercomputer Center. Memory footprint of the model is ~2GB. After 30 epochs, calculated Dice coefficient is ~0.70 on test images.

Predictions

Top 3 predictions by Dice coefficient

images/best_predictions.png

Bottom 3 predictions by Dice coefficient

images/worst_predictions.png

For the worst predictions, even I am having difficulties defining the prostate boundaries.

How to use

Dependencies

This tutorial depends on the following libraries:

  • scikit-image, numpy, matplotlib
  • pydicom
  • pynrrd
  • Tensorflow
  • Keras >= 2.0

This code should also be compatible with Theano backend of Keras, but in my experience Theano is slower than TensorFlow.

Running the model

  • Run python train.py to pre-process the data and train the model. Model weights are save in file ../data/weights.h5 .

  • Run python test.py to test the model and generate some images with some best and worst predictions.

Acknowledgements

  • This material is based upon work supported by the National Science Foundation under Agreement No. 0931642

  • Mathematical Biosciences Institute at Ohio State University

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].