Segmentation Tool The tool is capable of taking a 3D CT-Volume of arbitrary size as input and generates a label map of the same size and resolution as the input volume using CNNs. The network used in the tool can easily be changed to any trained caffe model. The neural network that is currently itegrated in the segmentation tool is a W-Net trained on 137 abdominal CT-images to segment the pathological pancreas. All the patients in the training set have pancreatic cancer. Two networks at different resolutions are utilized. The first coarse stage is used to select a ROI for the second precise stage. Global Contrast Normalization is performed on the input images, they are resampled, rescaled to values between zero and one and fed as input to the coarse stage. The coarse stage performs a rough first segmentation. The generated label map is used to calculate the estimated location of the center of the organ. The input image is resampled and a ROI is cropped around the estimated center of the pancreas. The cropped and resampled image is then passed as an input to the precise stage. The resulting final segmentation is resampled and zero-padded to have the same size and resolution as the original input volume. The segmentation tool is implemented in python and pycaffe. The architecture and the pre-trained weights can be changed by either specifying a different path in the configuration file main.py or by exchanging the files in the standard folders 'Models' and 'Prototxt'. The tool can load a single image or multiple images from a folder using the 'DataManager' class implemented with SimpleITK and numpy. The path to the input image can be passed as an input argument. By default, the segmentation tool runs on the CPU, but with the optional argument "-gpu" the parallel processing power of the GPU is utilized. By default, the segmentations are saved in the input folder, but an alternative destination can be specified after the argument "-output". In order to utilize GPU acceleration CUDA eight is needed on the system. CuDNN five can be used to further speed up the segmentation process. In order to use the segmentation tool, a custom-3D-Caffe has to be installed on a Linux based system from 'https://github.com/faustomilletari/3D-Caffe'. Alternatively, the official Caffe version from 'https://github.com/BVLC/caffe' can be used, but without CuDNN support. Unfortunately, the official Caffe version does not support 3D CuDNN PReLU layers, only 2D CuDNN PReLU layers or 3D CUDA PReLU layers, while the custom-3D-Caffe version supports all of them. The file path to the python folder within the 3D-Caffe installation folder has to be added to the Python path off the system. The segmentation tool relies on the python dependencies 'numpy', 'simpleitk' and 'scikit-image'.
MarkusHoenig/Segmentation-Tool
Segmentation tool that segments 3D medical images using CNNs. Trained on CT-images of the pathological pancreas with Caffe.
Python