0

I have model in onnx format that contains attribute "list_classes". I run it with opencv dnn. I need to read this list using C++.

  • I tried opencv dnn library, but it seems like there is no instruments for that.
  • I tried onnxruntime, but I can't even create a session. I'm not very familiar with its syntax so maybe I did something wrong.Here is test program:
#include <onnxruntime_cxx_api.h>
#include <iostream>

int main()
{
    auto model_path = L"model.onnx";
    std::unique_ptr<Ort::Env> ort_env;
    Ort::SessionOptions session_options;
    Ort::Session session(*ort_env, model_path, session_options);

    return 0;
}

This code throws error message

Jason
  • 36,170
  • 5
  • 26
  • 60

0 Answers0