class documentation

An object parsed from OpenLABEL labels.

Parameters
keythe OpenLABEL key string for this object
namethe name string of the object
typethe type string of the object
bboxesan :class`OpenLABELShapes` of bounding boxes for this object
segmentationsan :class`OpenLABELShapes` of polygon segmentations for this object
keypontsan OpenLABELShapes of keypoints for this object
streamthe OpenLABELStream this object corresponds to
other_attrsa dict of attributes and their values for this object
is_frame_levelwhether this object is sample-level or frame-level
Class Method from_anno_dict Create an OpenLABELObject from the raw label dictionary.
Method __init__ Undocumented
Method filter_stream Filters this object to contain only frame labels specified in the given stream info
Method to_detections Converts the bounding boxes in this object to fiftyone.core.labels.Detection objects.
Method to_keypoints Converts the keypoints in this object to fiftyone.core.labels.Keypoint objects.
Method to_polylines Converts the segmentations in this object to fiftyone.core.labels.Polyline objects.
Method update_dict Updates this OpenLABELObject given the raw label dictionary.
Instance Variable frame_objects Undocumented
Instance Variable is_frame_level Undocumented
Instance Variable key Undocumented
Instance Variable name Undocumented
Instance Variable other_attrs Undocumented
Instance Variable shapes Undocumented
Instance Variable stream Undocumented
Instance Variable type Undocumented
Property is_streamless Whether any streams are connected to this object or corresponding frame-level objects.
Property streams Get streams corresponding to this object.
Class Method _get_shape_list Undocumented
Class Method _parse_object_dict Undocumented
Method _get_label_attrs Undocumented
Method _get_object_attributes Undocumented
Method _keep_frames Undocumented
Method _to_labels Undocumented
Constant _STREAM_KEYS Undocumented
Property _sample_level_streams Undocumented

Inherited from AttributeParser:

Class Method _parse_attributes Undocumented
Class Method _parse_name_val_attributes Undocumented
Constant _IGNORE_KEYS Undocumented
@classmethod
def from_anno_dict(cls, obj_key, d, frame_number=None): (source)

Create an OpenLABELObject from the raw label dictionary.

Parameters
obj_keyUndocumented
ddict containing the information for this object
frame_numberUndocumented
anno_idid of the object
Returns
a tuple containing the OpenLABELObject and the frame numbers the object corresponds to, if any.
def __init__(self, key, name=None, type=None, bboxes=None, segmentations=None, keypoints=None, stream=None, other_attrs=None, is_frame_level=False): (source)

Undocumented

def filter_stream(self, stream_info): (source)

Filters this object to contain only frame labels specified in the given stream info

Parameters
stream_infothe OpenLABELStreamInfo to use to filter this object
Returns
an OpenLABELObject containing only frames related to the given stream info
def to_detections(self, frame_size): (source)

Converts the bounding boxes in this object to fiftyone.core.labels.Detection objects.

Parameters
frame_sizethe size of the frame in pixels (width, height)
Returns
a list of fiftyone.core.labels.Detection objects for each bounding box in this object
def to_keypoints(self, frame_size, skeleton=None, skeleton_key=None): (source)

Converts the keypoints in this object to fiftyone.core.labels.Keypoint objects.

Parameters
frame_sizethe size of the frame in pixels (width, height)
skeletonUndocumented
skeleton_keyUndocumented
Returns
a list of fiftyone.core.labels.Keypoint objects for each keypoint in this object
def to_polylines(self, frame_size): (source)

Converts the segmentations in this object to fiftyone.core.labels.Polyline objects.

Parameters
frame_sizethe size of the frame in pixels (width, height)
Returns
a list of fiftyone.core.labels.Polyline objects for each polyline in this object
def update_dict(self, d, frame_number=None): (source)

Updates this OpenLABELObject given the raw label dictionary.

Parameters
ddict containing the information for this object
frame_numberUndocumented
Returns
newly parsed frame numbers the object corresponds to, if any
frame_objects: dict = (source)

Undocumented

is_frame_level: False = (source)

Undocumented

Undocumented

Undocumented

other_attrs: None = (source)

Undocumented

Undocumented

Undocumented

Undocumented

@property
is_streamless = (source)

Whether any streams are connected to this object or corresponding frame-level objects.

Get streams corresponding to this object.

@classmethod
def _get_shape_list(cls, object_data, key): (source)

Undocumented

@classmethod
def _parse_object_dict(cls, d): (source)

Undocumented

def _get_label_attrs(self, frame_size, parent=None): (source)

Undocumented

def _get_object_attributes(self, parent=None): (source)

Undocumented

def _keep_frames(self, frame_numbers): (source)

Undocumented

def _to_labels(self, frame_size, shape_type, parent=None, is_points=False, skeleton=None, skeleton_key=None): (source)

Undocumented

_STREAM_KEYS: list[str] = (source)

Undocumented

Value
['stream', 'coordinate_system']
@property
_sample_level_streams = (source)

Undocumented