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:
@@ -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};
|
||||
|
||||
Reference in New Issue
Block a user