medicaltorch
medicaltorch copied to clipboard
mask number must be 3 ?
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 ?
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 ?
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)
.
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.
Maybe this issue should be closed?