Defining an ROI to Restrict Sampling #577
-
Hi There, Thank you for sharing "nnUNet" on GitHub. Is there any way we can provide the model with a pre-defined ROI to restrict the data sampling to regions within the ROI? I realize this may not make a ton of sense given the patch size is very large. Perhaps I can simply crop my images to the pre-defined ROI and filter out any out-of-ROI probabilities as a post-processing step. Also, there seems to be an option in the network configuration to define a mask for normalization as defined by the parameter "use_mask_for_norm" parameter listed in the config summary prior to initiating the training. I don't see this parameter in the setup "dataset.json" example file. Is this parameter settable? Thank You, -Brayden |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi Brayden, this mask is not settable. It is intended for images where the object of interest (like the brain) is surrounded by black background pixels. For those images it is common practice to only use the brain region for normalization. If you want to only train on specific ROIS, the best way to do that would be to crop the images to the desired ROI before you give them to nnU-Net (as you suggested). Mote that nnU-Net will then only be able to make predictions in the parts that are covered by the ROIs, so you will need to also crop all the images you intend to apply the models to. Best, |
Beta Was this translation helpful? Give feedback.
Hi Brayden,
this mask is not settable. It is intended for images where the object of interest (like the brain) is surrounded by black background pixels. For those images it is common practice to only use the brain region for normalization.
If you want to only train on specific ROIS, the best way to do that would be to crop the images to the desired ROI before you give them to nnU-Net (as you suggested). Mote that nnU-Net will then only be able to make predictions in the parts that are covered by the ROIs, so you will need to also crop all the images you intend to apply the models to.
Best,
Fabian