Examples#

All the examples have a download link at the end. You can load the example’s notebook on Google Colab and run them by adding the line

pip install git+https://github.com/deepinv/deepinv.git#egg=deepinv

to the top of the notebook (e.g., as in here).

Get started#

Get started with the 5 minute quickstart tutorial, or view it in Colab here.

Basics#

Image

5 minute quickstart tutorial

5 minute quickstart tutorial
Image

Use a pretrained model

Use a pretrained model
Image

Use iterative reconstruction algorithms

Use iterative reconstruction algorithms
Image

Bring your own dataset

Bring your own dataset
Image

Bring your own physics

Bring your own physics

Models#

Image

Inference and fine-tune a foundation model

Inference and fine-tune a foundation model
Image

Training a reconstruction model

Training a reconstruction model
Image

Benchmarking pretrained denoisers

Benchmarking pretrained denoisers
Image

Super-resolution with SRResNet

Super-resolution with SRResNet

Physics#

Image

Tour of forward sensing operators

Tour of forward sensing operators
Image

Tour of blur operators

Tour of blur operators
Image

Tour of MRI functionality in DeepInverse

Tour of MRI functionality in DeepInverse
Image

3D diffraction PSF

3D diffraction PSF
Image

Random phase retrieval and reconstruction methods.

Random phase retrieval and reconstruction methods.
Image

Ptychography phase retrieval

Ptychography phase retrieval
Image

Inverse scattering problem

Inverse scattering problem
Image

Poisson-Gaussian Denoising with the Generalized Anscombe Transform

Poisson-Gaussian Denoising with the Generalized Anscombe Transform
Image

Pattern Ordering in a Compressive Single Pixel Camera

Pattern Ordering in a Compressive Single Pixel Camera
Image

Spatial unwrapping and modulo imaging

Spatial unwrapping and modulo imaging
Image

Positron emission tomography (PET) in 3D

Positron emission tomography (PET) in 3D
Image

Single photon lidar operator for depth ranging.

Single photon lidar operator for depth ranging.
Image

Positron emission tomography (PET) in 2D

Positron emission tomography (PET) in 2D
Image

Remote sensing with satellite images

Remote sensing with satellite images

Optimization#

Image

3D denoising

3D denoising
Image

Expected Patch Log Likelihood (EPLL) for Denoising and Inpainting

Expected Patch Log Likelihood (EPLL) for Denoising and Inpainting
Image

Image deblurring with Total-Variation (TV) prior

Image deblurring with Total-Variation (TV) prior
Image

Image deblurring with custom deep explicit prior.

Image deblurring with custom deep explicit prior.
Image

Image inpainting with wavelet prior

Image inpainting with wavelet prior
Image

Patch priors for limited-angle computed tomography

Patch priors for limited-angle computed tomography
Image

Poisson Inverse Problems with Maximum-Likelihood Expectation-Maximization (MLEM)

Poisson Inverse Problems with Maximum-Likelihood Expectation-Maximization (MLEM)
Image

Reconstructing an image using the deep image prior.

Reconstructing an image using the deep image prior.

Plug-and-Play#

Image

DPIR method for PnP image deblurring.

DPIR method for PnP image deblurring.
Image

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

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

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

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

Regularization by Denoising (RED) for Super-Resolution.

Regularization by Denoising (RED) for Super-Resolution.
Image

Vanilla PnP for computed tomography (CT).

Vanilla PnP for computed tomography (CT).

Diffusion & MCMC#

Image

Building your custom MCMC sampling algorithm.

Building your custom MCMC sampling algorithm.
Image

Building your diffusion posterior sampling method using SDEs

Building your diffusion posterior sampling method using SDEs
Image

DPS – Posterior Sampling with Diffusion Models

DPS -- Posterior Sampling with Diffusion Models
Image

Flow-Matching for posterior sampling and unconditional generation

Flow-Matching for posterior sampling and unconditional generation
Image

Image reconstruction with a diffusion model

Image reconstruction with a diffusion model
Image

Implementing DiffPIR

Implementing DiffPIR
Image

Uncertainty quantification with PnP-ULA.

Uncertainty quantification with PnP-ULA.
Image

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

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

Unfolded#

Image

DEAL denoising and reconstruction

DEAL denoising and reconstruction
Image

Deep Equilibrium (DEQ) algorithms for image deblurring

Deep Equilibrium (DEQ) algorithms for image deblurring
Image

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

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

Learned Primal-Dual algorithm for CT scan.

Learned Primal-Dual algorithm for CT scan.
Image

Learned iterative custom prior

Learned iterative custom prior
Image

Reducing the memory and computational complexity of unfolded network training

Reducing the memory and computational complexity of unfolded network training
Image

Unfolded Chambolle-Pock for constrained image inpainting

Unfolded Chambolle-Pock for constrained image inpainting
Image

Vanilla Unfolded algorithm for super-resolution

Vanilla Unfolded algorithm for super-resolution

Blind Inverse Problems#

Image

Blind deblurring with kernel estimation network

Blind deblurring with kernel estimation network
Image

Blind denoising with noise level estimation

Blind denoising with noise level estimation
Image

Calibrating physics operators

Calibrating physics operators

Self-Supervised Learning#

Image

Image transformations for Equivariant Imaging

Image transformations for Equivariant Imaging
Image

Low-field MRI denoising without ground truth

Low-field MRI denoising without ground truth
Image

Poisson denoising using Poisson2Sparse

Poisson denoising using Poisson2Sparse
Image

Scan-specific zero-shot SSDU for MRI

Scan-specific zero-shot SSDU for MRI
Image

Self-supervised MRI reconstruction with Artifact2Artifact

Self-supervised MRI reconstruction with Artifact2Artifact
Image

Self-supervised denoising with the Generalized R2R loss.

Self-supervised denoising with the Generalized R2R loss.
Image

Self-supervised denoising with the Neighbor2Neighbor loss.

Self-supervised denoising with the Neighbor2Neighbor loss.
Image

Self-supervised denoising with the SURE loss.

Self-supervised denoising with the SURE loss.
Image

Self-supervised denoising with the UNSURE loss.

Self-supervised denoising with the UNSURE loss.
Image

Self-supervised learning from incomplete measurements of multiple operators.

Self-supervised learning from incomplete measurements of multiple operators.
Image

Self-supervised learning with Equivariant Imaging for MRI.

Self-supervised learning with Equivariant Imaging for MRI.
Image

Self-supervised learning with Equivariant Splitting

Self-supervised learning with Equivariant Splitting
Image

Self-supervised learning with measurement splitting

Self-supervised learning with measurement splitting

Transformations & Equivariance#

Image

Image transforms for equivariance & augmentations

Image transforms for equivariance & augmentations

Adversarial Learning#

Image

Imaging inverse problems with adversarial networks

Imaging inverse problems with adversarial networks

External Libraries#

Image

Loading scientific images

Loading scientific images
Image

Low-dose CT with ASTRA backend and Total-Variation (TV) prior

Low-dose CT with ASTRA backend and Total-Variation (TV) prior
Image

Low-intensity STED fluorescence microscopy denoising

Low-intensity STED fluorescence microscopy denoising
Image

Radio interferometric imaging with deepinverse

Radio interferometric imaging with deepinverse
Image

Single-pixel imaging with Spyrit

Single-pixel imaging with Spyrit
Image

Using HuggingFace datasets

Using HuggingFace datasets

Distributed Computing#

Image

Distributed Denoiser with Image Tiling

Distributed Denoiser with Image Tiling
Image

Distributed Physics Operators

Distributed Physics Operators
Image

Distributed Plug-and-Play (PnP) Reconstruction

Distributed Plug-and-Play (PnP) Reconstruction

Metrics#

Image

Fitting NIQE on a custom dataset

Fitting NIQE on a custom dataset

Gallery generated by Sphinx-Gallery