Accessing metadata of ONNX model with NeuralNetworkInference?

Hi, I’m working on a plugin that runs inference on a NeuralNetwork and I have an .onnx model with some custom metadata that was added to the model in Python in the following way, before it was exported:

meta = model_onnx.metadata_props.add()
meta.key = "key_meta"
meta.value = "value_meta"
print(model_onnx.metadata_props[0])

Is there any way using the NNI plugin (or UE itself) that I can access this metadata again? Looking through the NNI api there seem to be no functions exposed for this purpose. I know it can be done with the onnx library but it would be ideal not having to add another onnx library in a ThirdParty folder of my plugin since it already exists in the editor. So if NNI doesn’t provide any function, is there some way that I can access the onnx library already available in UE?

Hey @viigeland, how did you add data to the model?
did you converted from pytorch?

Hi @alberto , yes data was added to the model as in the python code in the question. And yes, the model was converted using pytorch.

I did connected to Dream

My idea was to make a new technology for VFX,
based on the old but gold:

Then my project:

Looks like:

I did ask to microsoft for support with the integration.
Then they made a special breakfast at 7 of the morning on holidays

And now is Microsoft technology :slight_smile:
Not worried because Is in the forums time ago

I have the model in huggin face and the code is open-source, not an expert in ONNX, can you share the script? I need kind of magenta model I guess

@viigeland the tutorials