machine_learning: skip object decoding if boxScore is less than threshold 48/285248/1
authorTae-Young Chung <ty83.chung@samsung.com>
Thu, 8 Dec 2022 05:57:44 +0000 (14:57 +0900)
committerTae-Young Chung <ty83.chung@samsung.com>
Thu, 8 Dec 2022 05:57:59 +0000 (14:57 +0900)
[Issue type] bug fix

Change-Id: Ia5e8933979eada06d8617c4bd37e185be99e594e
Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
mv_machine_learning/inference/src/ObjectDecoder.cpp

index 08c2a3b..fd7fb7b 100644 (file)
@@ -220,6 +220,9 @@ void ObjectDecoder::decodeYOLO(BoxesList &boxesList)
                                float boxScore =
                                                decodeYOLOScore(anchorIdx * mBoxOffset + (mNumberOfOjects + 5) * offset + 4, strideIdx);
 
+                               if (boxScore < mMeta.GetScoreThreshold())
+                                       continue;
+
                                auto anchorBox = decodeInfo.vAnchorBoxes[strideIdx][anchorIdx * yoloAnchor.offsetAnchors + offset];
 
                                for (int objIdx = 0; objIdx < mNumberOfOjects; ++objIdx) { //each box to every object