Reconstructor#

class deepinv.models.Reconstructor(device='cpu')[source]#

Bases: Module

Base class for reconstruction models.

Provides a template for defining reconstruction models.

Reconstructors provide a signal estimate x_hat as x_hat = model(y, physics) where y are the measurements and physics is the forward model \(A\) (possibly including information about the noise distribution too).

The base class inherits from torch.nn.Module.

forward(y, physics, **kwargs)[source]#

Applies reconstruction model \(\inversef{y}{A}\).

Parameters:
Returns:

(torch.Tensor) reconstructed tensor.

Examples using Reconstructor:#

Imaging inverse problems with adversarial networks

Imaging inverse problems with adversarial networks

Bring your own dataset

Bring your own dataset

Use iterative reconstruction algorithms

Use iterative reconstruction algorithms

Use a pretrained model

Use a pretrained model

5 minute quickstart tutorial

5 minute quickstart tutorial

Single-pixel imaging with Spyrit

Single-pixel imaging with Spyrit

Radio interferometric imaging with deepinverse

Radio interferometric imaging with deepinverse

Inference and fine-tune a foundation model

Inference and fine-tune a foundation model

Training a reconstruction model

Training a reconstruction model

Image deblurring with Total-Variation (TV) prior

Image deblurring with Total-Variation (TV) prior

Image deblurring with custom deep explicit prior.

Image deblurring with custom deep explicit prior.

Reconstructing an image using the deep image prior.

Reconstructing an image using the deep image prior.

Image inpainting with wavelet prior

Image inpainting with wavelet prior

Tour of MRI functionality in DeepInverse

Tour of MRI functionality in DeepInverse

Random phase retrieval and reconstruction methods.

Random phase retrieval and reconstruction methods.

Spatial unwrapping and modulo imaging

Spatial unwrapping and modulo imaging

Pattern Ordering in a Compressive Single Pixel Camera

Pattern Ordering in a Compressive Single Pixel Camera

DPIR method for PnP image deblurring.

DPIR method for PnP image deblurring.

PnP with custom optimization algorithm (Primal-Dual Condat-Vu)

PnP with custom optimization algorithm (Primal-Dual Condat-Vu)

Plug-and-Play algorithm with Mirror Descent for Poisson noise inverse problems.

Plug-and-Play algorithm with Mirror Descent for Poisson noise inverse problems.

Regularization by Denoising (RED) for Super-Resolution.

Regularization by Denoising (RED) for Super-Resolution.

Vanilla PnP for computed tomography (CT).

Vanilla PnP for computed tomography (CT).

Image reconstruction with a diffusion model

Image reconstruction with a diffusion model

Using state-of-the-art diffusion models from HuggingFace Diffusers with DeepInverse

Using state-of-the-art diffusion models from HuggingFace Diffusers with DeepInverse

Building your diffusion posterior sampling method using SDEs

Building your diffusion posterior sampling method using SDEs

Self-supervised MRI reconstruction with Artifact2Artifact

Self-supervised MRI reconstruction with Artifact2Artifact

Self-supervised learning with Equivariant Imaging for MRI.

Self-supervised learning with Equivariant Imaging for MRI.

Self-supervised learning from incomplete measurements of multiple operators.

Self-supervised learning from incomplete measurements of multiple operators.

Self-supervised denoising with the Neighbor2Neighbor loss.

Self-supervised denoising with the Neighbor2Neighbor loss.

Self-supervised denoising with the Generalized R2R loss.

Self-supervised denoising with the Generalized R2R loss.

Self-supervised learning with measurement splitting

Self-supervised learning with measurement splitting

Self-supervised denoising with the SURE loss.

Self-supervised denoising with the SURE loss.

Self-supervised denoising with the UNSURE loss.

Self-supervised denoising with the UNSURE loss.

Deep Equilibrium (DEQ) algorithms for image deblurring

Deep Equilibrium (DEQ) algorithms for image deblurring

Learned Iterative Soft-Thresholding Algorithm (LISTA) for compressed sensing

Learned Iterative Soft-Thresholding Algorithm (LISTA) for compressed sensing

Learned iterative custom prior

Learned iterative custom prior

Learned Primal-Dual algorithm for CT scan.

Learned Primal-Dual algorithm for CT scan.

Reducing the memory and computational complexity of unfolded network training

Reducing the memory and computational complexity of unfolded network training

Unfolded Chambolle-Pock for constrained image inpainting

Unfolded Chambolle-Pock for constrained image inpainting

Vanilla Unfolded algorithm for super-resolution

Vanilla Unfolded algorithm for super-resolution