cerebras.modelzoo.data.vision.segmentation.transforms.resample_transforms.SimulateLowResolutionTransform#

class cerebras.modelzoo.data.vision.segmentation.transforms.resample_transforms.SimulateLowResolutionTransform[source]#

Bases: object

Downsamples each sample (linearly) by a random factor and upsamples to original resolution again (nearest neighbor)

Info: * Uses scipy zoom for resampling. * Resamples all dimensions (channels, x, y, z) with same downsampling factor (like isotropic=True from linear_downsampling_generator_nilearn)

Parameters
  • zoom_range – can be either tuple/list/np.ndarray or tuple of tuple. If tuple/list/np.ndarray, then the zoom

  • zoom_range[0] (factor will be sampled from) –

  • zoom_range[1] (zoom < 0 = downsampling!) –

  • for (each inner tuple will give a sampling interval for each axis (allows for different range of zoom values) –

  • axis (each) –

  • p_per_channel

  • per_channel (bool) – whether to draw a new zoom_factor for each channel or keep one for all channels

  • channels (list, tuple) – if None then all channels can be augmented. If list then only the channel indices can

  • augmented (be) –

  • order_downsample

  • order_upsample

Methods

__init__(zoom_range=(0.5, 1), per_channel=False, p_per_channel=1, channels=None, order_downsample=1, order_upsample=0, data_key='data', p_per_sample=1, ignore_axes=None)[source]#
__call__(**data_dict)[source]#

Call self as a function.