josedolz / LiviaNET

This repository contains the code of LiviaNET, a 3D fully convolutional neural network that was employed in our work: "3D fully convolutional networks for subcortical segmentation in MRI: A large-scale study"
MIT License
161 stars 52 forks source link

Pre-/Post- processing steps #3

Closed John1231983 closed 7 years ago

John1231983 commented 7 years ago

Hi, thanks for great performance. I read your papers and interested in pre-/post- processing steps. In your paper, you mentioned that

  1. we used a simple preprocessing step that includes volume-wise intensity normalization.
  2. As the post-processing step, we remove these small regions by keeping only the largest connected component from each class.

So, given an image img (depthxwidthxheight) and ROI region-separates brain and background- the volume-wise intensity normalization means img=(img-img[ROI].mean())/img[ROI].std() (PYTHON). Am I right?

For the second point, could you provide some script to implement it? I did not find it in your code.

Thanks

josedolz commented 7 years ago

Hi @John1231983 thank you for your post.

For the pre-processing, since we employed FreeSurfer to generate the reference contours, intensity normalization was performed there. However, you are right, and to do that you basically have to subtract the mean and divide by the standard deviation. So that line should be ok to pre-process by yourself the images in python.

For the post-processing, I used regionprops in matlab. For each structure, you have to create a binary image, and then get the area of each non-connected region. I am right now on holidays, but I can provide a python script when I am back to clean the resulted segmentations.

Best