Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.
6503 Discussions

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

s__jq
Beginner
583 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
583 Views

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

0 Kudos
Shubha_R_Intel
Employee
583 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

0 Kudos
Shao__Jingqiang
Beginner
583 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

 

0 Kudos
Reply