deepmr.prox.TVDenoiser#
- class deepmr.prox.TVDenoiser(*args: Any, **kwargs: Any)[source]#
Proximal operator of the isotropic Total Variation operator.
This algorithm converges to the unique image \(x\) that is the solution of
\[\underset{x}{\arg\min} \; \frac{1}{2}\|x-y\|_2^2 + \gamma \|Dx\|_{1,2},\]where \(D\) maps an image to its gradient field.
The problem is solved with an over-relaxed Chambolle-Pock algorithm (see L. Condat, “A primal-dual splitting method for convex optimization involving Lipschitzian, proximable and linear composite terms”, J. Optimization Theory and Applications, vol. 158, no. 2, pp. 460-479, 2013.
Code (and description) adapted from
deepinv
, in turn adapted from Laurent Condat’s matlab version (https://lcondat.github.io/software.html) and Daniil Smolyakov’s code.This algorithm is implemented with warm restart, i.e. the primary and dual variables are kept in memory between calls to the forward method. This speeds up the computation when using this class in an iterative algorithm.
- trainable#
If
True
, threshold value is trainable, otherwise it is not. The default isFalse
.- Type:
bool, optional
- device#
Device on which the wavelet transform is computed. The default is
None
(infer from input).- Type:
str, optional
- x2#
Primary variable for warm restart. The default is
None
.- Type:
torch.Tensor, optional
- u2#
Dual variable for warm restart. The default is
None
.- Type:
torch.Tensor, optional
Notes
The regularization term \(\|Dx\|_{1,2}\) is implicitly normalized by its Lipschitz constant, i.e. \(\sqrt{8}\), see e.g. A. Beck and M. Teboulle, “Fast gradient-based algorithms for constrained total variation image denoising and deblurring problems”, IEEE T. on Image Processing. 18(11), 2419-2434, 2009.
- __init__(ndim, ths=0.1, trainable=False, device=None, verbose=False, niter=100, crit=1e-05, x2=None, u2=None)[source]#
Methods
__init__
(ndim[, ths, trainable, device, ...])forward
(input)