spyrit.core.recon.DCNet
- class spyrit.core.recon.DCNet(noise: NoNoise, prep: DirectPoisson | SplitPoisson, sigma: tensor, denoi=Identity())[source]
Bases:
ModuleDenoised completion reconstruction network.
This is a four step reconstruction method:
Denoising in the measurement domain.
Estimation of the missing measurements from the denoised ones.
Image-domain mapping.
(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 (seenoise)prep: Preprocessing operator (seeprep)sigma: Covariance prior (for details, see theTikhonovMeasurementPriorDiag()class)denoi(optional): Image denoising operator (seennet). DefaultIdentity- Input / Output:
input: Ground-truth images with shape \((*,H,W)\), with \(*\) being any batch size.output: Reconstructed images with shape \((*,H,W)\), with \(*\) being any batch size.- Attributes:
Acq: Acquisition operator initialized asnoisePreP: Preprocessing operator initialized asprepDC_Layer: Data consistency layer initialized astikhoDenoi: Image denoising operator initialized asdenoi- 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
Reconstruction step of a reconstruction network