mp.ValidatedGraphConfig

A class to validate and canonicalize a CalculatorGraphConfig.

binary_config

text_config

Methods

initialize

initialize(self: mediapipe.python._framework_bindings.validated_graph_config.ValidatedGraphConfig, **kwargs) -> None

Initialize ValidatedGraphConfig with a CalculatorGraphConfig.

Args: binary_graph_path: The path to a binary mediapipe graph file (.binarypb). graph_config: A single CalculatorGraphConfig proto message or its text proto format.

Raises: FileNotFoundError: If the binary graph file can't be found. ValueError: If the input arguments prvoided are more than needed or the graph validation process contains error.

Examples: validated_graph_config = mp.ValidatedGraphConfig() validated_graph_config.initialize(graph_config=text_config)

initialized

initialized(self: mediapipe.python._framework_bindings.validated_graph_config.ValidatedGraphConfig) -> bool

Indicate if ValidatedGraphConfig is initialized.

registered_side_packet_type_name

registered_side_packet_type_name(self: mediapipe.python._framework_bindings.validated_graph_config.ValidatedGraphConfig, arg0: str) -> str

Return the registered type name of the specified side packet if it can be determined.

Args: side_packet_name: The input/output side packet name.

Returns: The registered packet type name of the input/output side packet.

Raises: ValueError: If the input/output side packet cannot be found.

Examples: validated_graph_config.registered_side_packet_type_name('side_packet')

registered_stream_type_name

registered_stream_type_name(self: mediapipe.python._framework_bindings.validated_graph_config.ValidatedGraphConfig, arg0: str) -> str

Return the registered type name of the specified stream if it can be determined.

Args: stream_name: The input/output stream name.

Returns: The registered packet type name of the input/output stream.

Raises: ValueError: If the input/output stream cannot be found.

Examples: validated_graph_config.registered_stream_type_name('stream_name')