HealthML / self-supervised-3d-tasks

Apache License 2.0
185 stars 39 forks source link

How to prepare the data? #15

Closed YurongChen1998 closed 2 years ago

YurongChen1998 commented 2 years ago

Thanks for your inspired work, and I would like to know how to prepare the data, such as BraST datasets.

When I download the BraST dataset, it includes 3 folds: ImageTr, Label, ImageTs. All files are stored as .nii.gz file, and how to use these data?

Thanks for your reply!

aihamtaleb commented 2 years ago

Hi @YurongChen1998 Thanks for your interest in using our code. You need to store the files as numpy files (format ".npy"). And then you should be able to load these files. Check out the loader scripts here: https://github.com/HealthML/self-supervised-3d-tasks/blob/master/self_supervised_3d_tasks/data/segmentation_task_loader.py or here: https://github.com/HealthML/self-supervised-3d-tasks/blob/master/self_supervised_3d_tasks/data/numpy_3d_loader.py

aihamtaleb commented 2 years ago

Btw, there is a helper script here to convert nifti files to npy: https://github.com/HealthML/self-supervised-3d-tasks/blob/master/self_supervised_3d_tasks/data_util/brats_dataset_utils.py for brats

shabbirshuvo commented 2 years ago

Hi Mr. taleb. I would like to use your code for my project. But I am not sure how to prepare my custom data for using with your model. Also I would like to know, if any documentation details on the code implementation is available? Thank you.

aihamtaleb commented 2 years ago

hi @shabbirshuvo ,

please check out the Readme: https://github.com/HealthML/self-supervised-3d-tasks/blob/master/README.md