Skip to main content

get_onnx_metadata

get_onnx_metadata(onnx_path: Union[str, Path]) -> dict

  • Description

    Retrieve custom metadata from an ONNX model.

  • Parameters

    • onnx_path (Union[str, Path]): Path to the ONNX model.
  • Returns

    • dict: Custom metadata.
  • Example

    import docsaidkit as D

    onnx_path = 'model.onnx'
    metadata = D.get_onnx_metadata(onnx_path)
    print(metadata)
    # >>> metadata = {
    # 'key1': 'value1',
    # 'key2': 'value2',
    # 'key3': 'value3',
    # }