iaa_od.models.ground_truth
Classes
|
Represents a Ground Truth JSON file. |
- class iaa_od.models.ground_truth.GroundTruth(*, gt_filepath, name)[source]
Bases:
objectRepresents a Ground Truth JSON file.
- gt_filepath
Path to the Ground Truth JSON file.
- Type:
str
- name
Name of the Ground Truth dataset.
- Type:
str
- images
Dictionary of Image objects, keyed by image filename.
- Type:
dict
- annotations
Dictionary of lists of Annotation objects, keyed by image filename.
- Type:
dict
- categories_dict
Dictionary mapping category IDs to category names.
- Type:
dict
- image_id_to_filename
Dictionary mapping image IDs to filenames.
- Type:
dict
-
annotations:
dict[str,list[Annotation]]
-
categories_dict:
dict[int,str]
- find_annotations(gt_data, images)[source]
Finds and returns a dictionary of lists of Annotation objects from the Ground Truth data, keyed by image filename.
- Parameters:
gt_data (dict) – The loaded Ground Truth JSON data.
images (dict) – A dictionary of Image objects, keyed by image filename.
- Returns:
A dictionary of lists of Annotation objects, keyed by image filename.
- Return type:
dict[str, list[Annotation]]
- find_images(gt_data)[source]
Finds and returns a dictionary of Image objects from the Ground Truth data.
- Parameters:
gt_data (dict) – The loaded Ground Truth JSON data.
- Returns:
A dictionary of Image objects, keyed by image filename.
- Return type:
dict[str, Image]
-
gt_filepath:
str
-
image_filename_to_id:
dict[str,int]
-
image_id_to_filename:
dict[int,str]
-
name:
str