pyproximal.optimization.red.RED

pyproximal.optimization.red.RED(proxf: ~pyproximal.ProxOperator.ProxOperator, red: ~pyproximal.proximal.RED.RED, x0: ~numpy.ndarray[tuple[~typing.Any, ...], ~numpy.dtype[~numpy._typing._array_like._ScalarT]], solver: ~collections.abc.Callable[[...], ~numpy.ndarray[tuple[~typing.Any, ...], ~numpy.dtype[~numpy._typing._array_like._ScalarT]]] | ~typing.Literal['gradientdescent', 'fixedpoint'] = <function ADMM>, **kwargs_solver: dict[str, ~typing.Any]) ndarray[tuple[Any, ...], dtype[_ScalarT]] | tuple[ndarray[tuple[Any, ...], dtype[_ScalarT]], ...][source]

Regularization by Denoising (RED) solver

Solves the following minimization problem:

\[\mathbf{x} = \argmin_{\mathbf{x}} f(\mathbf{x}) + \sigma \mathbf{x}^T (\mathbf{x} - g_{\sigma_d}(\mathbf{x}))\]

using either any of the proximal solvers in pyproximal.optimization.primal or pyproximal.optimization.primaldual, or the gradient descent of fixed point solvers.

Here \(f(\mathbf{x})\) is a function that has a known gradient or proximal operator, whilst \(g_{\sigma_d}(\mathbf{x})\) is a denoiser acting on a noisy signal with noise strenght equal to sigma_d.

Parameters:
proxfpyproximal.ProxOperator

Proximal operator of f function. In the case of solver=”gradientdescent”, it must implement the `grad method

redpyproximal.proximal.RED

RED operator

x0numpy.ndarray

Initial vector

solverpyproximal.optimization.primal or pyproximal.optimization.primaldual or str

Solver of choice or "gradientdescent" for gradient-descent solver or "fixedpoint" for fixed-point solver

kwargs_solverdict

Additional parameters required by the selected solver. For solver="gradientdescent", the parameter alpha corresponds to the step size; for solver="fixedpoint", the parameter niter_inner corresponds to the number of iterations of the inner loop

Returns:
outnumpy.ndarray or tuple

Output of the solver of choice. For

Raises:
ValueError

If solver="gradientdescent" and proxf does not implement the grad method or solver="fixedpoint" and proxf is not of pyproximal.proximal.L2 type.

Notes

The Regularization by Denoising (RED) term can be used with any proximal solvers, since its proximal operator can be easily evaluated via fixed-point iterations (see Notes of pyproximal.proximal.RED for more details).

However, [1] presented two additional solvers, namely:

  • gradient descent (for differentiable \(f\)):

    \[\mathbf{x}^{k+1} = \mathbf{x}^k - \alpha (\nabla_f(\mathbf{x}^k) + \mathbf{x}^k - g_{\sigma_d}(\mathbf{x}^k))\]
  • fixed point (for \(f= \frac{\sigma_{\mathbf{Op}}}{2} ||\mathbf{Op}\mathbf{x} - \mathbf{b}||_2^2\)):

    \[\begin{split}\mathbf{y}^k = g_{\sigma_d}(\mathbf{x}^k)\\ \mathbf{x}^{k+1} = (\sigma_{\mathbf{Op}} \mathbf{Op}^H\mathbf{Op} + \sigma \mathbf{I})^{-1} (\sigma_{\mathbf{Op}} \mathbf{Op}^H \mathbf{b} + \sigma \mathbf{y}^k)\end{split}\]

References

[1]

Romano, Y., Elad, M., and Milanfar, P. “The Little Engine that Could Regularization by Denoising (RED)”, SIAM Journal on Imaging Science. 2017.

Examples using pyproximal.optimization.red.RED

Regularization by Denoising (RED)

Regularization by Denoising (RED)