priors.tgv

Contents

priors.tgv#

bartorch.priors.tgv()#

Second-order total generalized variation denoising along axes, BART’s tgv.

Approximates

\[\min_{x, z} \; \tfrac12 \| x - y \|_2^2 + \lambda \bigl( \alpha_1 \| D x - z \|_1 + \alpha_0 \| E z \|_1 \bigr)\]

with \(D\) the periodic gradient along axes, \(z\) a vector field and \(E z = (D z + (D z)^T) / 2\) its symmetrized gradient; each \(\| \cdot \|_1\) sums over voxels an \(\ell_2\) norm over derivative directions. BART runs 100 ADMM iterations with \(\rho = 0.1\). The mean of input is preserved.

Parameters:
  • input (torch.Tensor) – Image \(y\), of at most 15 axes.

  • lamda (float) – \(\lambda\), in the units of input’s values.

  • axes (int or tuple of int) – Axes along which differences are taken.

  • alpha (tuple of float, default=None) – \((\alpha_1, \alpha_0)\); BART’s (1, sqrt(3)) when omitted.

  • tvscales (tuple of float, default=None) – Nonzero weight of the derivative along each axis of axes, in the same order, applied in both \(D\) and \(E\).

Returns:

Denoised image \(x\), of input’s shape.

Return type:

torch.Tensor

Raises:

ValueError – More than 15 axes; tvscales not one nonzero value per axis, or more than five.