Intel® Edge Software Hub
Get answers from community peers to your questions about building Edge Software Hub solutions for edge compute node.
Announcements
Welcome to the Intel Community! If you like the answer to your question, please mark it as 'Accepted Solution' to help others.

The Edge Software Vision Package for Red Hat Enterprise Linux is now available here.

Learn more about developing on Intel® Hardware and Software here.
397 Discussions

Error: get_shape was called on a descriptor::Tensor with dynamic shape

mvasquez
New Contributor I
3,545 Views

Hi, I'm using the OpenVINO model road.segmentation and I'm getting this error when load the network:

 

Unexpected error while loading UDF road-segmentation-adas-0001.road-segmentation-adas-0001: get_shape was called on a descriptor::Tensor with dynamic shape
Traceback (most recent call last):
File "udf.pyx", line 376, in udf.load_udf
File "/app/road-segmentation-adas-0001/road-segmentation-adas-0001.py", line 72, in __init__
self.exec_net = self.ie.load_network(
File "ie_api.pyx", line 372, in openvino.inference_engine.ie_api.IECore.load_network
File "ie_api.pyx", line 390, in openvino.inference_engine.ie_api.IECore.load_network
RuntimeError: get_shape was called on a descriptor::Tensor with dynamic shape

 

 The source code for load the network is something like this:

 

self.ie = IECore()
self.neural_net = self.ie.read_network(
    model=self.model_xml, weights=self.model_bin)
self.exec_net = self.ie.load_network(
     network=self.neural_net, device_name=self.device.upper())

 

Could you please provide a tip on how to avoid this error, since we are getting the same error for the OpenVINO model semantic-segmentation, but it's working fine for model pederastian-vehicle-detector.

 

Regards,

Miguel 

0 Kudos
1 Solution
Vladimir_Dudnik
Employee
3,462 Views

@mvasquez I just try on Windows (can't get to Linux system right now) Open Model Zoo Python segmentation_demo with road-segmentation-adas-0001 model with OpenVINO 2021.4.2 release and device HETERO:GPU,CPU and seems it works.

 

command line used:

python segmentation_demo.py ^
-d HETERO:GPU,CPU ^
-i street.jpg ^
-m road-segmentation-adas-0001.xml ^
-at segmentation ^
--loop

segmentation_demo.jpg

View solution in original post

0 Kudos
9 Replies
Vladimir_Dudnik
Employee
3,531 Views

@mvasquez  your links to model description points to 2019R1 release.  Is that release you are using? Please make sure you use model IR with corresponding OpenVINO runtime, so if your IR from 2019R1 release then you need run inference using OpenVINO 2019R1.

But I'd highly recommend you to use the latest, OpenVINO 2021.4.2 release (and so, you'll have to download model IRs, corresponding to this release)

 

Regards,
  Vladimir

0 Kudos
mvasquez
New Contributor I
3,514 Views

Hi Vladimir,

Despite the included links, I checked again and we are downloading the last possible version for each model from here:
https://download.01.org/opencv/2021/openvinotoolkit/2021.2/open_model_zoo/models_bin/3/

The OpenVINO version is the included in the Docker image ia_openvino_base of Edge Insights for Industrial 2.6.2 (openvino_2021.4.689)

Some people had the same issue, but I could not implement the proposed solution because some APIs have been deprecated.

https://blog.birost.com/a?ID=01800-75504a7d-bb91-49d2-adfc-915c4d2638bc

 

Regards,

Miguel

0 Kudos
Vladimir_Dudnik
Employee
3,492 Views

@mvasquez  right, and that is the problem I meant. You take model IR from OpenVINO 2021.2 release and run inference with 2021.4.1 runtime. You should download models by using Open Model Zoo model downloader from OpenVINO 2021.4.1 environment or alternatively (you have to know what and where you should look for), you may use direct link from model configuration file (find model.yml under OMZ/models/intel folder for models of your interest either within your OpenVINO install folder or clone OMZ repo from github and checkout by tag 2021.4.1), for example,  semantic-segmentation-adas-0001.xml and semantic-segmentation-adas-0001.bin 

 

Regards,
  Vladimir

0 Kudos
mvasquez
New Contributor I
3,468 Views

Hi Vladimir, we tried again with OpenVINO 2021.4 and models 2021.4 from the recommended repository and they don't work neither.

mvasquez_0-1642450890182.png

Do we have some alternative or we should assume the HETERO:CPU,GPU is not supported for this models?

 

Regards,

Miguel

0 Kudos
Vladimir_Dudnik
Employee
3,463 Views

@mvasquez I just try on Windows (can't get to Linux system right now) Open Model Zoo Python segmentation_demo with road-segmentation-adas-0001 model with OpenVINO 2021.4.2 release and device HETERO:GPU,CPU and seems it works.

 

command line used:

python segmentation_demo.py ^
-d HETERO:GPU,CPU ^
-i street.jpg ^
-m road-segmentation-adas-0001.xml ^
-at segmentation ^
--loop

segmentation_demo.jpg

0 Kudos
mvasquez
New Contributor I
3,453 Views

Hi Vladimir, we'll check what we are missing in EII 2.6+.

Thanks for your time!

0 Kudos
Hairul_Intel
Moderator
3,420 Views

Hi Miguel,

I've validated that running the segmentation_demo with road-segmentation-adas-0001 model using -d HETERO:GPU,CPU command on Ubuntu 18.04 and OpenVINO 2021.4 was successful.

 

result_image.JPG

terminal.JPG

 

Does your system have an embedded or discrete Intel® GPU? If so, have you installed the Intel® Graphics Compute Runtime for OpenCL™ driver components as described here?

 

On another note, we'll be moving this issue to the Intel® Edge Software Hub forum for better support as you're running OpenVINO on Edge Insights for Industrial 2.6.2.

 

 

Regards,

Hairul

 

0 Kudos
JesusE_Intel
Moderator
3,387 Views

Hi mvasquez,


I was also not able to reproduce the issue using OpenVINO 2021.4.1 release which is the same version included in the Edge Insights for Industrial 2.6.2 package. Would you mind sharing your udf for me to reproduce?


Regards,

Jesus


0 Kudos
JesusE_Intel
Moderator
3,311 Views

If you need any additional information, please submit a new question as this thread will no longer be monitored.


0 Kudos
Reply