napari_cellseg3d.code_models.instance_segmentation#

Instance segmentation methods for 3D images.

Module Attributes

USE_SLIDING_WINDOW

If True, uses a sliding window to perform instance segmentation to avoid memory issues.

Functions

binary_connected(volume[, thres, thres_small])

Convert binary foreground probability maps to instance masks via connected-component labeling.

binary_watershed(volume[, thres_objects, ...])

Convert binary foreground probability maps to instance masks via watershed segmentation algorithm.

clear_large_objects(image[, ...])

Uses watershed to label all obejcts, and removes the ones with a volume larger than the specified threshold.

clear_small_objects(image, threshold[, ...])

Calls skimage.remove_small_objects to remove small fragments that might be artifacts.

threshold(volume, thresh)

Remove all values smaller than the specified threshold in the volume.

to_semantic(image[, is_file_path])

Converts a ground-truth label to semantic (binary 0/1) labels.

volume_stats(volume_image)

Computes various statistics from instance labels and returns them in a dict.

voronoi_otsu(volume, spot_sigma, outline_sigma)

Voronoi-Otsu labeling from pyclesperanto.

Classes

ConnectedComponents([widget_parent])

Widget class for Connected Components instance segmentation.

ImageStats(volume, centroid_x, centroid_y, ...)

Dataclass containing various statistics from instance labels.

InstanceMethod(name, function, num_sliders, ...)

Base class for instance segmentation methods.

InstanceWidgets([parent])

Base widget with several sliders, for use in instance segmentation parameters.

VoronoiOtsu([widget_parent])

Widget class for Voronoi-Otsu labeling from pyclesperanto.

Watershed([widget_parent])

Widget class for Watershed segmentation.