dict_to_store¶
tiatoolbox
.utils
.misc
.dict_to_store
- dict_to_store(patch_output, scale_factor, class_dict=None, save_path=None)[source]¶
Converts (and optionally saves) output of TIAToolbox engines as AnnotationStore.
- Parameters:
patch_output (dict) – A dictionary in the TIAToolbox Engines output format. Important keys are “probabilities”, “predictions”, “coordinates”, and “labels”.
scale_factor (tuple[int, int]) – 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.
- Returns:
An SQLiteStore containing Annotations for each patch or Path to file storing SQLiteStore containing Annotations for each patch.
- Return type:
(SQLiteStore or Path)