WaveletDictDenoiser#

class deepinv.models.WaveletDictDenoiser(level=3, list_wv=['db8', 'db4'], max_iter=10, non_linearity='soft', wvdim=2, device='cpu')[source]#

Bases: Denoiser

Overcomplete Wavelet denoising with the \(\ell_1\) norm.

This denoiser is defined as the solution to the optimization problem:

\[\underset{x}{\arg\min} \; \|x-y\|^2 + \lambda \|\Psi x\|_n\]

where \(\Psi\) is an overcomplete wavelet transform, composed of 2 or more wavelets, i.e., \(\Psi=[\Psi_1,\Psi_2,\dots,\Psi_L]\), \(\lambda>0\) is a hyperparameter, and where \(\|\cdot\|_n\) is either the \(\ell_1\) norm (non_linearity="soft"), the \(\ell_0\) norm (non_linearity="hard") or a variant of the \(\ell_0\) norm (non_linearity="topk") where only the top-k coefficients are kept; see deepinv.models.WaveletDenoiser() for more details.

The solution is not available in closed-form, thus the denoiser runs an optimization algorithm for each test image.

Warning

This model requires Pytorch Wavelets (ptwt) to be installed. It can be installed with pip install ptwt.

Parameters:
  • level (int) – decomposition level of the wavelet transform.

  • wv (list[str]) – list of mother wavelets. The names of the wavelets can be found in here. (default: [“db8”, “db4”]).

  • device (str) – cpu or gpu.

  • max_iter (int) – number of iterations of the optimization algorithm (default: 10).

  • non_linearity (str) – “soft”, “hard” or “topk” thresholding (default: “soft”)

forward(y, ths=0.1, **kwargs)[source]#

Run the model on a noisy image.

Parameters:
psi(x, **kwargs)[source]#

Returns a flattened list containing the wavelet coefficients for each wavelet.

Examples using WaveletDictDenoiser:#

3D wavelet denoising

3D wavelet denoising