From c0bbc40533ed3f9f85a58fb78813fa8dfac512c8 Mon Sep 17 00:00:00 2001 From: zhaozhenlong Date: Wed, 28 Oct 2020 09:52:13 +0800 Subject: [PATCH] fix nms calculate iou issue --- .../lite/src/runtime/kernel/arm/fp32/non_max_suppression.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mindspore/lite/src/runtime/kernel/arm/fp32/non_max_suppression.cc b/mindspore/lite/src/runtime/kernel/arm/fp32/non_max_suppression.cc index 5e04ba5318..5b86beffd9 100644 --- a/mindspore/lite/src/runtime/kernel/arm/fp32/non_max_suppression.cc +++ b/mindspore/lite/src/runtime/kernel/arm/fp32/non_max_suppression.cc @@ -183,7 +183,7 @@ int NonMaxSuppressionCPUKernel::Run() { float intersec_x1 = std::max(cand.x1_, box.x1_); float intersec_x2 = std::min(cand.x2_, box.x2_); float intersec_y1 = std::max(cand.y1_, box.y1_); - float intersec_y2 = std::max(cand.y2_, box.y2_); + float intersec_y2 = std::min(cand.y2_, box.y2_); const float intersec_area = std::max(intersec_x2 - intersec_x1, 0.0f) * std::max(intersec_y2 - intersec_y1, 0.0f); if (intersec_area <= 0.0f) {