VFA: Vector Field Attention¶
Overview¶
Vector Field Attention replaces the decoder of a registration network by an attention mechanism: correspondences are found by comparing the moving and fixed feature maps directly, and the displacement is read off the attention weights. VFA is light (about 2 M parameters), contrast-robust, and the model behind the LUMIR24 / LUMIR25 challenge entries.
Variants¶
Class |
Description |
Output |
|---|---|---|
|
Base model; |
|
|
VFA with a spatially varying regularization decoder on the matching features. |
|
|
Transformer-augmented VFA encoder. |
|
|
Hypernetwork-conditioned regularization weight (see HyperTransMorph); |
as VFA / VFASPR |
Usage¶
from MIR.models import VFA, VFASPR
import MIR.models.configs_VFA as configs_VFA
config = configs_VFA.get_VFA_default_config()
config.img_size = fix.shape[2:]
model = VFA(config, device='cuda:0').cuda()
flow = model((mov, fix))
spr = VFASPR(config, device='cuda:0', SVF=True).cuda()
pos_flow, neg_flow, wts = spr((mov, fix))
Pretrained weights¶
ModelWeights['VFA-LUMIR24-MonoModal'] (key model_state_dict),
ModelWeights['VFA-LUMIR25-MultiModal'], ModelWeights['VFA-IXI-Atlas2Subject'],
ModelWeights['VFA-SPR-IXI-Atlas2Subject'], segmentation and synthesis heads
ModelWeights['VFA-SegHead'], ['VFA-SynthHead'].
Key modules¶
MIR.models.VFA,MIR.models.configs_VFAMIR.models.TransVFA,MIR.models.HyperVFA
References¶
Liu, Chen, Zuo, Carass, Prince. Vector field attention for deformable image registration. Journal of Medical Imaging 2024. Paper