class documentation
Annotations parsed from OpenLABEL format able to be converted to FiftyOne labels.
Method | __init__ |
Undocumented |
Method | get |
Get the width and height of a given URI or file id |
Method | get |
Get the FiftyOne labels corresponding to the annotations of a given URI. The results are two dictionaries, sample- and frame-level, mapping field names to values and label objects. |
Method | parse |
Parses a single OpenLABEL labels file. |
Instance Variable | metadata |
Undocumented |
Instance Variable | objects |
Undocumented |
Instance Variable | streams |
Undocumented |
Method | _parse |
Undocumented |
Get the width and height of a given URI or file id
Parameters | |
file | the unique identifier to a media file |
Returns | |
(width, height) of the given file |
def get_labels(self, uri, label_types, frame_size, seg_type, skeleton=None, skeleton_key=None):
(source)
¶
Get the FiftyOne labels corresponding to the annotations of a given URI. The results are two dictionaries, sample- and frame-level, mapping field names to values and label objects.
Parameters | |
uri | the unique identifier to a media file |
label | a list of label types to load. The supported values are ("detections", "segmentations", "keypoints"). |
frame | the (width, height) tuple for the media frame |
seg | the SegmentationType to use for segmentation
annotations |
skeleton:None | a
fiftyone.core.odm.dataset.KeypointSkeleton to use as a
reference when loading keypoints |
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 |