Hey, I'd like to encourage you to find such answers in the code. That is certainly faster than for one of us to step in and explain it :-)
class_locations is a dictionary that contains the coordinates of randomly selected pixels belonging to the classes (or regions). It is used to sample foreground patches (instead of running np.where all the time which eats up a lot of CPU and would require us to have the whole segmentation in memory)
crop_bbox is there so that we remember where the case was cropped during preprocessing. This is used to place the predicted segmentation back into the proper coordinate system. Cropping is only relevant for datasets where the images have a lot of 0-valued pixels around a central nonzero region, such as BraTS.
use_nonzero_mask_for_norm if we cropped a lot during preprocessing, use a mask of nonzero image pixels to normalize the image and leave all 0-valued pixels at 0. Relevant for brats etc only where we want to normalize the brain but not the black background
size_after_cropping size after cropping (but before resampling to target spacing)
size_after_resampling does not exist
-1 is nonzero mask (see above), 0 is background, 1 is your foreground class
Hi Team,
What is class_locations, crop_bbox, use_nonzero_mask_for_norm?
What is class_locations, crop_bbox, use_nonzero_mask_for_norm, size_after_cropping, size_after_resampling used for?
Why does "classes": [ -1.0, 0.0, 1.0] have 3 values while my dataset has only 2 labels: background and the main organ.