dict_to_store_patch_predictions¶
- dict_to_store_patch_predictions(patch_output, scale_factor, class_dict=None, save_path=None, output_type='AnnotationStore', *, verbose=True)[source]¶
Converts output of the PatchPredictor engine to AnnotationStore or QuPath json.
- Parameters:
patch_output (dict | zarr.Group) – A dictionary with “probabilities”, “predictions”, “coordinates”, 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.
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.
output_type (str) – “AnnotationStore” → return AnnotationStore “QuPath” → return QuPath JSON dict
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)