Hi,
I tried to run a model on oak-d without using camera. May be I'm completly wrong…
first I can run depthaidemo.py
using depthai module from: C:\Users\laurent\AppData\Roaming\Python\Python310\site-packages\depthai.cp310-win_amd64.pyd
Depthai version installed: 2.20.2.0
Setting up demo...
Available devices:
[0] 14442C10219C90D000 [X_LINK_UNBOOTED]
USB Connection speed: UsbSpeed.SUPER
Stopping demo...
=== TOTAL FPS ===
[color]: 26.8
[depthRaw]: 26.8
[depth]: 26.8
[left]: 26.1
[rectifiedLeft]: 25.4
[right]: 26.1
[rectifiedRight]: 26.1
[nn]: 26.1
[nnInput]: 26.8
Setting up demo...
Available devices:
[0] 14442C10219C90D000 [X_LINK_UNBOOTED]
USB Connection speed: UsbSpeed.SUPER
Downloading C:\Users\laurent\.cache\blobconverter\human-pose-estimation-0001_openvino_2021.4_6shave.blob...
Then I compile and run my c++. In this code I'm using a model given in openvino (omz_downloader --all) 🇦
string path("C:/Users/laurent/intel/resnet50-binary-0001/FP16-INT1/");
Net net = readNetFromModelOptimizer(path+"resnet50-binary-0001.xml", path+"resnet50-binary-0001.bin");
net.setPreferableBackend(DNN_BACKEND_INFERENCE_ENGINE);
net.setPreferableTarget(DNN_TARGET_MYRIAD);
cout << "DNN_TARGET_MYRIAD -> OK\n";
Mat img, dst;
Image2BlobParams paramMobilenet;
paramMobilenet.scalefactor = Scalar(1.0 / 58.393, 1.0 / 57.12, 1.0 / 57.375);
paramMobilenet.size = Size(224, 224);
paramMobilenet.mean = Scalar(123.68, 116.779, 103.939);
paramMobilenet.swapRB = true;
paramMobilenet.datalayout = DNN_LAYOUT_NCHW;
img = imread(samples::findFile("C:/data/VOC2012/JPEGImages/2007_002227.jpg"));
Mat blob = blobFromImageWithParams(img, paramMobilenet);
net.setInput(blob);
cout << "setInput -> OK\n";
Mat detect = net.forward();
cout << "forward -> OK\n";
I have got an error. My question is must I stop to find an answer because what i'm trying is not possible or somethong is wrong in my intalled or in my program?
DNN_TARGET_MYRIAD -> OK
setInput -> OK
[ INFO:0@2586.433] global ie_ngraph.cpp:860 cv::dnn::InfEngineNgraphNet::initPlugin DNN/IE: Calling LoadNetwork(device=MYRIAD)...
OpenCV(4.8.0-pre) Error: Unspecified error (> Failed to initialize Inference Engine backend (device = MYRIAD):
C:\lib\openvino\src\plugins\intel_myriad\common\include\vpu/utils/error.hpp:39 [ GENERAL_ERROR ]
C:\lib\openvino\src\plugins\intel_myriad\graph_transformer\src\frontend\frontend.cpp:594 Failed to compile layer "610":
C:\lib\openvino\src\plugins\intel_myriad\common\include\vpu/utils/error.hpp:39 [ GENERAL_ERROR ]
C:\lib\openvino\src\plugins\intel_myriad\graph_transformer\src\stages\convolution.cpp:47 invalid number of inputs: 3u
) in cv::dnn::InfEngineNgraphNet::initPlugin, file C:\lib\opencv\modules\dnn\src\ie_ngraph.cpp, line 865