Assertion failed at dnn allocateLayers
Hello,
On trying to run detection network from prototxt and caffemodel in opencv, I am running into Assertion failed issue. The net is created as expected and the input blob is of the right dimension but on trying to access the output of the net, I run into the issue given below;
The code is
String modelConfiguration = "D:/test_SSH.prototxt";
String modelBinary = "D:/SSH.caffemodel";
dnn::Net net = readNetFromCaffe(modelConfiguration, modelBinary);
Mat imgOrig = imread("path/to/img");
resize(imgOrig, imgOrig, Size(224, 224));
Mat inBlob = blobFromImage(imgOrig, 1, Size(224, 224), Scalar::all(0), false, false);
net.setInput(inBlob, "data");
Mat out = net.forward();
Any help or suggestion to solve this issue is greatly appreciated. Thanks!
can you please replace the screenshot of your error with a TEXT version (so ppl can quote you correctly) ?
@KlaimNod, @berak, it looks like a duplicate of http://answers.opencv.org/question/18... . A bug is confirmed.
@dkurt It is! Thanks!
@KlaimNod, please check out an answer at http://answers.opencv.org/question/18...