class documentation
class OpenLABELObjects(OpenLABELGroup): (source)
A collection of OpenLABELObject
and corresponding utility
methods.
Method | add |
Adds an OpenLABELObject to this collection. |
Method | get |
Gets any objects that correspond to an info in the given stream infos. |
Method | parse |
Parses the OpenLABEL annotations corresponding to a specific dictionary of objects. |
Method | to |
Converts the stored OpenLABELObject to FiftyOne labels. |
Property | all |
A list of OpenLABELObject instances in this collection. |
Property | streams |
Get streams corresponding to any object in this collection. |
Method | _get |
Undocumented |
Property | _element |
Undocumented |
Inherited from OpenLABELGroup
:
Method | __init__ |
Undocumented |
Class Method | _get |
Undocumented |
Class Method | _get |
Undocumented |
Method | _add |
Parses the given raw stream dictionary. |
Method | _parse |
Undocumented |
Instance Variable | _element |
Undocumented |
Instance Variable | _keys |
Undocumented |
Adds an OpenLABELObject
to this collection.
Parameters | |
obj | the name of the object in the OpenLABEL annotations |
label | the filename of the annotations file containing this label |
obj | the OpenLABELObject to add |
Gets any objects that correspond to an info in the given stream infos.
Parameters | |
stream | a OpenLABELStreamInfos used to get
corresponding objects |
Returns | |
an OpenLABELObjects with objects that correspond to any of
the given stream infos |
Parses the OpenLABEL annotations corresponding to a specific dictionary of objects.
Parameters | |
objects | the dict of OpenLABEL object annotations |
label | the name of the annotations file containing these objects |
frameNone | an optional frame that this objects_dict is in |
def to_labels(self, frame_size, label_types, seg_type, stream_infos, skeleton=None, skeleton_key=None):
(source)
¶
Converts the stored OpenLABELObject
to FiftyOne labels.
Parameters | |
frame | the size of the image frame in pixels (width, height) |
label | a list of label types to load |
seg | the SegmentationType to use to store
segmentations |
stream | the OpenLABELStreamInfos containing
sample-level attributes to parse into labels |
skeleton:None | a
fiftyone.core.odm.dataset.KeypointSkeleton to use when
loading keypoint annotations |
skeletonNone | the name of the field in the OpenLABEL annotations containing the labels of keypoints matching the labels of the given skeleton |
Returns | |
a dictionary of sample level fields and label objects and a dictionary of frame numbers to frame level fields and label objects |