MIR.models.TransMorph

class MIR.models.TransMorph(*args: Any, **kwargs: Any)[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].

__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.