spyrit.core.recon.TikhoNet
- class spyrit.core.recon.TikhoNet(noise, prep, sigma: tensor, denoi=Identity())[source]
Bases:
ModuleTikhonov reconstruction network.
This is a two-step reconstruction method. Typically, only the last step involves learnable parameters.
Tikhonov regularisation.
(Learned) Denoising in the image domain.
- Args:
noise(spyrit.core.noise): Acquisition operator (seenoise)prep(spyrit.core.prep): Preprocessing operator (seeprep)sigma(torch.tensor): Image-domain covariance prior (for details, see theTikhonov()class)denoi(torch.nn.Module, optional): Image denoising operator (seennet). DefaultIdentity- Input / Output:
input(torch.tensor): Ground-truth images with shape \((B,C,H,W)\).output(torch.tensor): Reconstructed images with shape \((B,C,H,W)\).- Attributes:
acqu: Acquisition operator initialized asnoiseprep: Preprocessing operator initialized aspreptikho: Data consistency layer initialized asTikhonov(noise.meas_op, sigma)denoi: Image denoising operator initialized asdenoi- Example:
>>> B, H, M, N = 85, 17, 32, 64 >>> sigma = torch.rand(N, N) >>> gamma = torch.rand(M, M) >>> A = torch.rand([M,N]) >>> meas = Linear(A, meas_shape=(1,N)) >>> noise = NoNoise(meas) >>> prep = DirectPoisson(1, meas) >>> recon = TikhoNet(noise, prep, sigma) >>> y = torch.rand(B,H,M) >>> x = recon(y, gamma) >>> print(y.shape) >>> print(x.shape) torch.Size([85, 17, 32]) torch.Size([85, 17, 1, 64])
Methods
forward(x)Full pipeline (image-to-image mapping)
reconstruct(x)Reconstruction (measurement-to-image mapping)
Reconstruction (measurement-to-image mapping) for experimental data.