HyperTransMorph

Overview

HyperTransMorph conditions TransMorph-TVF on the regularization weight through a hypernetwork: the weight is an input at training and inference time, so a single network spans a range of regularization strengths and the trade-off between accuracy and smoothness can be chosen per case without retraining (the HyperMorph idea applied to TransMorph).

Variants

  • HyperTransMorphTVF: hypernetwork-conditioned TransMorph-TVF.

  • HyperTransMorphTVFSPR: the same with the spatially varying regularization head.

  • HyperVFA, HyperVFASPR: the VFA counterparts (VFA: Vector Field Attention).

Usage

from MIR.models import HyperTransMorphTVF

model = HyperTransMorphTVF(config, time_steps=7).cuda()
reg_code = torch.tensor([[0.3]], device='cuda')      # regularization weight, sampled during training
flow = model((mov, fix), reg_code)

See the tutorial for the training loop that samples the weight per iteration.

Key modules

  • MIR.models.HyperTransMorph, MIR.models.HyperVFA

References

  • Hoopes, Hoffmann, Fischl, Guttag, Dalca. HyperMorph: amortized hyperparameter learning for image registration. IPMI 2021.

  • Chen et al. TransMorph. Medical Image Analysis 2022.