NucleusDetectorRunParams

class NucleusDetectorRunParams[source]

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

This class extends SemanticSegmentorRunParams (and transitively PredictorRunParamsEngineABCRunParams) with additional options specific to nucleus detection workflows.

auto_get_mask

Whether to automatically generate segmentation masks using wsireader.tissue_mask() during WSI 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 numeric class IDs 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 the 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/coordinates.

Type:

Resolution

patch_output_shape

Shape of output patches (height, width).

Type:

tuple[int, int]

min_distance

Minimum separation between nuclei (in pixels) used during centroid extraction/post-processing.

Type:

int

threshold_abs

Absolute detection threshold applied to model outputs.

Type:

float

threshold_rel

Relative detection threshold (e.g., with respect to local maxima).

Type:

float

tile_shape

Tile shape (height, width) used during post-processing (in pixels) to control rechunking behavior.

Type:

tuple[int, int]

return_labels

Whether to return labels with predictions.

Type:

bool

return_probabilities

Whether to include per-class probabilities in the output.

Type:

bool

scale_factor

Scale factor for converting coordinates 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 enable verbose logging.

Type:

bool

Methods

Attributes