This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA4VH-Q1: How to convert .onnx model into bin format

Part Number: TDA4VH-Q1

Tool/software:

Hi TI Team,

We are currently using RTOS SDK version 11_00_00_06. We have a requirement to convert a .onnx model file into .bin format using TIDLRT, in order to run the model in Vision Apps on the EVM.

Could you please provide the detailed steps for converting an ONNX model into BIN format using TIDLRT? For your reference, I have attached the ONNX model file link.

/cfs-file/__key/communityserver-discussions-components-files/791/face_5F00_landmark.onnx

Thank you for your support.

Best regards,

  • Hi Makula,

    I am unable to access the file to run your model but here are the basic instructions. 

    The easiest path to success is OSRT approach.  After setting up edgeai-tidl-tools.

    1. Go to edgeai-tidl-tools/examples/osrt_python/ort

    2. Compile a pipe cleaner. A standard model that we know works to ensur your setup is OK by:  python3 ./onnxrt_ep.py -c -m cl-ort-resnet18-v1

    3. Run the pipe cleaner model by: python3 ./onnxrt_ep.py -m cl-ort-resnet18-v1

    4. Edit ../model_configs.py and add your model in the ONNX section

    5. Compile your model by:  python3 ./onnxrt_ep.py -c -m <model_name_you_set_in_model_configs>

    The model artifacts will be in edgeai-tidl-tools/model-artifacts/<model_name>.

    Regards,

    Chris

  • Hi Chris,

    As Per My Understanding Model compiled for osrt based execution flow will not work in tidl-rt as vision_apps tidl-node uses tidl-rt. So Could You Please Provide The details steps for converting ONNX model into Bin format using TIDLRT.

    reagrds,

    saiteja

  • Hi Saiteja,

    The generated artifacts in model-artifacts are the same and should work.  I do not have specifics about what you atr attempting to do in the vision pipeline but the TIDL artifacts should not be a problem (net.bin and io.bin files).

    Regards,

    Chris