Merge pull request #3648 from asmorkalov:al/dnn-type-inference

Added dnn type inference support
pull/3694/head
Alexander Smorkalov 1 year ago committed by GitHub
commit d4a1aeaff4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      modules/text/src/ocr_holistic.cpp

@ -75,7 +75,7 @@ protected:
inputShape.push_back(getPerceptiveField().height);
inputShape.push_back(getPerceptiveField().width);
vector<dnn::MatShape> inShapes, outShapes;
net.getLayerShapes(inputShape, id, inShapes, outShapes);
net.getLayerShapes(inputShape, CV_32F, id, inShapes, outShapes);
CV_Assert(outShapes.size() == 1 && outShapes[0].size() == 4);
CV_Assert(outShapes[0][0] == 1 && outShapes[0][2] == 1 && outShapes[0][3] == 1);
return outShapes[0][1];

Loading…
Cancel
Save