spyrit.core.recon.DCNet

class spyrit.core.recon.DCNet(noise: NoNoise, prep: DirectPoisson | SplitPoisson, sigma: tensor, denoi=Identity())[source]

Bases: Module

Denoised completion reconstruction network.

This is a four step reconstruction method:

  1. Denoising in the measurement domain.

  2. Estimation of the missing measurements from the denoised ones.

  3. Image-domain mapping.

  4. (Learned) Denoising in the image domain.

The first three steps corresponds to Tikhonov regularisation. Typically, only the last step involves learnable parameters.

Args:

noise: Acquisition operator (see noise)

prep: Preprocessing operator (see prep)

sigma: Covariance prior (for details, see the TikhonovMeasurementPriorDiag() class)

denoi (optional): Image denoising operator (see nnet). Default Identity

Input / Output:

input: Ground-truth images with shape \((B,C,H,W)\)

output: Reconstructed images with shape \((B,C,H,W)\)

Attributes:

Acq: Acquisition operator initialized as noise

PreP: Preprocessing operator initialized as prep

DC_Layer: Data consistency layer initialized as tikho

Denoi: Image denoising operator initialized as denoi

Example:
>>> B, C, H, M = 10, 1, 64, 64**2
>>> Ord = torch.ones((H,H))
>>> meas = HadamSplit(M, H, Ord)
>>> noise = NoNoise(meas)
>>> prep = SplitPoisson(1.0, M, H*H)
>>> sigma = torch.rand([H**2, H**2])
>>> recnet = DCNet(noise,prep,sigma)
>>> x = torch.FloatTensor(B,C,H,H).uniform_(-1, 1)
>>> z = recnet(x)
>>> print(z.shape)
torch.Size([10, 1, 64, 64])

Methods

acquire(x)

Simulate data acquisition

forward(x)

Full pipeline of the reconstruction network

reconstruct(x)

Reconstruction step of a reconstruction network

reconstruct_expe(x)

Reconstruction step of a reconstruction network