dict_to_store_semantic_segmentor

dict_to_store_semantic_segmentor(patch_output, scale_factor, output_type, class_dict=None, save_path=None, *, verbose=True)[source]

Converts output of TIAToolbox SemanticSegmentor engine to AnnotationStore.

Parameters:
  • patch_output (dict | zarr.Group) – A dictionary with “probabilities”, “predictions”, and “labels” keys.

  • scale_factor (tuple[float, float]) – The scale factor to use when loading the annotations. All coordinates will be multiplied by this factor to allow conversion of annotations saved at non-baseline resolution to baseline. Should be model_mpp/slide_mpp.

  • output_type (str) – “annotationstore” → return AnnotationStore “qupath” → return QuPath JSON dict

  • class_dict (dict) – Optional dictionary mapping class indices to class names.

  • save_path (str or Path) – Optional Output directory to save the Annotation Store results.

  • verbose (bool) – Whether to display logs and progress bar.

Returns:

An SQLiteStore containing Annotations for each patch or Path to file storing SQLiteStore containing Annotations for each patch.

Return type:

(SQLiteStore or Path)