DScCP#
- class deepinv.models.DScCP(depth=20, n_channels_per_layer=64, pretrained='download', pretrained_2d_isotropic=False, device=None, dim=2)[source]#
Bases:
DenoiserDScCP denoiser network.
The network architecture is based on the paper from Le et al.[1]. and has an unrolled architecture based on the fast Chambolle-Pock algorithm using strong convexity. DScCP stands for Deep Strongly Convex Chambolle Pock.
The pretrained weights are trained with the default parameters of the network, i.e. depth=20 layers, n_channels_per_layer=64 channels. They can be downloaded via setting
pretrained='download'.- Parameters:
depth (int) β depth i.e. number of convolutional layers.
n_channels_per_layer (int) β number of channels per convolutional layer.
pretrained (str, None) β
pretrained='download'to download pretrained weights, or path to local weights file. When building a 3D network, it is possible to initialize with 2D pretrained weights by usingpretrained='download_2d', which provides a good starting point for fine-tuning.pretrained_2d_isotropic (bool) β when loading 2D pretrained weights into a 3D network, whether to initialize the 3D kernels isotropically. By default the weights are loaded axially, i.e., by initializing the central slice of the 3D kernels with the 2D weights.
device (torch.device, str) β βcudaβ, βmpsβ or βcpuβ.
dim (str, int) β Whether to build 2D or 3D network (if str, can be β2β, β2dβ, β3Dβ, etc.)
- References:
- forward(x, sigma=0.03)[source]#
Run the denoiser on noisy image.
- Parameters:
x (torch.Tensor) β noisy image.
sigma (float) β noise level.