BlindRLIteration#

class deepinv.optim.optim_iterators.BlindRLIteration(k_prior=None, normalize_kernel=True, use_fft=False, eps=1e-8, **kwargs)[source]#

Bases: OptimIterator

Iterator for Blind Richardson-Lucy deconvolution.

This iterator performs one step to estimate the next kernel, and one step to estimate the next image.

The current iterate is stored as X["est"] = (x, k). The kernel update assumes 2D circular convolution and a spatially invariant kernel shared by all image channels.

Parameters:
  • k_prior (deepinv.optim.Prior, None) – optional kernel prior. Default: None.

  • normalize_kernel (bool) – whether to normalize the kernel to unit sum. Default: True.

  • use_fft (bool) – whether to use the FFT implementations for convolutions. Default: False.

  • eps (float) – numerical stability constant used for divisions. Default: 1e-8.

forward(X, cur_data_fidelity, cur_prior, cur_params, y, physics, *args, **kwargs)[source]#

Single Blind Richardson-Lucy iteration.

Parameters:
Returns:

Dictionary {"est": (x, k), "cost": F, "it": it} containing the updated image, kernel, cost, and iteration number.

Return type:

dict[str, tuple[torch.Tensor, torch.Tensor] | torch.Tensor]