Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data preprocessing #1

Open
mathpluscode opened this issue Jan 12, 2021 · 8 comments
Open

Data preprocessing #1

mathpluscode opened this issue Jan 12, 2021 · 8 comments

Comments

@mathpluscode
Copy link
Member

mathpluscode commented Jan 12, 2021

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

  • Brain extraction (skull stripping). @fepegar suggests using ROBEX thanks to its speed and robustness.

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
Copy link
Member Author

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

@fepegar
Copy link
Collaborator

fepegar commented Jan 12, 2021

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
Copy link
Member Author

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
Copy link
Collaborator

fepegar commented Jan 12, 2021

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
Copy link
Member Author

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
Copy link
Collaborator

fepegar commented Jan 12, 2021

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
Copy link
Member Author

mathpluscode commented Jan 12, 2021

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
Copy link
Collaborator

fepegar commented Jan 12, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants