MIR.models.VFA

class MIR.models.VFA(*args, **kwargs)[source]

VFA model for image registration.

Parameters:
  • configs – VFA configuration object (uses img_size, in_channels, downsamples, start_channels, max_channels, matching_channels, skip, initialize, int_steps and affine).

  • device – Device to which the decoder’s precomputed radial vectors R are moved.

  • return_orginal – If True, return VFA-style composed grids and stats.

  • return_all_flows – If True, return flows for all decoder levels.

  • SVF – If True, integrate flow as stationary velocity field.

  • SVF_steps – Number of scaling-and-squaring steps for integration.

  • return_full – If True, also return warped images and inverse flow (only used when SVF is True; the spatial transformer is created on CUDA).

Forward inputs:

sample – Tuple (mov, fix) tensors of shape [B, 1, *spatial].

Forward outputs:

Depending on flags, returns flow(s) or a results dict (see forward()).

__init__(configs, device, return_orginal=False, return_all_flows=False, SVF=False, SVF_steps=7, return_full=False)[source]

Methods

__init__(configs, device[, return_orginal, ...])

forward(sample)

Run forward registration.