opencv: Reshape Layer: Assertion failed dstTotal != 0 in function 'computeShapeByReshapeMask'
System information (version)
- OpenCV => 4.4.0
- Operating System / Platform => Arch 64 Bit
- Compiler => GCC 10.2.0
Detailed description
Loading the following ONNX model causes OpenCV to fail with:
cv2.error: OpenCV(4.4.0) /build/opencv/src/opencv-4.4.0/modules/dnn/src/layers/reshape_layer.cpp:149: error: (-215:Assertion failed) dstTotal != 0 in function 'computeShapeByReshapeMask'
Steps to reproduce
import cv2
net=cv2.dnn.readNetFromONNX('model.onnx')
The model is quite big. But I’ll upload it if required.
Thanks in advance for some hints!
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 17 (7 by maintainers)
Try using this script to set input shapes.
Thanks for your respone ! My ONNX model and code …
model.onnx.zip
Here you go: model.onnx.txt I adapted the input layers for a smaller model size.