MIR.models.TransVFA¶
- class MIR.models.TransVFA(*args, **kwargs)[source]¶
TransVFA model for image registration.
- Parameters:
configs_sw – Swin Transformer config.
configs – VFA config.
device – Device to run the model on.
swin_type – Transformer type (‘swin’, ‘dswin’, ‘dswinv2’).
return_orginal – If True, return composed grids and stats.
return_all_flows – If True, return flows for all decoder levels.
max_channels – Upper bound on the encoder-side feature widths
min(configs.start_channels * 2**(i+1), max_channels); the matching decoder usesconfigs.max_channels. The resulting widths are printed at construction. Default: 64.
- Forward inputs:
sample – Tuple (mov, fix) tensors of shape
[B, 1, *spatial].- Forward outputs:
Flow(s) and optional auxiliary outputs depending on flags.
- __init__(configs_sw, configs, device, swin_type='swin', return_orginal=False, return_all_flows=False, max_channels=64)[source]¶
Methods
__init__(configs_sw, configs, device[, ...])forward(sample)Run forward registration.