iaa_od.visualisation.show_annotations

Functions

compare_images_with_macrocategories(result, ...)

Displays the specified image with bounding box annotations from all ground truths in the provided Result object, comparing both the original categories (top row) and the collapsed macro-categories (bottom row).

show_gts_with_annotations(result, filepath, /, *)

A wrapper for the function "show_image_with_annotations" that runs it for all images in a given ground truth set.

show_image_with_annotations(result, ...[, ...])

Displays the specified image with bounding box annotations from all ground truths in the provided Result object.

show_image_with_annotations_macrocategories(...)

Displays the specified image with bounding box annotations from all ground truths in the provided Result object.

iaa_od.visualisation.show_annotations.compare_images_with_macrocategories(result, filename, filepath, collapsed_categories, /, *, enable_labels=False, show_image_filename=False, sc_data=None)[source]

Displays the specified image with bounding box annotations from all ground truths in the provided Result object, comparing both the original categories (top row) and the collapsed macro-categories (bottom row).

Parameters:
  • result (Result) – The Result object containing the ground truths and annotations.

  • filename (str) – The filename of the image to display.

  • filepath (str) – The filepath where the image is located.

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

  • enable_labels (bool, optional) – Whether to display category labels above bounding boxes. Defaults to False.

  • show_image_filename (bool, optional) – Whether to include the image filename in the title above the image. Defaults to False.

  • sc_data (ScaleComplexity | None) – Optional ScaleComplexity object containing Scale Complexity data for the images, which will be displayed in the title of the bottom row if provided. Defaults to None.

Return type:

None

iaa_od.visualisation.show_annotations.show_gts_with_annotations(result, filepath, /, *, show_stats=False, enable_labels=False, full_legend=False, show_image_filename=False)[source]

A wrapper for the function “show_image_with_annotations” that runs it for all images in a given ground truth set.

Parameters:
  • result (Result) – The Result object containing the ground truths and annotations.

  • filepath (str) – The filepath where the images are located.

  • show_stats (bool, optional) – Whether to show statistics alongside the annotations. Defaults to False.

  • enable_labels (bool, optional) – Whether to display category labels above bounding boxes. Defaults to False.

  • full_legend (bool, optional) – Whether to include all categories in the legend, even if not present in the image. Defaults to False.

  • show_image_filename (bool, optional) – Whether to include the image filename in the title above the image. Defaults to False.

Return type:

None

iaa_od.visualisation.show_annotations.show_image_with_annotations(result, filename, filepath, /, *, show_stats=False, enable_labels=False, full_legend=False, show_image_filename=False)[source]

Displays the specified image with bounding box annotations from all ground truths in the provided Result object.

Parameters:
  • result (Result) – The Result object containing the ground truths and annotations.

  • filename (str) – The filename of the image to display.

  • filepath (str) – The filepath where the image is located.

  • show_stats (bool, optional) – Whether to show statistics alongside the annotations. Defaults to False.

  • enable_labels (bool, optional) – Whether to display category labels above bounding boxes. Defaults to False.

  • full_legend (bool, optional) – Whether to include all categories in the legend, even if not present in the image. Defaults to False.

  • show_image_filename (bool, optional) – Whether to include the image filename in the title above the image. Defaults to False.

Return type:

None

iaa_od.visualisation.show_annotations.show_image_with_annotations_macrocategories(result, filename, filepath, collapsed_categories, /, *, enable_labels=False, full_legend=False, show_image_filename=False)[source]

Displays the specified image with bounding box annotations from all ground truths in the provided Result object.

Parameters:
  • result (Result) – The Result object containing the ground truths and annotations.

  • filename (str) – The filename of the image to display.

  • filepath (str) – The filepath where the image is located.

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

  • enable_labels (bool, optional) – Whether to display category labels above bounding boxes. Defaults to False.

  • full_legend (bool, optional) – Whether to include all macro-categories in the legend, even if not present in the image. Defaults to False.

  • show_image_filename (bool, optional) – Whether to include the image filename in the title above the image. Defaults to False.

Return type:

None