mp.packet_getter.get_proto

Get the content of a MediaPipe proto Packet as a proto message.

packet A MediaPipe proto Packet.

A proto message.

TypeError If the message descriptor can't be found by type name.

detection = detection_pb2.Detection() text_format.Parse('score: 0.5', detection) proto_packet = mp.packet_creator.create_proto(detection) output_proto = mp.packet_getter.get_proto(proto_packet)