mridc.collections.reconstruction.models.cascadenet package
Submodules
mridc.collections.reconstruction.models.cascadenet.ccnn_block module
- class mridc.collections.reconstruction.models.cascadenet.ccnn_block.CascadeNetBlock(model: Module, fft_centered: bool = True, fft_normalization: str = 'ortho', spatial_dims: Optional[Tuple[int, int]] = None, coil_dim: int = 1, no_dc: bool = False)[source]
Bases:
Module
Model block for CascadeNet & Convolution Recurrent Neural Network.
This model applies a combination of soft data consistency with the input model as a regularizer. A series of these blocks can be stacked to form the full variational network.
- forward(pred: Tensor, ref_kspace: Tensor, sens_maps: Tensor, mask: Tensor) Tensor [source]
Forward pass of the model block.
- Parameters
pred (Predicted k-space data.) – torch.Tensor, shape [batch_size, n_coils, height, width, 2]
ref_kspace (Reference k-space data.) – torch.Tensor, shape [batch_size, n_coils, height, width, 2]
sens_maps (Sensitivity maps.) – torch.Tensor, shape [batch_size, n_coils, height, width, 2]
mask (Mask to apply to the data.) – torch.Tensor, shape [batch_size, 1, height, width, 1]
- Returns
torch.Tensor, shape [batch_size, height, width, 2]
- Return type
Reconstructed image.
- sens_expand(x: Tensor, sens_maps: Tensor) Tensor [source]
Expand the sensitivity maps to the same size as the input.
- Parameters
x (Input data.) – torch.Tensor, shape [batch_size, n_coils, height, width, 2]
sens_maps (Sensitivity maps.) – torch.Tensor, shape [batch_size, n_coils, height, width, 2]
- Returns
torch.Tensor, shape [batch_size, n_coils, height, width, 2]
- Return type
SENSE reconstruction expanded to the same size as the input.
- sens_reduce(x: Tensor, sens_maps: Tensor) Tensor [source]
Reduce the sensitivity maps to the same size as the input.
- Parameters
x (Input data.) – torch.Tensor, shape [batch_size, n_coils, height, width, 2]
sens_maps (Sensitivity maps.) – torch.Tensor, shape [batch_size, n_coils, height, width, 2]
- Returns
torch.Tensor, shape [batch_size, height, width, 2]
- Return type
SENSE reconstruction.
- training: bool