MultiTaskSegmentorRunParams

class MultiTaskSegmentorRunParams[source]

Runtime parameters for configuring the MultiTaskSegmentor.run() method.

This class extends SemanticSegmentorRunParams, and adds parameters specific to multitask segmentation workflows.

auto_get_mask

Whether to automatically generate segmentation masks using wsireader.tissue_mask() during processing.

Type:

bool

batch_size

Number of image patches to feed to the model in a forward pass.

Type:

int

class_dict

Optional dictionary mapping classification outputs to class names.

Type:

dict

device

Device to run the model on (e.g., “cpu”, “cuda”).

Type:

str

labels

Optional labels for input images. Only a single label per image is supported.

Type:

list

memory_threshold

Memory usage threshold (in percentage) to trigger caching behavior.

Type:

int

num_workers

Number of workers used in DataLoader.

Type:

int

output_file

Output file name for saving results (e.g., .zarr or .db).

Type:

str

output_resolutions

Resolution used for writing output predictions.

Type:

Resolution

patch_output_shape

Shape of output patches (height, width).

Type:

tuple[int, int]

return_labels

Whether to return labels with predictions.

Type:

bool

return_predictions

Whether to return array predictions for individual tasks.

Type:

tuple(bool, …

return_probabilities

Whether to return per-class probabilities.

Type:

bool

scale_factor

Scale factor for converting annotations to baseline resolution. Typically model_mpp / slide_mpp.

Type:

tuple[float, float]

stride_shape

Stride used during WSI processing. Defaults to patch_input_shape.

Type:

tuple[int, int]

verbose

Whether to output logging information.

Type:

bool

Methods

Attributes