Annotations and Predictions
Bases: BaseModel
Represents an image annotation, including bounding box coordinates, category,
segmentation, and tags.
Attributes:
Name | Type | Description |
---|---|---|
coordinates | List [ NonNegativeFloat ] | Bounding box coordinates in the format [x1, y1, x2, y2]. Examples : [[606, 170.91, 621.35, 184.28]] Constraints : Must be a list of exactly 4 non-negative floats. |
category | Category | The category of the annotated object. This should be an instance of the Category class. |
id | Optional [str] | String ID of the bounding box. It should be unique within the dataset. Examples : ["uuid4"] Default : "" Validation Aliases : "id", "bbox_id" |
segmentation | Optional [ List [ List[NonNegativeFloat ]]] | List of (list of) segmentation points for the annotated object. Examples : [[[431.0, 217.5, 442.0, 215.5, 432.0, 216.5, 431.0, 217.5]]] Default : An empty list. |
tags | Optional [List[Tag ]] | List of tags for the bounding box. Each tag can provide additional metadata for the annotation. Examples : - [ Tag(key="colour", name="colour", values=["peach"]), Tag(key="daytime", name="daytime", values=["night", "snow"]) ] Default : An empty list. |
Bases: Annotation
Represents a model prediction, including bounding box coordinates, category,
segmentation, tags, and a confidence score.
Attributes:
Name | Type | Description |
---|---|---|
coordinates | List [ NonNegativeFloat ] | Bounding box coordinates in the format [x1, y1, x2, y2]. Inherited from Annotation . Examples : [[606, 170.91, 621.35, 184.28]] Constraints : Must be a list of exactly 4 non-negative floats. |
category | Category | The category of the predicted object. Inherited from Annotation . This should be an instance of the Category class. |
id | Optional[str] | String ID of the bounding box. It should be unique within the dataset. Inherited from Annotation . Examples : ["uuid4"] Default : "" Validation Aliases : "id", "bbox_id" |
segmentation | Optional[ List [ List [NonNegativeFloat ]]] | List of (list of) segmentation points for the predicted object. Inherited from Annotation . Examples : [[[431.0, 217.5, 442.0, 215.5, 432.0, 216.5, 431.0, 217.5]]] Default : An empty list. |
tags | Optional[ List [ Tag ]] | List of tags for the bounding box. Each tag can provide additional metadata for the prediction. Inherited from Annotation . Examples : - [ Tag(key="colour", name="colour", values=["peach"]), Tag(key="daytime", name="daytime", values=["night", "snow"]) ] Default : An empty list. |
score | NonNegativeFloat | Confidence score of the prediction. Examples : [0.75, 1.0, 0.5] Constraints : Must be a non-negative float and less than or equal to 1.0. |
Updated 2 months ago