class documentation

A collection of OpenLABEL shapes.

Class Method from_object_data_list Construct an OpenLABELShapes from a list of shape dictionaries.
Method __init__ Undocumented
Method merge_shapes Merges another OpenLABELShapes into this one.
Method to_labels Convert this shape to a FiftyOne label.
Instance Variable attributes Undocumented
Instance Variable shapes Undocumented
Instance Variable stream Undocumented
Property streams A list of streams corresponding to any object in this collection.
Method _to_individual_labels Undocumented
Method _to_point_labels Undocumented
Property _homogenous_shape_types Undocumented

Inherited from AttributeParser:

Class Method _parse_attributes Undocumented
Class Method _parse_name_val_attributes Undocumented
Constant _IGNORE_KEYS Undocumented
Constant _STREAM_KEYS Undocumented
@classmethod
def from_object_data_list(cls, shape_type, l, attributes=None): (source)

Construct an OpenLABELShapes from a list of shape dictionaries.

Parameters
shape_typethe type of the shape being loaded. Options are (OpenLABELBBox, OpenLABELPoly2D, OpenLABELPoint)
la list of shape dictionaries parsed from OpenLABEL object annotations
attributes:Nonea dictionary of attributes corresponding to all shapes in this collection
Returns
a OpenLABELShapes
def __init__(self, shapes=None, attributes=None, stream=None): (source)

Undocumented

def merge_shapes(self, shapes): (source)

Merges another OpenLABELShapes into this one.

Parameters
shapesanother OpenLABELShapes to merge into this object
def to_labels(self, label, attributes, width, height, is_points=False, skeleton=None, skeleton_key=None): (source)

Convert this shape to a FiftyOne label.

Parameters
labelthe class label for this shape
attributesa dictionary of attributes for this shape
widththe width of the frame in pixels
heightthe height of the frame in pixels
is_points:Falsewhether the labels being converted are keypoints
skeleton:Nonea fiftyone.core.odm.dataset.KeypointSkeleton used to sort list attributes based on the labels in the skeleton. Used only if is_points and skeleton_key is provided
skeleton_key:Nonethe string key into the attributes dictionary containing the label of each point, used to sort list attribute fields based on the labels in the skeleton. Used only if is_points and skeleton is provided
Returns
an fiftyone.core.labels.Keypoint
attributes = (source)

Undocumented

Undocumented

Undocumented

A list of streams corresponding to any object in this collection.

def _to_individual_labels(self, label, attributes, width, height): (source)

Undocumented

def _to_point_labels(self, label, attributes, width, height, skeleton=None, skeleton_key=None): (source)

Undocumented

@property
_homogenous_shape_types = (source)

Undocumented