monai.transforms.post.array#

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

Classes

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:

DistanceTransformEDT([sampling])

Applies the Euclidean distance transform on the input.

Ensemble()

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.

KeepLargestConnectedComponent([...])

Keeps only the largest connected component in the image.

LabelFilter(applied_labels)

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

LabelToContour([kernel_type])

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

MeanEnsemble([weights])

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...].

VoteEnsemble([num_classes])

Execute vote ensemble on the input data.