Attention: This MediaPipe Solutions Preview is an early release. Learn more.

mp.packet_creator.create_string_to_packet_map

Stay organized with collections Save and categorize content based on your preferences.

create_string_to_packet_map(arg0: Dict[str, mediapipe.python._framework_bindings.packet.Packet]) -> mediapipe.python._framework_bindings.packet.Packet

Create a MediaPipe string to packet map Packet from a dictionary.

Args: data: A dictionary that has (str, Packet) pairs.

Returns: A MediaPipe Packet holding std::map.

Raises: TypeError: If the input is not a dictionary from str to packet.

Examples: dict_packet = mp.packet_creator.create_string_to_packet_map({ 'float': mp.packet_creator.create_float(0.1), 'int': mp.packet_creator.create_int(1), 'string': mp.packet_creator.create_string('1') data = mp.packet_getter.get_str_to_packet_dict(dict_packet)