PhysicsMultiScaler#

class deepinv.physics.PhysicsMultiScaler(physics, img_shape, filter='sinc', factors=[2, 4, 8], device='cpu', **kwargs)[source]#

Bases: Physics

Multi-scale wrapper for physics operators.

This class applies a physics model at a given scale by upsampling the input signal before applying the base physics operator.

\[A(x) = A_{base}(U_{scale}(x))\]

where \(U_{scale}\) is the upsampling operator for the given scale and \(A_{base}\) is the base physics operator.

By default, we assume that the factors for the different scales are [2, 4, 8]. The 1st scale corresponds to upsampling by a factor of 2, the 2nd scale corresponds to upsampling by a factor of 4, and so on. The 0th scale corresponds to the base physics operator without upsampling.

Parameters:
  • physics (deepinv.physics.Physics) – base physics operator.

  • img_shape (tuple) – shape of the input image (C, H, W).

  • filter (str) – type of filter to use for upsampling, e.g., ‘sinc’, ‘nearest’, ‘bilinear’.

  • factors (list[int]) – list of factors to use for upsampling.

  • device (torch.device, str) – device to use for the upsampling operator, e.g., ‘cpu’, ‘cuda’.