使用 OpenVINO 和 Go 和 GoCV 加载预训练的 DNN 模型 - 符号查找错误



我已经按照以下链接中的说明安装并验证了OpenVINO的安装:https://docs.openvinotoolkit.org/latest/_docs_install_guides_installing_openvino_linux.html

我正在使用的编辑器和技术是:Visual Studio Code,GoProgramming LanguageAWS Lambda

我正在尝试加载一个预先训练的深度学习模型及其配置:frozen_inference_graph.bin,frozen_inference_graph.xml

这是它的代码:

net := gocv.ReadNet(localModelPath, localModelConfigPath)
if net.Empty() {
glog.Errorf("Error occurred while trying to read DNN model and its configuration from %v. Error message - %v", localModelPath, err)
return err
}
defer net.Close()
net.SetPreferableBackend(gocv.NetBackendDefault)
net.SetPreferableTarget(gocv.NetTargetCPU)

每当我尝试调试程序时,在尝试执行gocv之后。读取网络函数我收到以下错误消息:

/home/jovana/go/src/pipeline/lambda/inferenceLambda/__debug_bin: symbol lookup error: /home/jovana/go/src/pipeline/lambda/inferenceLambda/__debug_bin: undefined symbol: _ZN2cv3dnn14dnn4_v201901227readNetERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_S9_

请注意,go/src/pipeline/lambda/inferenceLambda是我尝试调试的 main.go 脚本的路径。

当我尝试运行main.go脚本时,我得到:

/tmp/go-build091433297/b001/exe/main: symbol lookup error: /tmp/go-build091433297/b001/exe/main: undefined symbol: _ZN2cv3dnn14dnn4_v201901227readNetERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_S9_

老实说,我不知道此消息的含义以及从哪里开始修复它。请帮忙。

我在 Ubuntu18.04、Ubuntu16.04、CPU 和 GPU 的 Docker 容器中也遇到了同样的问题。

最新更新