niftynet.network.interventional_affine_net module

class INetAffine(decay=1e-06, affine_w_initializer=None, affine_b_initializer=None, acti_func='relu', name='inet-affine')[source]

Bases: niftynet.network.base_net.BaseNet

### Description This network estimates affine transformations from

a pair of moving and fixed image:

Hu et al., Label-driven weakly-supervised learning for multimodal deformable image registration, arXiv:1711.01666 https://arxiv.org/abs/1711.01666

Hu et al., Weakly-Supervised Convolutional Neural Networks for Multimodal Image Registration, Medical Image Analysis (2018) https://doi.org/10.1016/j.media.2018.07.002

see also:
https://github.com/YipengHu/label-reg

### Building blocks [DOWN CONV] - Convolutional layer + Residual Unit + Max pooling [CONV] - Convolutional layer [FC] - Fully connected layer, outputs the affine matrix [WARPER] - Grid resampling with the obtained affine matrix

### Diagram

INPUT PAIR –> [DOWN CONV]x4 –> [CONV] –> [FC] –> [WARPER] –> DISPLACEMENT FIELD

### Constraints - input spatial rank should be either 2 or 3 (2D or 3D images only)

__init__(decay=1e-06, affine_w_initializer=None, affine_b_initializer=None, acti_func='relu', name='inet-affine')[source]
Parameters:
  • decay – float, regularisation decay
  • affine_w_initializer – weight initialisation for affine registration network
  • affine_b_initializer – bias initialisation for affine registration network
  • acti_func – activation function to use
  • name – layer name
layer_op(fixed_image, moving_image, is_training=True, **unused_kwargs)[source]
Parameters:
  • fixed_image – tensor, fixed image for registration (defines reference space)
  • moving_image – tensor, moving image to be registered to fixed
  • is_training – boolean, True if network is in training mode
Returns:

displacement fields transformed by estimating affine

init_affine_w(std=1e-08)[source]
Parameters:std – float, standard deviation of normal distribution for weight initialisation
Returns:random weight initialisation from normal distribution with zero mean
init_affine_b(spatial_rank, initial_bias=0.0)[source]
Parameters:
  • spatial_rank – int, rank of inputs (either 2D or 3D)
  • initial_bias – float, initial bias
Returns:

bias initialisation for the affine matrix