Merge pull request #19529 from WeiChungChang:3.4

* improve map allocation check

* fix accoring to CR
pull/19613/head
WeiChungChang 4 years ago committed by GitHub
parent 34d5746553
commit d4d12164aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      modules/dnn/src/layers/detection_output_layer.cpp

@ -852,16 +852,16 @@ public:
for (int i = 0; i < num; ++i, locData += numPredsPerClass * numLocClasses * 4)
{
LabelBBox& labelBBox = locPreds[i];
int start = shareLocation ? -1 : 0;
for (int c = 0; c < numLocClasses; ++c) {
labelBBox[start++].resize(numPredsPerClass);
}
for (int p = 0; p < numPredsPerClass; ++p)
{
int startIdx = p * numLocClasses * 4;
for (int c = 0; c < numLocClasses; ++c)
{
int label = shareLocation ? -1 : c;
if (labelBBox.find(label) == labelBBox.end())
{
labelBBox[label].resize(numPredsPerClass);
}
util::NormalizedBBox& bbox = labelBBox[label][p];
if (locPredTransposed)
{

Loading…
Cancel
Save