A collection of “vanilla” transforms for the model output tensors.


Activations([sigmoid, softmax, other])

Activation operations, typically Sigmoid or Softmax.

AsDiscrete([argmax, to_onehot, threshold, ...])

Convert the input tensor/array into discrete values, possible operations are:


FillHoles([applied_labels, connectivity])

This transform fills holes in the image and can be used to remove artifacts inside segments.

Invert([transform, nearest_interp, device, ...])

Utility transform to automatically invert the previously applied transforms.


Keeps only the largest connected component in the image.


This transform filters out labels and can be used as a processing step to view only certain labels.


Return the contour of binary input images that only compose of 0 and 1, with Laplacian kernel set as default for edge detection.


Execute mean ensemble on the input data.

ProbNMS([spatial_dims, sigma, ...])

Performs probability based non-maximum suppression (NMS) on the probabilities map via iteratively selecting the coordinate with highest probability and then move it as well as its surrounding values.

RemoveSmallObjects([min_size, connectivity, ...])

Use skimage.morphology.remove_small_objects to remove small objects from images.

SobelGradients([kernel_size, spatial_axes, ...])

Calculate Sobel gradients of a grayscale image with the shape of CxH[xWxDx...] or BxH[xWxDx...].


Execute vote ensemble on the input data.