Scale

class deepinv.transform.Scale(*args, factors=None, padding_mode='reflection', mode='bicubic', **kwargs)[source]

Bases: Transform

2D Scaling.

Resample the input image on a grid obtained using an isotropic dilation, with random scale factor and origin. By default, the input image is viewed as periodic and the output image is effectively padded by reflections. Additionally, resampling is performed using bicubic interpolation.

See the paper Self-Supervised Learning for Image Super-Resolution and Deblurring for more details.

Note each image in the batch is transformed independently.

Parameters:
  • factors (list) – list of scale factors (default: [.75, .5])

  • padding_mode (str) – padding mode for grid sampling

  • mode (str) – interpolation mode for grid sampling

  • n_trans (int) – number of transformed versions generated per input image.

  • rng (torch.Generator) – random number generator, if None, use torch.Generator(), defaults to None

Examples using Scale:

Image transforms for equivariance & augmentations

Image transforms for equivariance & augmentations

Image transformations for Equivariant Imaging

Image transformations for Equivariant Imaging