load_example#

deepinv.utils.load_example(name, **kwargs)[source]#

Load example image from the DeepInverse HuggingFace using deepinv.utils.load_url_image() if image file or deepinv.utils.load_torch_url() if torch tensor in .pt file or deepinv.utils.load_np_url() if numpy array in npy or npz file.

Available examples for name include (see the HuggingFace repo for full list):

Table 44 Example Images#

Name

Origin

Image size

Domain

barbara.jpeg, butterfly.png

Set14

(3, 512, 512), (3, 256, 256)

natural

cameraman.png

Classic toy image

(1, 512, 512)

natural

CBSD_0010.png

CBSD68

(2, 481, 321)

natural

celeba_example.jpg

CelebA

(3, 1024, 1024)

natural

div2k_valid_hr_0877.png, div2k_valid_lr_bicubic_0877x4.png

GT and measurement from Div2k

(3, 1152, 2040), (3, 288, 510)

natural

leaves.png

Set3C dataset

(3, 256, 256)

natural

mbappe.jpg

(3, 443, 664)

natural

CT100_256x256_0.pt

CT100

(1, 256, 256)

medical

brainweb_t1_ICBM_1mm_subject_0.npy

BrainWeb 3D MRI data

(181, 217, 181)

medical

demo_mini_subset_fastmri_brain_0.pt

FastMRI

(2, 320, 320)

medical

SheppLogan.png

Shepp Logan phantom

(4, 512, 512)

medical

FMD_TwoPhoton_MICE_R_gt_12_avg50.png

FMD

(3, 512, 512)

microscopy

JAX_018_011_RGB.tif

Sample RGB patch from WorldView-3

(3, 1024, 1024)

satellite

Parameters:
Returns:

torch.Tensor containing the image.

Examples using load_example:#

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

Benchmarking pretrained denoisers

Benchmarking pretrained denoisers

Inference and fine-tune a foundation model

Inference and fine-tune a foundation model

Expected Patch Log Likelihood (EPLL) for Denoising and Inpainting

Expected Patch Log Likelihood (EPLL) for Denoising and Inpainting

Tour of blur operators

Tour of blur operators

Random phase retrieval and reconstruction methods.

Random phase retrieval and reconstruction methods.

Tour of forward sensing operators

Tour of forward sensing operators

Ptychography phase retrieval

Ptychography phase retrieval

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

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

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

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

Vanilla PnP for computed tomography (CT).

Vanilla PnP for computed tomography (CT).

Implementing DiffPIR

Implementing DiffPIR

Building your diffusion posterior sampling method using SDEs

Building your diffusion posterior sampling method using SDEs

Implementing DPS

Implementing DPS

Image transformations for Equivariant Imaging

Image transformations for Equivariant Imaging

Image transforms for equivariance & augmentations

Image transforms for equivariance & augmentations