Training U-Net on one label form multi labels mri image (using Monai or Pytorch)

208 Views Asked by At

I am training a U-Net using Monai, which is based on Pytorch. I am using Decathlon Dataset, where each segmentation image has two labels (one for the organ and the other for the tumour). What I want is to ignore the first label (organ segmentation) and train the network on the second label (tumour segmentation). I don't know if I should delete one label from the images manually(This will take me a lot of time if I have hundreds of images). Is there a way to do it using code? What is the right way to do it? Is there any existing function in Monai? Because Opening each image as a tensor, reading its values and replacing label 1 with the background pixel might be time and resource-consuming. Thanks

I tried to search on Monai docs to get a simple code but I didn't find.

0

There are 0 best solutions below