diff options
Diffstat (limited to 'src/backends/reference')
-rw-r--r-- | src/backends/reference/workloads/DetectionPostProcess.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/backends/reference/workloads/DetectionPostProcess.cpp b/src/backends/reference/workloads/DetectionPostProcess.cpp index f80f20a441..2108efe8f3 100644 --- a/src/backends/reference/workloads/DetectionPostProcess.cpp +++ b/src/backends/reference/workloads/DetectionPostProcess.cpp @@ -85,14 +85,14 @@ std::vector<unsigned int> NonMaxSuppression(unsigned int numBoxes, if (!visited[sortedIndices[i]]) { outputIndices.push_back(indicesAboveThreshold[sortedIndices[i]]); - } - for (unsigned int j = i + 1; j < numAboveThreshold; ++j) - { - unsigned int iIndex = indicesAboveThreshold[sortedIndices[i]] * 4; - unsigned int jIndex = indicesAboveThreshold[sortedIndices[j]] * 4; - if (IntersectionOverUnion(&boxCorners[iIndex], &boxCorners[jIndex]) > nmsIouThreshold) + for (unsigned int j = i + 1; j < numAboveThreshold; ++j) { - visited[sortedIndices[j]] = true; + unsigned int iIndex = indicesAboveThreshold[sortedIndices[i]] * 4; + unsigned int jIndex = indicesAboveThreshold[sortedIndices[j]] * 4; + if (IntersectionOverUnion(&boxCorners[iIndex], &boxCorners[jIndex]) > nmsIouThreshold) + { + visited[sortedIndices[j]] = true; + } } } } |