cerebras.modelzoo.data.vision.segmentation.transforms.custom_transforms.MaskTransform#

class cerebras.modelzoo.data.vision.segmentation.transforms.custom_transforms.MaskTransform(dct_for_where_it_was_used, mask_idx_in_seg=1, set_outside_to=0, data_key='data', seg_key='seg')[source]#

Bases: object

data[mask < 0] = 0 Sets everything outside the mask to 0. CAREFUL! outside is defined as < 0, not =0 (in the Mask)!!!

Parameters
  • dct_for_where_it_was_used

  • mask_idx_in_seg

  • set_outside_to

  • data_key

  • seg_key

Methods