LION.models.CNNs.dncnn

Classes

DnCNN([model_parameters])

DnCNN (Zhang et al., 2017): a denoiser of blocks convolutional layers that learns the noise (residual: the output is the input minus it).


class LION.models.CNNs.dncnn.DnCNN(model_parameters=None)[source]

Bases: LIONmodel

DnCNN (Zhang et al., 2017): a denoiser of blocks convolutional layers that learns the noise (residual: the output is the input minus it). Takes images.

model_parameters (default_parameters()):

  • in_channels: the images’ channels (1);

  • int_channels: the hidden layers’ channels (64);

  • kernel_size: 3x3;

  • blocks: the number of layers (20);

  • residual: learn the noise (True);

  • bias_free: no biases, as bias-free denoisers (False);

  • act: a torch.nn.functional activation (“leaky_relu”);

  • enforce_positivity: a ReLU on the output (False);

  • batch_normalisation: as in the paper (True).

Initialize internal Module state, shared by both nn.Module and ScriptModule.

static default_parameters()[source]

The paper’s DnCNN: 20 layers of 64 channels with batch normalisation, learning the noise (see the class).

static cite(cite_format='bib')[source]

Where DnCNN comes from: its citation, BibTeX (“bib”) or “MLA”.

forward(x)[source]

The denoised images x (B, in_channels, H, W).