ImageDataset#

class deepinv.datasets.ImageDataset[source]#

Bases: Dataset

Base class for imaging datasets in DeepInverse.

All datasets used with DeepInverse should inherit from this class.

We provide the function check_dataset() to automatically check that __getitem__ returns the correct format out of the following options:

  • x i.e a dataset that returns only ground truth;

  • (x, y) i.e. a dataset that returns pairs of ground truth and measurement. x can be equal to torch.nan if your dataset is ground-truth-free.

  • (x, params) i.e. a dataset of ground truth and dict of physics parameters. Useful for training with online measurements.

  • (x, y, params) i.e. a dataset that returns ground truth, measurements and dict of physics params.

This check is also available for datasets using the method ImageDataset.check_dataset().

Datasets should ideally return torch.Tensor or deepinv.utils.TensorList so that they are batchable and can be used with deepinv.

If using DeepInverse with your own custom dataset, you should inherit from this class and use check_dataset() to check your dataset is compatible.

check_dataset()[source]#

Check dataset returns correct format of images or image tuples.

Examples using ImageDataset:#

Imaging inverse problems with adversarial networks

Imaging inverse problems with adversarial networks

Bring your own dataset

Bring your own dataset

5 minute quickstart tutorial

5 minute quickstart tutorial

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 custom deep explicit prior.

Image deblurring with custom deep explicit prior.

Patch priors for limited-angle computed tomography

Patch priors for limited-angle computed tomography

Tour of MRI functionality in DeepInverse

Tour of MRI functionality in DeepInverse

Remote sensing with satellite images

Remote sensing with satellite images

DPIR method for PnP image deblurring.

DPIR method for PnP image deblurring.

Regularization by Denoising (RED) for Super-Resolution.

Regularization by Denoising (RED) for Super-Resolution.

Self-supervised MRI reconstruction with Artifact2Artifact

Self-supervised MRI reconstruction with Artifact2Artifact

Image transformations for Equivariant Imaging

Image transformations for Equivariant Imaging

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

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