class documentation
class OpenLABELShapes(AttributeParser): (source)
Constructor: OpenLABELShapes(shapes, attributes, stream)
A collection of OpenLABEL shapes.
Class Method | from |
Construct an OpenLABELShapes from a list of shape dictionaries. |
Method | __init__ |
Undocumented |
Method | merge |
Merges another OpenLABELShapes into this one. |
Method | to |
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 |
Undocumented |
Method | _to |
Undocumented |
Property | _homogenous |
Undocumented |
Inherited from AttributeParser
:
Class Method | _parse |
Undocumented |
Class Method | _parse |
Undocumented |
Constant | _IGNORE |
Undocumented |
Constant | _STREAM |
Undocumented |
Construct an OpenLABELShapes
from a list of shape
dictionaries.
Parameters | |
shape | the type of the shape being loaded. Options are
(OpenLABELBBox , OpenLABELPoly2D ,
OpenLABELPoint ) |
l | a list of shape dictionaries parsed from OpenLABEL object annotations |
attributes:None | a dictionary of attributes corresponding to all shapes in this collection |
Returns | |
a OpenLABELShapes |
Merges another OpenLABELShapes
into this one.
Parameters | |
shapes | another 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 | |
label | the class label for this shape |
attributes | a dictionary of attributes for this shape |
width | the width of the frame in pixels |
height | the height of the frame in pixels |
isFalse | whether the labels being converted are keypoints |
skeleton:None | a
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 |
skeletonNone | the 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 |