class documentation
class OpenLABELObject(AttributeParser): (source)
Constructor: OpenLABELObject(key, name, type, bboxes, ...)
An object parsed from OpenLABEL labels.
Parameters | |
key | the OpenLABEL key string for this object |
name | the name string of the object |
type | the type string of the object |
bboxes | an :class`OpenLABELShapes` of bounding boxes for this object |
segmentations | an :class`OpenLABELShapes` of polygon segmentations for this object |
keyponts | an OpenLABELShapes of keypoints for this
object |
stream | the OpenLABELStream this object corresponds to |
other | a dict of attributes and their values for this object |
is | whether this object is sample-level or frame-level |
Class Method | from |
Create an OpenLABELObject from the raw label dictionary. |
Method | __init__ |
Undocumented |
Method | filter |
Filters this object to contain only frame labels specified in the given stream info |
Method | to |
Converts the bounding boxes in this object to fiftyone.core.labels.Detection objects. |
Method | to |
Converts the keypoints in this object to fiftyone.core.labels.Keypoint objects. |
Method | to |
Converts the segmentations in this object to fiftyone.core.labels.Polyline objects. |
Method | update |
Updates this OpenLABELObject given the raw label dictionary. |
Instance Variable | frame |
Undocumented |
Instance Variable | is |
Undocumented |
Instance Variable | key |
Undocumented |
Instance Variable | name |
Undocumented |
Instance Variable | other |
Undocumented |
Instance Variable | shapes |
Undocumented |
Instance Variable | stream |
Undocumented |
Instance Variable | type |
Undocumented |
Property | is |
Whether any streams are connected to this object or corresponding frame-level objects. |
Property | streams |
Get streams corresponding to this object. |
Class Method | _get |
Undocumented |
Class Method | _parse |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _keep |
Undocumented |
Method | _to |
Undocumented |
Constant | _STREAM |
Undocumented |
Property | _sample |
Undocumented |
Inherited from AttributeParser
:
Class Method | _parse |
Undocumented |
Class Method | _parse |
Undocumented |
Constant | _IGNORE |
Undocumented |
Create an OpenLABELObject
from the raw label dictionary.
Parameters | |
obj | Undocumented |
d | dict containing the information for this object |
frame | Undocumented |
anno | id 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
Filters this object to contain only frame labels specified in the given stream info
Parameters | |
stream | the OpenLABELStreamInfo to use to filter this
object |
Returns | |
an OpenLABELObject containing only frames related to the
given stream info |
Converts the bounding boxes in this object to
fiftyone.core.labels.Detection
objects.
Parameters | |
frame | the size of the frame in pixels (width, height) |
Returns | |
a list of fiftyone.core.labels.Detection objects for each
bounding box in this object |
Converts the keypoints in this object to
fiftyone.core.labels.Keypoint
objects.
Parameters | |
frame | the size of the frame in pixels (width, height) |
skeleton | Undocumented |
skeleton | Undocumented |
Returns | |
a list of fiftyone.core.labels.Keypoint objects for each
keypoint in this object |
Converts the segmentations in this object to
fiftyone.core.labels.Polyline
objects.
Parameters | |
frame | the size of the frame in pixels (width, height) |
Returns | |
a list of fiftyone.core.labels.Polyline objects for each
polyline in this object |
Updates this OpenLABELObject
given the raw label
dictionary.
Parameters | |
d | dict containing the information for this object |
frame | Undocumented |
Returns | |
newly parsed frame numbers the object corresponds to, if any |
def _to_labels(self, frame_size, shape_type, parent=None, is_points=False, skeleton=None, skeleton_key=None):
(source)
¶
Undocumented