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.primalorpyproximal.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:
- proxf
pyproximal.ProxOperator Proximal operator of f function. In the case of solver=”gradientdescent”, it must implement the `grad method
- red
pyproximal.proximal.RED RED operator
- x0
numpy.ndarray Initial vector
- solver
pyproximal.optimization.primalorpyproximal.optimization.primaldualorstr Solver of choice or
"gradientdescent"for gradient-descent solver or"fixedpoint"for fixed-point solver- kwargs_solver
dict Additional parameters required by the selected solver. For
solver="gradientdescent", the parameteralphacorresponds to the step size; forsolver="fixedpoint", the parameterniter_innercorresponds to the number of iterations of the inner loop
- proxf
- Returns:
- out
numpy.ndarrayortuple Output of the solver of choice. For
- out
- Raises:
- ValueError
If
solver="gradientdescent"andproxfdoes not implement thegradmethod orsolver="fixedpoint"andproxfis not ofpyproximal.proximal.L2type.
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.REDfor 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.