HDF5Dataset
- class deepinv.datasets.HDF5Dataset(path: str, train: bool = True, transform: Transform | Callable = None, load_physics_generator_params: bool = False, dtype: torch.dtype = torch.float32, complex_dtype: torch.dtype = torch.complex64)[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.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
Training a reconstruction network.
Image deblurring with custom deep explicit prior.
DPIR method for PnP image deblurring.
Regularization by Denoising (RED) for Super-Resolution.
Self-supervised learning with measurement splitting
Self-supervised denoising with the UNSURE loss.
Self-supervised denoising with the SURE loss.
Self-supervised denoising with the Neighbor2Neighbor loss.
Self-supervised learning with Equivariant Imaging for MRI.
Self-supervised learning from incomplete measurements of multiple operators.
Learned Iterative Soft-Thresholding Algorithm (LISTA) for compressed sensing
Vanilla Unfolded algorithm for super-resolution
Learned iterative custom prior
Deep Equilibrium (DEQ) algorithms for image deblurring
Unfolded Chambolle-Pock for constrained image inpainting