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

BRATS dataset version and processing #3

Open
JSGrondin opened this issue Jun 6, 2023 · 7 comments
Open

BRATS dataset version and processing #3

JSGrondin opened this issue Jun 6, 2023 · 7 comments

Comments

@JSGrondin
Copy link

Hi,
Thanks a lot for your paper and for sharing your implementation. I would like to confirm what version of the BRATS dataset did you use? Was it the 2018 version and only the Training set, or did you use another version? Also, from looking at the naming of the brats directory that you used ('brats_processed'), I understand that some processing was used as a preliminary step. I was wondering if you could give more details on this, if not provide the preprocessing steps in the codebase as well?

@chinmay5
Copy link
Owner

chinmay5 commented Jun 7, 2023

We performed skull-stripping and alignment to the MNI space. Finally, we take a crop of 96 x 96 x 96 as the input. Perhaps, @hongweilibran can shed some light. We will try to upload the preprocessing script by next week.

@JSGrondin
Copy link
Author

@chinmay5 , thanks for your answer! If that is not easy, a sample of the dataset and file structure would be great! I'm interested in testing your implementation of 3D ViT-AE++ on my 3D medical dataset but would need to know how to prepare my data in a format that is readily usable. I would have liked also to try to reproduce your results on BRATS first but if that is not easily doable, I'll go straight to using my dataset. Which version of BRATS did you use (what year, training only?), which source did you use for the download?

@chinmay5
Copy link
Owner

Sorry for the late response. We will try to upload the script for processing the BraTS dataset asap. Yes, we only used the training split. We preprocess the individual scans to generate a 96 x 96 x 96 crop. We stack all the individual crops together into a large matrix of shape

num_samples, 96, 96, 96, num_modalities.

You can observe this line performs a transpose operation to ensure channel-first mode. The line should be commented out if you stack the array channel first.

@joangog
Copy link

joangog commented Dec 1, 2023

@chinmay5
In brats_split.py you seem to be using only a file called flair_all.npy. Does that means that you only use flair images in your large matrix? Above you mentioned that you also have a dimension for the modalities for that matrix so I am a little confused. Where in brats_split.py are you using all the modalities to create the splits?

@joangog
Copy link

joangog commented Dec 1, 2023

@chinmay5
Also, it seems like you load the .npy file whole into memory. I tried creating my own preprocessing script but unfortunately I run out of memory very fast because I tried to create the large matrix that you are suggesting. Did you do some kind of batch-processing? How did you deal with this issue?

@chinmay5
Copy link
Owner

Hi, @joangog, Sorry for the late response. The code was uploaded after some ablations. So, the experiments are not only for the Flair channel. Please feel free to update the script. Regarding the preprocessing script, in case you run out of memory, please load the files at run time. The disk IO can slow things a bit but hopefully, not by a lot, especially if you can start with multiple threads. Let me know how it goes.

@gaoqiong123
Copy link

could you tell me what the flair_all.npy、feature_flair.npy and label_all.npy is? and how can I get them ? which process code was used? thank you

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

4 participants