iaa_od.models.annotation
Classes
|
Represents a single annotation in a Ground Truth JSON file. |
- class iaa_od.models.annotation.Annotation(*, gt_filepath, gt_name, image_name=None, annotation, image_height=None)[source]
Bases:
objectRepresents a single annotation in a Ground Truth JSON file.
- gt_filepath
Path to the Ground Truth JSON file.
- Type:
str
- gt_name
Name of the Ground Truth dataset.
- Type:
str
- id
Unique identifier for the annotation.
- Type:
str
- category_id
Category ID of the annotated object.
- Type:
int
- image_id
Identifier of the image containing the annotation.
- Type:
str
- bbox_coords
Bounding box coordinates of the annotation.
- Type:
- image_name
Filename of the image (if available).
- Type:
Optional[str]
- source_file
Source file from which the annotation was derived (if available).
- Type:
Optional[str]
- unit_id
Identifier of the unit this annotation belongs to (if units were computed).
- Type:
Optional[int]
-
annotation:
InitVar
-
bbox_coords:
BoundingBox
-
category_id:
int
-
gt_filepath:
str
-
gt_name:
str
-
id:
str
-
image_height:
InitVar= None
-
image_id:
str
-
image_name:
Optional[str]
-
source_file:
Optional[str]
- property unique_id: str
Generate a unique identifier for the annotation by combining the Ground Truth name and the annotation ID.
- Returns:
A unique identifier for the annotation.
- Return type:
str
-
unit_id:
Optional[int]