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 ordeepinv.utils.load_torch_url()if torch tensor in.ptfile ordeepinv.utils.load_np_url()if numpy array innpyornpzfile.Available examples for
nameinclude (see the HuggingFace repo for full list):Table 44 Example Images# Name
Origin
Image size
Domain
barbara.jpeg,butterfly.png(3, 512, 512), (3, 256, 256)
natural
cameraman.pngClassic toy image
(1, 512, 512)
natural
CBSD_0010.png(2, 481, 321)
natural
celeba_example.jpgCelebA
(3, 1024, 1024)
natural
div2k_valid_hr_0877.png,div2k_valid_lr_bicubic_0877x4.pngGT and measurement from
Div2k(3, 1152, 2040), (3, 288, 510)
natural
leaves.pngSet3C dataset
(3, 256, 256)
natural
mbappe.jpg(3, 443, 664)
natural
CT100_256x256_0.pt(1, 256, 256)
medical
brainweb_t1_ICBM_1mm_subject_0.npyBrainWeb 3D MRI data
(181, 217, 181)
medical
demo_mini_subset_fastmri_brain_0.pt(2, 320, 320)
medical
SheppLogan.pngShepp Logan phantom
(4, 512, 512)
medical
FMD_TwoPhoton_MICE_R_gt_12_avg50.png(3, 512, 512)
microscopy
JAX_018_011_RGB.tifSample RGB patch from WorldView-3
(3, 1024, 1024)
satellite
- Parameters:
name (str) – filename of the image from the HuggingFace dataset.
kwargs (dict) – keyword args to pass to
deepinv.utils.load_url_image()
- Returns:
torch.Tensorcontaining the image.
Examples using load_example:#
Reconstructing an image using the deep image prior.
Expected Patch Log Likelihood (EPLL) for Denoising and Inpainting
Random phase retrieval and reconstruction methods.
PnP with custom optimization algorithm (Condat-Vu Primal-Dual)
Plug-and-Play algorithm with Mirror Descent for Poisson noise inverse problems.
Building your diffusion posterior sampling method using SDEs