GaussianMaskGenerator

class deepinv.physics.generator.GaussianMaskGenerator(img_size: Tuple, acceleration: int = 4, center_fraction: float | None = None, rng: Generator | None = None, device='cpu', *args, **kwargs)[source]

Bases: RandomMaskGenerator

Generator for MRI Cartesian acceleration masks using Gaussian undersampling.

Generate a mask of vertical lines for MRI acceleration with fixed sampling in low frequencies (center of k-space) and Gaussian undersampling in the high frequencies.

The high frequences are selected according to a tail-adjusted Gaussian pdf. This ensures that the expected number of rows selected is equal to (N / acceleration).

Supports k-t sampling, where the Gaussian mask varies randomly across time.

The mask is repeated across channels and randomly varies across batch dimension.

Algorithm taken from Schlemper et al. A Deep Cascade of Convolutional Neural Networks for Dynamic MR Image Reconstruction.

For parameter descriptions see deepinv.physics.generator.mri.BaseMaskGenerator


Examples:

Gaussian random k-t mask generator for a 8x64x64 video:

>>> from deepinv.physics.generator import GaussianMaskGenerator
>>> generator = GaussianMaskGenerator((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])
get_pdf() Tensor[source]

Create one-dimensional Gaussian probability density function across columns, ignoring any fixed sampling columns.

Add uniform distribution so that the probability of sampling high-frequency lines is non-zero.

Return torch.Tensor:

unnormalised 1D vector representing pdf evaluated across mask columns.

Examples using GaussianMaskGenerator:

A tour of forward sensing operators

A tour of forward sensing operators

Self-supervised MRI reconstruction with Artifact2Artifact

Self-supervised MRI reconstruction with Artifact2Artifact