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.
6495 Discussions

Error while executing intel pretrained model

rohit12
Beginner
705 Views

Hello,

I am new to this environment. I am trying to use one of the intel pretrained models provided. "vehicle-license-plate-detection-barrier-0106". I want to execute it on NCS2

 

below is my code:

import cv2

ARCH_FPATH = 'vehicle-license-plate-detection-barrier-0106.xml'

MODEL_FPATH = 'vehicle-license-plate-detection-barrier-0106.bin'

IMG_FPATH = 'car.jpeg'

net = cv2.dnn.readNet(ARCH_FPATH, MODEL_FPATH)

net.setPreferableBackend(cv2.dnn.DNN_BACKEND_INFERENCE_ENGINE)

net.setPreferableTarget(cv2.dnn.DNN_TARGET_MYRIAD)

img = cv2.imread(IMG_FPATH)

blob = cv2.dnn.blobFromImage(img)

net.setInput(blob)

out = net.forward()

 

Here I am getting error message:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
cv2.error: Check 'input_product.get_length() % output_product.get_length() == 0' failed at C:\j\workspace\private-ci\ie\build-windows-vs2019\b\repos\openvino\ngraph\core\src\op\reshape.cpp:334:
While validating node 'v1::Reshape SSD/concat_reshape_softmax/mbox_loc_final (SSD/concat_reshape_softmax/mbox_loc[0]:f16{1,12204}, SSD/concat_reshape_softmax/mbox_loc_final/shape[0]:i64{3}) -> (f16{?,?,?})' with friendly_name 'SSD/concat_reshape_softmax/mbox_loc_final':
Non-'-1' output dimensions do not evenly divide the input dimensions

 

Could someone please help me with it and let me know the issue. Thanks in advance.

0 Kudos
2 Replies
Zulkifli_Intel
Moderator
683 Views

Hello Rohit,

 

Thank you for reaching out to us.

 

I faced the same issue when running the vehicle-license-plate-detection-barrier-0106 pre-trained model using the script you’ve shared.

Inkedsecurity barrier demoo.jpg 

 

My suggestion is that you can run the license-plate-detection-barrier-0106 pre-trained model with Object Detection Python Demo and use Myriad as a target device.

Inkedsecurity seccess_LI.jpg

 

Sincerely,

Zulkifli 

 

0 Kudos
Zulkifli_Intel
Moderator
649 Views

Hello Rohit,


This thread will no longer be monitored since we have provided a solution. If you need any additional information from Intel, please submit a new question.


Sincerely,

Zulkifli


0 Kudos
Reply