deepmr.prox.TGVDenoiser#

class deepmr.prox.TGVDenoiser(*args: Any, **kwargs: Any)[source]#

Proximal operator of (2nd order) Total Generalised Variation operator.

(see K. Bredies, K. Kunisch, and T. Pock, “Total generalized variation,” SIAM J. Imaging Sci., 3(3), 492-526, 2010.)

This algorithm converges to the unique image \(x\) (and the auxiliary vector field \(r\)) minimizing

\[\underset{x, r}{\arg\min} \; \frac{1}{2}\|x-y\|_2^2 + \lambda_1 \|r\|_{1,2} + \lambda_2 \|J(Dx-r)\|_{1,F}\]

where \(D\) maps an image to its gradient field and \(J\) maps a vector field to its Jacobian. For a large value of \(\lambda_2\), the TGV behaves like the TV. For a small value, it behaves like the \(\ell_1\)-Frobenius norm of the Hessian.

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 Laurent Condat’s matlab version (https://lcondat.github.io/software.html) and Daniil Smolyakov’s code.

ndim#

Number of spatial dimensions, can be either 2 or 3.

Type:

int

ths#

Denoise threshold. The default is 0.1.

Type:

float, optional

trainable#

If True, threshold value is trainable, otherwise it is not. The default is False.

Type:

bool, optional

device#

Device on which the wavelet transform is computed. The default is None (infer from input).

Type:

str, optional

verbose#

Whether to print computation details or not. The default is False.

Type:

bool, optional

niter#

Maximum number of iterations. The default is 1000.

Type:

int, optional,

crit#

Convergence criterion. The default is 1e-5.

Type:

float, 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

r2#

Auxiliary variable for warm restart. The default is None.

Type:

torch.Tensor, optional

Notes

The regularization term \(\|r\|_{1,2} + \|J(Dx-r)\|_{1,F}\) is implicitly normalized by its Lipschitz constant, i.e. \(\sqrt{72}\), see e.g. K. Bredies et al., “Total generalized variation,” SIAM J. Imaging Sci., 3(3), 492-526, 2010.

__init__(ndim, ths=0.1, trainable=False, device=None, verbose=False, niter=100, crit=1e-05, x2=None, u2=None, r2=None)[source]#

Methods

__init__(ndim[, ths, trainable, device, ...])

forward(input)