Search Unity

  1. We are looking for feedback on the experimental Unity Safe Mode which is aiming to help you resolve compilation errors faster during project startup.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

InvalidProtocolBufferException when I add onnx model

Discussion in 'ML-Agents' started by unity-huunity, May 27, 2020.

  1. unity-huunity

    unity-huunity

    Joined:
    Dec 17, 2013
    Posts:
    9
    When I add onnx model to my project unity shows an error:

    So I can't add onnx model as NNModel field in unity inspector. Any ideas? What should I do?
    I'm trying to follow this guide
     
  2. Mantas-Puida

    Mantas-Puida

    Unity Technologies

    Joined:
    Nov 13, 2008
    Posts:
    1,857
    Most likely your your onnx file is broken. Could you please post it here?
     
  3. unity-huunity

    unity-huunity

    Joined:
    Dec 17, 2013
    Posts:
    9
    I've take onnx file from here
     
  4. unity-huunity

    unity-huunity

    Joined:
    Dec 17, 2013
    Posts:
    9
    ok, i figured it out.
    It was wrong version of onnx model format.

    if you have same problem:
    1. go to barakuda github
    2. go to barracuda-release/Tools/requirements.txt
    3. there is a line with onnx version requirement
    4. find model with version you need
     
    Last edited: May 28, 2020
unityunity