def __init__(self, decay, affine_w_initializer=None, affine_b_initializer=None, disp_w_initializer=None, disp_b_initializer=None, acti_func='relu', interp='linear', boundary='replicate', name='inet-hybrid-pre-warp'): """ :param decay: float, regularisation decay :param affine_w_initializer: weight initialisation for affine registration network :param affine_b_initializer: bias initialisation for affine registration network :param disp_w_initializer: weight initialisation for dense registration network :param disp_b_initializer: bias initialisation for dense registration network :param acti_func: activation function to use :param interp: string, type of interpolation for the resampling [default:linear] :param boundary: string, padding mode to deal with image boundary :param name: layer name """ BaseNet.__init__(self, name=name) self.global_net = INetAffine(decay=decay, affine_w_initializer=affine_w_initializer, affine_b_initializer=affine_b_initializer, acti_func=acti_func, name='inet-global') self.local_net = INetDense(decay=decay, disp_w_initializer=disp_w_initializer, disp_b_initializer=disp_b_initializer, acti_func=acti_func, name='inet-local') self.interp = interp self.boundary = boundary
def test_3d_shape(self): input_shape = (2, 32, 32, 32, 1) x = tf.ones(input_shape) densenet_instance = INetDense() out = densenet_instance(x, x, is_training=True) print(densenet_instance) with self.cached_session() as sess: sess.run(tf.global_variables_initializer()) out = sess.run(out) self.assertAllClose((2, 32, 32, 32, 3), out.shape)
def __init__(self, decay, affine_w_initializer=None, affine_b_initializer=None, disp_w_initializer=None, disp_b_initializer=None, acti_func='relu', interp='linear', boundary='replicate', name='inet-hybrid-pre-warp'): """ Re-implementation of the registration network proposed in: 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 :param decay: :param affine_w_initializer: :param affine_b_initializer: :param disp_w_initializer: :param disp_b_initializer: :param acti_func: :param interp: :param boundary: :param name: """ BaseNet.__init__(self, name=name) self.global_net = INetAffine(decay=decay, affine_w_initializer=affine_w_initializer, affine_b_initializer=affine_b_initializer, acti_func=acti_func, name='inet-global') self.local_net = INetDense(decay=decay, disp_w_initializer=disp_w_initializer, disp_b_initializer=disp_b_initializer, acti_func=acti_func, name='inet-local') self.interp = interp self.boundary = boundary
def __init__(self, decay, affine_w_initializer=None, affine_b_initializer=None, disp_w_initializer=None, disp_b_initializer=None, acti_func='relu', interp='linear', boundary='replicate', name='inet-hybrid-pre-warp'): """ Re-implementation of the registration network proposed in: Hu et al., Label-driven weakly-supervised learning for multimodal deformable image registration, arXiv:1711.01666 https://arxiv.org/abs/1711.01666 :param decay: :param affine_w_initializer: :param affine_b_initializer: :param disp_w_initializer: :param disp_b_initializer: :param acti_func: :param interp: :param boundary: :param name: """ BaseNet.__init__(self, name=name) self.global_net = INetAffine(decay=decay, affine_w_initializer=affine_w_initializer, affine_b_initializer=affine_b_initializer, acti_func=acti_func, name='inet-global') self.local_net = INetDense(decay=decay, disp_w_initializer=disp_w_initializer, disp_b_initializer=disp_b_initializer, acti_func=acti_func, name='inet-local') self.interp = interp self.boundary = boundary
def __init__(self, decay, affine_w_initializer=None, affine_b_initializer=None, disp_w_initializer=None, disp_b_initializer=None, acti_func='relu', interp='linear', boundary='replicate', name='inet-hybrid-two-stream'): BaseNet.__init__(self, name=name) self.global_net = INetAffine(decay=decay, affine_w_initializer=affine_w_initializer, affine_b_initializer=affine_b_initializer, acti_func=acti_func, name='inet-global') self.local_net = INetDense(decay=decay, disp_w_initializer=disp_w_initializer, disp_b_initializer=disp_b_initializer, acti_func=acti_func, name='inet-local') self.interp = interp self.boundary = boundary