ObjectMeta
- class savant.meta.object.ObjectMeta(element_name, label, bbox, confidence=1.0, track_id=18446744073709551615, parent=None, attributes=None, draw_label=None)
The ObjectMeta describes the object that was detected or created on the frame.
- Parameters:
element_name (str) – The unique identifier of the component by which the object was created.
label (str) – Class label of the object.
bbox (Union[BBox, RBBox]) – Bounding box of the object.
confidence (Optional[float]) – Confidence of the object from detector.
track_id (int) – Unique ID for tracking the object. Default value is
UNTRACKED_OBJECT_ID
. It indicates the object has not been tracked.parent (Optional[ObjectMeta]) – The parent object metadata.
attributes (Optional[List[AttributeMeta]]) – The list of additional attributes of object.
- get_attr_meta_list(element_name, attr_name)
Returns a list of the object’s specified attributes.
- Parameters:
- Returns:
List of AttributeMeta or None if the object has no such attributes.
- Return type:
- get_attr_meta(element_name, attr_name)
Returns the specified attribute of the object.
- Parameters:
- Returns:
AttributeMeta or None if the object has no such attribute.
- Return type:
- add_attr_meta(element_name, name, value, confidence=1.0)
Adds specified object attribute to object meta.
- property parent: ObjectMeta
Returns this object’s parent.
- Returns:
Parent object.
- property track_id: int
Returns unique ID to track the object.
UNTRACKED_OBJECT_ID
indicates the object has not been tracked.- Returns:
Unique ID for object.
- property bbox: Optional[Union[BBox, RBBox]]
Returns bounding box of object or None if the object has no bounding box.
- Returns:
Instance of a class that implements the BoundingBox interface. It can be
RegularBoundingBox
orRotatedBoundingBox
- sync_bbox()