openvino: Python crashes when loading net from ModelOptimizer

I tried to optimize the openpose COCO .caffemodel with mo.py, passing model and proto When I try to load it with readNet, python crashes. A message is printed, but from googling it it seems unrelated: [E:] [BSL] found 0 ioexpander device

the original file can be read perfectly fine.

OpenCV: 4.3.0-openvino-2020.3.0 Python: 3.7.2 (default, Feb 21 2019, 17:35:59) [MSC v.1915 64 bit (AMD64)] CPU: i7-7600U Win10 1909

update: this doesn’t seem to be a model-specific error since I just downloaded human-pose-estimation-0001 with openVINO provided model downloader and got the same error.

update2: for the human-pose-estimation-0001 it seems to be a different issue. I tried to make an overview:

net = cv2.dnn.readNet("../models/pose_coco.caffemodel", "../models/pose_coco.prototxt")  # works
net = cv2.dnn.readNet("../models/pose_coco.bin", "../models/pose_coco.xml")              # fails
base = "../models/intel/human-pose-estimation-0001/FP16-INT8/human-pose-estimation-0001."
net = cv2.dnn.readNetFromModelOptimizer(base + "bin", base + "xml")                      # fails
net = cv2.dnn.readNet(base + "bin", base + "xml")                                        # works

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 20 (9 by maintainers)

Most upvoted comments

Hi @Laubeee

I was able to replicate using the /pose/coco model from the repository you linked. Reading the model using the OpenVINO Inference Engine I was able to get additional information. I believe the issue is that the data shape is not being defined correctly by the model optimizer. I will reach out to some peers to see if this can be solved and if this model is supported.

from openvino.inference_engine import IENetwork, IECore
ie = IECore()
net = ie.read_network(model = 'pose_iter_440000.xml', weights ='pose_iter_440000.bin')
Traceback (most recent call last):
  File "IE_Read_Model.py", line 4, in <module>
    net = ie.read_network(model = 'pose_iter_440000.xml', weights ='pose_iter_440000.bin')
  File "ie_api.pyx", line 261, in openvino.inference_engine.ie_api.IECore.read_network
  File "ie_api.pyx", line 293, in openvino.inference_engine.ie_api.IECore.read_network
RuntimeError: Check 'window_dilated_dim <= data_padded_dilated_dim' failed at C:\j\workspace\private-ci\ie\build-windows-icc2018\b\repos\openvino\ngraph\src\ngraph\validation_util.cpp:212:
While validating node 'v1::MaxPool MaxPool_11(Relu_10[0]:f32{1,64,1,1}) -> (dynamic?)':
Window after dilation has dimension (dim: 2) larger than the data shape after padding (dim: 1) at axis 0.

Regards, Jesus