So I'm getting this error when reading an ONNX model with readNetFromONNX:
OpenCV(4.1.0) Error: Assertion failed (inputs.size()) in cv::dnn::dnn4_v20190122::Layer::getMemoryShapes, file c:\build\master_winpack-build-win64-vc15\opencv\modules\dnn\src\dnn.cpp, line 3616
1 model loads successfully, but this particular one also gives issues in other ways, like with converting the ONNX model to Tensorflow I get this:
ValueError: Tensor conversion requested dtype float32 for Tensor with dtype int64: 'Tensor("Mul_3:0", shape=(), dtype=int64)'
But I'm not sure if this has anything to do with it, also have no idea if the error is due to how I setup the model inside PyTorch or if it's in OpenCV (but the model loads and does inference fine in PyTorch itself)
Here is the standalone project: https://github.com/Aeroxander/decodererror
Just unzip the lib+include.zip file in the same folder and the opencv_world410.7z in /x64/Debug, then it should work out of the box!