Nasty errors with blobFromImage

[ERROR:0] global \dnn\src\dnn.cpp (3512) getLayerShapesRecursively OPENCV/DNN: [Reshape]:(/model.10/m/m.0/attn/Reshape_output_0): getMemoryShapes() throws exception. inputs=1 outputs=1/1 blobs=0

[ERROR:0] global \dnn\src\dnn.cpp (3515) getLayerShapesRecursively input[0] = [ 1 512 7 7 ]

[ERROR:0] global \dnn\src\dnn.cpp (3519) getLayerShapesRecursively output[0] = [ ]

[ERROR:0] global \dnn\src\dnn.cpp (3525) getLayerShapesRecursively Exception message: OpenCV(4.5.2-dev) \dnn\src\layers\reshape_layer.cpp:106: error: (-215:Assertion failed) total(srcShape, srcRange.start, srcRange.end) == maskTotal in function 'computeShapeByReshapeMask'

In readNet(“best.onnx”) ← only the path to model is passed, no config or other params, the model has been converted from .pt to onnx, has been trained for 640x640, no dynamic, version set to 10(the latest working one with OpenCV i have).

Input image size 640x640, 3 channels, type 16, RGB

Blob size -1x-1, 1 channel, type 5

After setting the input, the crash occurs when calling model.forward()

I tried every suggestion i was able to find, but nothing works. That’s the best i got and i have no clue why this doesn’t work.

That’s a little dated. please try again with the latest release. if you encountered a bug, and it was already fixed, it’d be pointless to hunt for it again in this old version.

i have no time for this, onnx was build for that version, it’s an older one, i am not wasting my time, years ago i used some custom coffemodel and it did work