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-processing MRI images #19

Open franciscoferreira34 opened 6 years ago

franciscoferreira34 commented 6 years ago

Hi @josedolz, you mentioned in your paper that for pre-processing you applied volume-wise intensity normalization, bias-field correction and skull striping. From my understanding, this is not included in this repository as part of LiviaNet training pipeline. Is that right? If so, which methods did you used for this pre-processing?

Best, Francisco

josedolz commented 6 years ago

Hi @franciscoferreira34 Sorry for my late answer, I have been quite busy. I didn't pre-process that data directly, but I know that a student from the lab employed FreeSurfer for those tasks.

I know that nowadays you have simpleITK with functions like bias field correction, for example.

Best, Jose.

franciscoferreira34 commented 6 years ago

Thank you ;) Do you have any ideia as to how to speed up training and testing without compromissing the model's architecture and paramenters, i.e., just by optimizing LiviaNet code?

josedolz commented 6 years ago

Hi @franciscoferreira34 Maybe you can optimize the sampling process. Currently, at each sub-epoch all the volumes are loaded and sampled for that specific epoch. You could either load all the volumes in memory and sample from them directly (without the need of loading the volumes at each sub-epoch) or load the volumes each N epochs and sample patches for the next M epochs. For testing an option could be to prune the network once it is trained (and maybe re-fine a bit) so that you remove the weakest connections.

Best

franciscoferreira34 commented 6 years ago

Thank you for the suggestions ;)

franciscoferreira34 commented 6 years ago

Just a question: what's the difference between an epoch and a sub-epoch. To accelerate training could I just make every epoch with just 1 sub-epoch and generate as much samples as LiviaNet would generate on the sum of all subepochs? For example, if I have 20 sub-epochs, each one with 1000 samples, can i replace that with 1 sub-epochs with 20.000 samples? Tks ;)