MASILab/SLANTbrainSeg

Can you point me to where the segmentation labels for the MRI are getting preprocessed?

saikat-roy opened this issue · 4 comments

Hi. I am trying to retrain your architecture on my own data by changing the training data. However, I am having a bit of trouble with your preprocessing pipeline. From what I understand after the MNI registration of the MRI volumes, something similar (I think?) needs to be done for the segmentation labels to align them with the volume.

I seem to be unable to find what is happening to the labels in preprocessing section of the repository. Could you tell me where this is happening in your code? Or have I misunderstood something?

Thanks for your question.
We did affine registration to register all atlases to MNI305 template. We used reg_aladin in nifty_reg for affine registration. So you could also do the same preprocessing.

Sorry for the very late reply. So if I am not misunderstanding the preproc_pipeline has variable names initialized for segmentation ground truth files (in model space presumably) but it doesn't actually use the variable names in the code and actually save them anywhere during the pipeline.

So I have to ask, did you have separate ground truth files for your training data (MRI + segmentation maps for each MRI) which you transformed to model space before training?

Or did you acquire ground truths for the training in some other way?

Sorry for the very late reply. So if I am not misunderstanding the preproc_pipeline has variable names initialized for segmentation ground truth files (in model space presumably) but it doesn't actually use the variable names in the code and actually save them anywhere during the pipeline.

So I have to ask, did you have separate ground truth files for your training data (MRI + segmentation maps for each MRI) which you transformed to model space before training?

Or did you acquire ground truths for the training in some other way?

All of our training data are first registered to MNI305 space, therefore, the testing data should be done in the same way. The preprocessing is done using Matlab, and preproc_pipeline.m file contains the source code.
https://github.com/MASILab/SLANTbrainSeg/blob/master/matlab/preproc_pipline.m

For the segmentation labels, you just need to propagate the registration warp field on segmentation maps with nearest-neighbor interpolation. For this part, you can refer to the postproc_pipeline.m, which we propagate the labels to original space. You just need to reverse such a process, using the same code.

Alright. Thank you very much for the help.