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

class cerebras.modelzoo.data.vision.segmentation.transforms.custom_transforms.MaskTransform[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

__init__(dct_for_where_it_was_used, mask_idx_in_seg=1, set_outside_to=0, data_key='data', seg_key='seg')[source]#

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

__call__(**data_dict)[source]#

Call self as a function.