Ask Your Question

Strange error in getMemoryShapes function

asked 2019-02-24 16:27:22 -0500

r3krut gravatar image

updated 2019-02-25 01:46:59 -0500

berak gravatar image

Hello everyone! Currently, I'm try to solve the object detection task. The model in used is MobileNetV1 + SSD from, The code was written in PyTorch framework. In order to use this model in OpenvCV library I converted it to ONNX representation by the standard torch.onnx module. But when I'm try to read this .onnx file I get the next error: cv2.error: OpenCV(4.0.1-dev) /home/user/opencv/modules/dnn/src/layers/slice_layer.cpp:129: error: (-215:Assertion failed) inputs.size() == 1 in function 'getMemoryShapes'

I'd like to note that when I'm cnonvert only MobileNetV1 in ONNX representation and read it through the dnn.readNetFromONNX(net) I don't get the above error. All works well.

What am I doing wrong?

edit retag flag offensive close merge delete



Could you please add a model file?

dkurt gravatar imagedkurt ( 2019-02-25 01:13:43 -0500 )edit

@dkurt yes, of course. Here the graph of the model(MobileNetV1 + SSD) and his .onnx file.

r3krut gravatar imager3krut ( 2019-02-25 04:22:46 -0500 )edit

Model input is batch with size (1, 3, 300, 300)

r3krut gravatar imager3krut ( 2019-02-25 04:26:10 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2019-04-15 04:06:36 -0500

zheng lilei gravatar image

Same error observed.

edit flag offensive delete link more

Comments Link to the model, which is quite similar to r3krut's

zheng lilei gravatar imagezheng lilei ( 2019-04-15 22:15:02 -0500 )edit
Login/Signup to Answer

Question Tools



Asked: 2019-02-24 16:15:30 -0500

Seen: 51 times

Last updated: Feb 25