class documentation

class OpenLABELStreams(OpenLABELGroup): (source)

View In Hierarchy

A collection of OpenLABEL streams.

Method __init__ Undocumented
Method get_dimensions Get the width and height of a given URI or file id.
Method get_stream_info Get all stream infos, including stream and relevant frame numbers, for a given media file identifier.
Method parse_streams_dict Parses the OpenLABEL annotations corresponding to a specific dictionary of streams.
Property uris All unique media file identifiers corresponding to streams in this collection.
Method _add_stream_dict Parses the given raw stream dictionary.
Instance Variable _uri_to_stream_ids Undocumented
Property _element_type Undocumented

Inherited from OpenLABELGroup:

Class Method _get_element_id Undocumented
Class Method _get_label_file_id Undocumented
Method _add_element_dict Parses the given raw stream dictionary.
Method _parse_group_dict Undocumented
Instance Variable _element_id_to_element Undocumented
Instance Variable _keys_by_label_file_id Undocumented
def get_dimensions(self, uri): (source)

Get the width and height of a given URI or file id.

Parameters
uriUndocumented
file_idthe unique identifier to a media file
Returns
the (width, height) of the given file
def get_stream_info(self, uri): (source)

Get all stream infos, including stream and relevant frame numbers, for a given media file identifier.

Parameters
urithe unique media file identifier for which to get all stream infos
Returns
the OpenLABELStreamInfos corresponding to the given uri
def parse_streams_dict(self, streams_dict, label_file_id, frame_number=None): (source)

Parses the OpenLABEL annotations corresponding to a specific dictionary of streams.

Parameters
streams_dictthe dict of OpenLABEL stream annotations
label_file_idthe name of the annotations file containing these streams
frame_number:Nonean optional frame that this streams_dict is in

All unique media file identifiers corresponding to streams in this collection.

def _add_stream_dict(self, label_file_id, stream_name, stream_d, frame_number=None): (source)

Parses the given raw stream dictionary.

Parameters
label_file_idthe filename of the annotations file from which these labels are parsed
stream_namethe name of the stream being parsed
stream_da dict containing stream information to parse
frame_number:Nonethe frame number from which this stream information dict was parsed, 'None' if from the top-level streams
_uri_to_stream_ids = (source)

Undocumented