HDF5Dataset#
- class deepinv.datasets.HDF5Dataset(path, train=True, split=None, transform=None, load_physics_generator_params=False, dtype=torch.float, complex_dtype=torch.cfloat)[source]#
Bases:
Dataset
DeepInverse HDF5 dataset with signal/measurement pairs
(x, y)
.If there is no training ground truth (i.e.
x_train
) in the dataset file, the dataset returns the measurement again as the signal.Optionally also return physics generator params as a dict per sample
(x, y, params)
, if one was used during data generation.Note
We support all dtypes supported by
h5py
including complex numbers, which will be stored as complex dtype.- Parameters:
path (str) – Path to the folder containing the dataset (one or multiple HDF5 files).
train (bool) – Set to
True
for training andFalse
for testing. Ifsplit
argument used, thentrain
is ignored.split (str) – overrides
train
argument if not None. Custom dataset split e.g. “train”, “test” or “val”, which selects the split name used when generating the dataset.transform (Transform, Callable) – A deepinv or torchvision transform to apply to the data.
load_physics_generator_params (bool) – load physics generator params from dataset if they exist (e.g. if dataset created with
deepinv.datasets.generate_dataset()
)dtype (torch.dtype, str) – cast all real-valued data to this dtype.
complex_dtype (torch.dtype, str) – cast all complex-valued data to this dtype.
Examples using HDF5Dataset
:#

Imaging inverse problems with adversarial networks

Regularization by Denoising (RED) for Super-Resolution.

Self-supervised learning with Equivariant Imaging for MRI.

Self-supervised learning from incomplete measurements of multiple operators.

Self-supervised denoising with the Neighbor2Neighbor loss.

Self-supervised denoising with the Generalized R2R loss.

Self-supervised learning with measurement splitting

Deep Equilibrium (DEQ) algorithms for image deblurring

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

Unfolded Chambolle-Pock for constrained image inpainting