iaa_od.utils.collapse_categories

Functions

collapse_categories_interactive(gts)

An interactive function which allows the user to select which categories to collapse into single macro-categories for the computation of the scale complexity metric.

validate_macrocats(gts, macro_categories)

Validates the provided macro-categories dictionary against the categories in the ground truth objects.

iaa_od.utils.collapse_categories.collapse_categories_interactive(gts)[source]

An interactive function which allows the user to select which categories to collapse into single macro-categories for the computation of the scale complexity metric.

Returns:

A dictionary mapping macro-category names to lists of category IDs

Return type:

dict[str, list[int]]

iaa_od.utils.collapse_categories.validate_macrocats(gts, macro_categories)[source]

Validates the provided macro-categories dictionary against the categories in the ground truth objects.

Parameters:
  • gts – The ground truth segmentation objects

  • macro_categories (dict[str, list[int]]) – A dictionary mapping macro-category names to lists of category IDs

Returns:

A dictionary mapping macro-category names to lists of category IDs

Return type:

dict[str, list[int]]