DeepRegNet / Benchmark

Repositories for benchmarks with DeepReg and other methods.
Apache License 2.0
3 stars 0 forks source link

Data preprocessing #1

Open mathpluscode opened 3 years ago

mathpluscode commented 3 years ago

As discussed, we would like to firstly use the T1 images (581 subjects, 4.6 GB) in IXI Dataset.

Some preprocessing procedures are still needed as

The data should be organized in a compatible way for DeepReg, especially in form of unpaired data, e.g. example data.

We also aim to provide an open-accessible preprocessing script to ensure the reproducibility.

mathpluscode commented 3 years ago

@acasamitjana @fepegar Feel free to add more preprocessing procedures ^^

fepegar commented 3 years ago

As discussed, we would like to firstly use the T1 images (581 subjects, 4.6 GB) in IXI Dataset.

Is it settled that we're using IXI? Didn't @YipengHu say that we would decide which dataset to use after reading the VoxelMorph paper?

We also aim to provide an open-accessible preprocessing script to ensure the reproducibility.

Happy to provide scripts to download IXI, segment the brain and register to MNI (I use NiftyReg), if needed.

The data should be organized in a compatible way for DeepReg, especially in form of "unpaired data".

Do you have a link about how to do this?

mathpluscode commented 3 years ago

As discussed, we would like to firstly use the T1 images (581 subjects, 4.6 GB) in IXI Dataset.

Is it settled that we're using IXI? Didn't @YipengHu say that we would decide which dataset to use after reading the VoxelMorph paper?

Oh, ok. I thought it's decided, but yes of course we can see if there's any other options!

We also aim to provide an open-accessible preprocessing script to ensure the reproducibility.

Happy to provide scripts to download IXI, segment the brain and register to MNI (I use NiftyReg), if needed.

Cool ;) So here you talking about

  1. download the dataset
  2. extract the brain
  3. register to MNI? what does this mean?

The data should be organized in a compatible way for DeepReg, especially in form of "unpaired data".

Do you have a link about how to do this?

Assuming we are saving files in the Nifti format, it would look like https://github.com/DeepRegNet/DeepReg/tree/main/data/test/nifti/unpaired

So the images and labels have to have the same name and stored in different folders. Further docs are in https://deepreg.readthedocs.io/en/latest/docs/dataset_loader.html#unpaired-images.

If it's not clear, please ping me.

fepegar commented 3 years ago

register to MNI? what does this mean?

Sorry, by registering to MNI I mean registering all images to a common space, the Montreal Neurological Institute (MNI) space. There are multiple choices for the specific template, but it's not very important for our application. We can store just the affine matrix (and not the resampled image). Registering to MNI will be handy to have tight crops of the brain if needed.

Assuming we are saving files in the Nifti format

Yes, neuroimages are almost always NIfTI.

So the images and labels have to have the same name and stored in different folders.

But we would have no labels in this case, right? As it's unsupervised. Anyway, I suppose this is not important yet. The split between train/validation/test can be performed later on, in a reproducible way, and we can create the folders using symlinks to the raw data.

mathpluscode commented 3 years ago

So the images and labels have to have the same name and stored in different folders.

But we would have no labels in this case, right? As it's unsupervised. Anyway, I suppose this is not important yet. The split between train/validation/test can be performed later on, in a reproducible way, and we can create the folders using symlinks to the raw data.

Oh if there are no labels, then we just put images like following

- train
  - images
- test
  - images
fepegar commented 3 years ago

Related to this and #4.

  1. If we use ROBEX maybe we can store the binaries in the repo (212 MB). Because one needs to agree to some terms when downloading them from NITRC. We can ask Eugenio what the best way to do this is.
  2. If we use NiftyReg for the MNI registration, it should be downloaded and compiled. I have a script for that, if needed.
mathpluscode commented 3 years ago

Related to this and #4.

  1. If we use ROBEX maybe we can store the binaries in the repo (212 MB). Because one needs to agree to some terms when downloading them from NITRC. We can ask Eugenio what the best way to do this is.
  2. If we use NiftyReg for the MNI registration, it should be downloaded and compiled. I have a script for that, if needed.

Setting up the docker images etc might take some time considering my workload here and there, I guess before that we can do whatever we want as long as it's written down somewhere. Then later we move things inside docker.

Regarding the installation, there's no way to do it using only command lines?

EDIT: I see what you mean, I guess we can either put the file inside repo, or hold it somewhere else.

fepegar commented 3 years ago

I guess we can either put the file inside repo, or hold it somewhere else.

Yes! But definitely let's ask Eugenio (@jeiglesias) about this before we host his stuff in the wrong place.