iaa_od.metrics.scale_complexity

iaa_od.metrics.scale_complexity(gts, /, *, collapsed_categories, iou_threshold=0.5, use_iom=False, precomputed_result=None)[source]

Compute the scale complexity metric as defined in “Leadership of Data Annotation Teams” by McCulloh et al.

Return type:

ScaleComplexity

Parameters

gts (list[GroundTruthProtocol]): A list of GroundTruth objects representing the ground truth annotations. collapsed_categories (Optional[dict[str, list[int]]]): A dictionary mapping new category names to lists of original category IDs to be collapsed. If None, the function will prompt for interactive input. iou_threshold (float): The IoU threshold to use for matching. Default is STD_IOU_THR. use_iom (bool): Whether to use IoM matching. Default is False. precomputed_result (Optional[Result]): A precomputed Result object containing alpha value, IoU threshold, and lenient IoU settings. If provided, these settings will be used instead of computing them anew.

Returns

ScaleComplexity: The computed scale complexity value (global and per image), along with the alpha values before and after collapsing categories, both globally and per image.