class UNet2D(num_classes, w_initializer=None, w_regularizer=None, b_initializer=None, b_regularizer=None, acti_func='relu', name='UNet2D')[source]


A reimplementation of 2D UNet:
Ronneberger et al., U-Net: Convolutional Networks for Biomedical Image Segmentation, MICCAI ‘15
layer_op(images, is_training=True, **unused_kwargs)[source]
class TwoLayerConv(n_chns, conv_params)[source]

Bases: niftynet.layer.base_layer.TrainableLayer

Two convolutional layers, number of output channels are n_chns for both of them.


layer_op(input_tensor, is_training=None)[source]
class CropConcat(name='crop_concat')[source]

Bases: niftynet.layer.base_layer.Layer

This layer concatenates two input tensors, the first one is cropped and resized to match the second one.

This layer assumes the same amount of differences in every spatial dimension in between the two tensors.

layer_op(tensor_a, tensor_b)[source]

match the spatial shape and concatenate the tensors tensor_a will be cropped and resized to match tensor_b.

  • tensor_a
  • tensor_b

concatenated tensor