MIR.models.HyperTransMorph¶
Hyper-TransMorph: TransMorph conditioned on a regularization hyperparameter.
Convolution and linear weights are predicted from an embedding of the hyperparameter value (hypernetwork conditioning), so a single trained network covers a range of regularization strengths.
Chen, J., Du, Y., He, Y., Segars, W. P., Li, Y., & Frey, E. C. (2021). TransMorph: Transformer for unsupervised medical image registration. arXiv preprint arXiv:2111.10480. Swin-Transformer code retrieved from: https://github.com/SwinTransformer/Swin-Transformer-Semantic-Segmentation Original paper: Liu, Z., Lin, Y., Cao, Y., Hu, H., Wei, Y., Zhang, Z., … & Guo, B. (2021). Swin transformer: Hierarchical vision transformer using shifted windows. arXiv preprint arXiv:2103.14030. Modified and tested by: Junyu Chen jchen245@jhmi.edu Johns Hopkins University
Functions
|
Partition a feature map into non-overlapping 3D windows. |
|
Merge 3D windows back into a feature map (inverse of |
Classes
|
A basic Swin Transformer layer for one stage. |
|
Hyper-conditioned convolution, LeakyReLU, then normalization. |
|
Hyper-conditioned 3D convolution with weights predicted from parameters. |
|
Decoder block: 2x trilinear upsampling, optional skip concat, two convs. |
|
MLP that embeds hyperparameters for hypernetwork conditioning. |
|
Linear layer with weights predicted from hyperparameters. |
|
Hyper-conditioned TransMorph with time-varying (progressive) flow estimation. |
|
Hyper-conditioned TransMorph TVF with spatially-varying regularization. |
|
Feed-forward MLP block used inside transformer blocks. |
|
Image to Patch Embedding. |
|
Patch Merging Layer. |
|
Hyper-conditioned convolution producing a displacement field. |
|
3D sinusoidal positional encoding for channels-first feature maps. |
|
1D sinusoidal position embedding over the token axis. |
|
Hyper-conditioned 3D Swin Transformer encoder. |
|
Swin Transformer Block. |
|
Window based multi-head self attention (W-MSA) module with relative position bias. |