diff --git a/modules/dnn/src/model.cpp b/modules/dnn/src/model.cpp index acee29e680..aefeaa42b3 100644 --- a/modules/dnn/src/model.cpp +++ b/modules/dnn/src/model.cpp @@ -100,7 +100,7 @@ public: // Faster-RCNN or R-FCN if (net.getLayer(0)->outputNameToIndex("im_info") != -1) { - Mat imInfo(Matx31f(size.height, size.width, 1.6f)); + Mat imInfo(Matx13f(size.height, size.width, 1.6f)); net.setInput(imInfo, "im_info"); } net.forward(outs, outNames); diff --git a/modules/dnn/test/test_model.cpp b/modules/dnn/test/test_model.cpp index ddec6e79e4..5766684c41 100644 --- a/modules/dnn/test/test_model.cpp +++ b/modules/dnn/test/test_model.cpp @@ -206,6 +206,8 @@ TEST_P(Test_Model, DetectionOutput) { if (backend == DNN_BACKEND_OPENCV) scoreDiff = 4e-3; + else + scoreDiff = 2e-2; iouDiff = 1.8e-1; }