1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

Set zero confidences in case of no detections

This commit is contained in:
Dmitry Kurtaev
2017-10-30 10:17:57 +03:00
parent 7b0d2d189f
commit 03cefa7bfe
2 changed files with 32 additions and 0 deletions
@@ -240,6 +240,9 @@ public:
if (numKept == 0)
{
// Set confidences to zeros.
Range ranges[] = {Range::all(), Range::all(), Range::all(), Range(2, 3)};
outputs[0](ranges).setTo(0);
return;
}
int outputShape[] = {1, 1, (int)numKept, 7};