RandomMaskGenerator#
- class deepinv.physics.generator.RandomMaskGenerator(img_size, acceleration=4, center_fraction=None, rng=None, device='cpu', *args, **kwargs)[source]#
Bases:
BaseMaskGenerator
Generator for MRI Cartesian acceleration masks using random uniform undersampling.
Generate a mask of vertical lines for MRI acceleration with fixed sampling in low frequencies (center of k-space) and random uniform undersampling in the high frequencies.
Supports k-t sampling, where the mask is selected randomly across time.
The mask is repeated across channels and randomly varies across batch dimension.
For parameter descriptions see
deepinv.physics.generator.mri.BaseMaskGenerator
- Examples:
Random k-t mask generator for a 8x64x64 video:
>>> from deepinv.physics.generator import RandomMaskGenerator >>> generator = RandomMaskGenerator((2, 8, 64, 64), acceleration=8, center_fraction=0.04) # C, T, H, W >>> params = generator.step(batch_size=1) >>> mask = params["mask"] >>> mask.shape torch.Size([1, 2, 8, 64, 64])
Examples using RandomMaskGenerator
:#

Self-supervised MRI reconstruction with Artifact2Artifact
Self-supervised MRI reconstruction with Artifact2Artifact