MIR.models.TransMorph

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

TransMorph model.

Parameters:
  • config – Configuration object containing model parameters.

  • SVF – Whether to integrate a stationary velocity field.

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

  • swin_type – Transformer type (‘swin’, ‘dswin’, ‘dswinv2’).

Forward inputs:

inputs – Tuple (mov, fix) tensors of shape [B, 1, D, H, W].

Forward outputs:

Dense flow tensor of shape [B, 3, D, H, W].

Raises:

ValueError – If swin_type is not one of ‘swin’, ‘dswin’, ‘dswinv2’.

__init__(config, SVF=True, SVF_steps=7, swin_type='swin')[source]

Original TransMorph Model.

Methods

__init__(config[, SVF, SVF_steps, swin_type])

Original TransMorph Model.

forward(inputs)

Forward pass for the TransMorph model.