medicaltorch icon indicating copy to clipboard operation
medicaltorch copied to clipboard

mask number must be 3 ?

Open Ng-ms opened this issue 6 years ago • 4 comments

i have one folder for mask but it gives me error FileNotFoundError: No such file or no access: 'C:\~~~\nii format\site1-sc01-mask-r3.nii.gz'

what i should change in train_dataset = mt_datasets.SCGMChallenge2DTrain(root_dir=ROOT_DIR_GMCHALLENGE, transform=composed_transform) to make it work with one mask ?

Ng-ms avatar Feb 24 '19 20:02 Ng-ms

is the code written for one dataset? my data has one mask for each image and it is asking for the other three , is there a way to change to make it work on my dataset ?

Ng-ms avatar Feb 25 '19 21:02 Ng-ms

Hi @Najat91, the class SCGMChallenge2DTrain was made to load data from a specific dataset (the SCGM Challenge), if you want to load your own data, you should use the class MRI2DSegmentationDataset where you just have to pass a list of tuples in the format (input filename, ground truth filename).

perone avatar Feb 26 '19 18:02 perone

Hi @Najat91 , As discussed over LinkedIn and confirmed by @perone , you can use the above method to load custom dataset. In other specific cases you can use nibabel and nilearn libraries & create your own custom data-loaders in PyTorch.

MohitTare avatar Feb 27 '19 04:02 MohitTare

Maybe this issue should be closed?

asciidiego avatar Aug 16 '19 12:08 asciidiego