Source code for iaa_od.models.ground_truth_protocol

from .annotation_protocol import AnnotationProtocol
from .image import Image
from typing import Protocol

[docs] class GroundTruthProtocol(Protocol): """ Protocol representing the abstract structure of a Ground Truth. This protocol defines the structure of GroundTruth and RandomGroundTruth. Attributes: name (str): Name of the Ground Truth dataset. images (dict[str, Image]): A dictionary mapping image filenames to Image objects. annotations (dict[str, list[AnnotationProtocol]]): A dictionary mapping image filenames to lists of annotations. categories_dict (dict[int, str]): A dictionary mapping category IDs to category names. """ # Properties name: str images: dict[str, Image] annotations: dict[str, list[AnnotationProtocol]] categories_dict: dict[int, str]