Intel® Distribution of OpenVINO™ Toolkit
Community support and discussions about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all things computer vision-related on Intel® platforms.
5932 Discussions

Failed to call OpenVINO function to deal with my own caffe model in OpenCV, while successed with the demo model

s__jq
Beginner
157 Views

    By following the lession article and using the code file named 'openvino_fd_myriad.py' ,I successed to call OpenVINO deal with the demo model in OpenCV. 

    But then, I falied to do that by using another caffe model.

    Here are my steps below:

1.Use the mo_caffe.py to translate the caffe model.     ---  successed

python mo_caffe.py --input_model "posea.caffemodel" --output_dir "ir\FP16" --data_type FP16 --model_name posea --scale_value image[255.0]

2.(python)  call OpenVINO function to deal with my own caffe model in OpenCV.    --- failed, got errors

(1) Code:

inHeight = 384
inWidth = int((inHeight/frameHeight)*frameWidth)
inpBlob = cv2.dnn.blobFromImage(image1, size=(inWidth, inHeight), ddepth=cv2.CV_8U)
net.setInput(inpBlob)
output = net.forward()

(2) Code execution results:


Traceback (most recent call last):
  File "poseN.py", line 198, in <module>
    output = net.forward()
cv2.error: OpenCV(4.0.1-openvino) /home/jenkins/workspace/OpenCV/OpenVINO/build/opencv/modules/dnn/src/op_inf_engine.cpp:553: error: (-215:Assertion failed) Failed to initialize Inference Engine backend: AssertionFailed: inputSize % 2 == 0 in function 'initPlugin'
 

    Can anyone help?  Please ...

 

0 Kudos
3 Replies
s__jq
Beginner
157 Views

( I use the Intel Neural Compute Stick 2 in this case. )

Shubha_R_Intel
Employee
157 Views

Dear jq, 

honestly it's hard to tell what happened in your code just by reading your snippets. But please study carefully the end2end_video_analytics_opencv sample within inference_engine/samples, which seems similar to your example. Likely you made a coding mistake somewhere.

Hope it helps,

Thanks,

Shubha

Shao__Jingqiang
Beginner
157 Views

Dear Shubha:

    Thanks for your reply!   I'll study the sample you recommended. 

    And I found the model "human_pose_estimat..." is incluede in the intel open model zoo, which is

what I want.

    Unfortunately, that model is labeled "Not supportted by  the Intel Neural Compute Stick 2"(NCS2)

as  I understand.

    I hope my understanding is not right, or there is another way to run the model on the NCS2. Could

you tell me about that ?

    Thanks a lot.

    jq

 

Reply