cerebras.modelzoo.data.vision.segmentation.transforms.resample_augmentations.augment_linear_downsampling_scipy#
- cerebras.modelzoo.data.vision.segmentation.transforms.resample_augmentations.augment_linear_downsampling_scipy(data_sample, zoom_range=(0.5, 1), per_channel=True, p_per_channel=1, channels=None, order_downsample=1, order_upsample=0, ignore_axes=None)[source]#
Downsamples each sample (linearly) by a random factor and upsamples to original resolution again (nearest neighbor)
Info: * Uses scipy zoom for resampling. A bit faster than nilearn. * 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 – probability for downsampling/upsampling a 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 –
ignore_axes – tuple/list