mrpro.algorithms.denoiser.conv_synthesis_dictionary_denoising

mrpro.algorithms.denoiser.conv_synthesis_dictionary_denoising(idata: IData, kernel: Tensor, low_pass_parameter: float, regularization_weight: float | Tensor, initial_codes: Tensor | None = None, max_iterations_low_pass_filtering: int = 16, max_iterations_pgd: int = 64, tolerance_low_pass_filtering: float = 0.0001) → IData
mrpro.algorithms.denoiser.conv_synthesis_dictionary_denoising(idata: Tensor, kernel: Tensor, low_pass_parameter: float, regularization_weight: float | Tensor, initial_codes: Tensor | None = None, max_iterations_low_pass_filtering: int = 16, max_iterations_pgd: int = 64, tolerance_low_pass_filtering: float = 0.0001) → Tensor

Apply image denoising using a pre-trained convolutional synthesis dictionary.

This algorithm solves the problems

\(x_{\mathrm{low}}:=\arg\min_x \frac{1}{2}||x - y||_2^2 + \frac{\beta}{2} ||\nabla x||_2^2\),

\(s^{\ast}:= \arg\min_s \frac{1}{2}||Ds - (y - x_{\mathrm{low}})||_2^2 + \lambda || s||_1\),

\(x^{\ast}:= Ds^\ast + x_{\mathrm{low}}\)

by using the FISTA-algorithm. Thereby, \(y\) is the given noisy image, \(D:V^{Kn} \rightarrow V^n\) is a convolutional synthesis operator with \(K\) filters, \(\lambda\) is the sparsity level, \(\nabla\) is the finite difference operator applied to \(x\) along the last n dimensions that are defined by the number of dimensions that the convolutional kernel of the dictionary is applied to.

Denoising is achieved by computing a sparse approximation of the high-pass component of the noisy image and then subsequently adding back the low-pass component of the noisy image.

Note: it is also possible to provide entire locally adaptive sparsity level maps \(\Lambda\) instead of a single scalar value \(\lambda>0\). In that case, the sparsityregularization is given by a weighted \(\ell_1\)-norm, i.e. by

\(|| z ||_{1,\Lambda}:=|| \Lambda z ||_{1}:\sum_i \lambda_i | z_i |.\)

for \(z \in V^{Kn}\), where \(\Lambda\) can be thought as a diagonal operator \(\Lambda:=\mathrm{diag}(\lambda_1, \lambda_2, \ldots, \lambda_{Kn} )\). In that case, the sparsity level map must be broacastable with elements of the domain of the convolutional synthesis operator.

Note: The noisy image idata determines on which device the algorithm will be run. This means that, for example, if idata is on the cpu and kernel on the gpu, the kernel will be transferred to the cpu. The denoised image will also be on the device specified by idata.

Parameters:
  • idata (IData | Tensor) – noisy image

  • kernel (Tensor) – convolutional kernel for the synthesis operator.

  • low_pass_parameter (float) – regularization parameter of the low-pass filtering problem.

  • regularization_weight (float | Tensor) – strength of the regularization, i.e. the sparsity of the coefficient maps.

  • initial_codes (Tensor | None, default: None) – initial estimate of the sparse coefficient maps; if None, it is initialized as zeros.

  • max_iterations_low_pass_filtering (int, default: 16) – maximum number of CG iterations for the low-pass filtering step.

  • max_iterations_pgd (int, default: 64) – maximum number of FISTA iterations for the sparse coding.

  • tolerance_low_pass_filtering (float, default: 1e-4) – tolerance of CG for the relative change of the solution; if 0, max_iterations of CG are run.

Raises:

ValueError – If regularization_weight and elements of the domain of the convolutional synthesis operator are not broadcastable.

Returns:

the denoised image.