I am trying to write a program in Go Programming Language that is using OpenVINO DNN models in order to perform inference. In order to do that I've followed instructions from this GITHUB link: https://github.com/hybridgroup/gocv/tree/master/openvino
I have installed OpenVINO and 3rd party libraries that go with it, this includes OpenCV which is located in ~/intel/openvino_{version}/opencv
directory.
Thing is whenever I try to execute following command:
go run -tags openvino ./cmd/version/main.go
I get this output:
runtime/cgo
/usr/bin/ld: cannot find -lHeteroPlugin
/usr/bin/ld: cannot find -lMKLDNNPlugin
/usr/bin/ld: cannot find -lmyriadPlugin
/usr/bin/ld: cannot find -linference_engine
/usr/bin/ld: cannot find -lclDNNPlugin
/usr/bin/ld: cannot find -lopencv_pvl
collect2: error: ld returned 1 exit status
So I tried to set my CGO_LDFLAGS like this:
CGO_LDFLAGS=-L/opencv/lib -L/deployment_tools/inference_engine/lib/intel64 -lpthread -ldl -ldliaPlugin -lHeteroPlugin -lMKLDNNPlugin -lmyriadPlugin -linference_engine -lclDNNPlugin -lopencv_core -lopencv_pvl -lopencv_videoio -lopencv_imgproc -lopencv_highgui -lopencv_imgcodecs -lopencv_objdetect -lopencv_features2d -lopencv_video -lopencv_dnn -lopencv_calib3d
But when I do that I am getting:
bash: -L/deployment_tools/inference_engine/lib/intel64: No such file or directory
Even though ~/intel/openvino/deployment_tools/inference_engine/lib/intel64
does exitst on my system.
As of 2019 R3.334, OpenVINO SDK started supporting GoCV again.
Check this out:
https://github.com/hybridgroup/gocv/issues/491
The recent version of openvino dropped the support of pvl so that there is no libpvl or something like that.
You can try one older version of it but there is no future.