diff --git a/examples/tm_yolact.cpp b/examples/tm_yolact.cpp index d6e2263fe3b86d2bcfb502a5548a86cc2e844fa3..2f9bc008fc832ba99ac91ff631e730add75d1ab6 100644 --- a/examples/tm_yolact.cpp +++ b/examples/tm_yolact.cpp @@ -204,7 +204,7 @@ static void fast_nms(std::vector >& class_candidates, std::v for (int j = 1; j < n; j++) { std::vector::iterator max_value; - max_value = std::max_element(iou_matrix[j].begin(), iou_matrix[j].begin() + j - 1); + max_value = std::max_element(iou_matrix[j].begin(), iou_matrix[j].begin() + j); if (*max_value <= iou_thresh) { objects.push_back(candidate[j]); diff --git a/examples/tm_yolact_uint8.cpp b/examples/tm_yolact_uint8.cpp index 630d1dfd1b80a5883316a566a0b03c76ccd45067..691cf4549816d37cb6d4f2de1605c78dbb05499c 100644 --- a/examples/tm_yolact_uint8.cpp +++ b/examples/tm_yolact_uint8.cpp @@ -212,7 +212,7 @@ static void fast_nms(std::vector >& class_candidates, std::v for (int j = 1; j < n; j++) { std::vector::iterator max_value; - max_value = std::max_element(iou_matrix[j].begin(), iou_matrix[j].begin() + j - 1); + max_value = std::max_element(iou_matrix[j].begin(), iou_matrix[j].begin() + j); if (*max_value <= iou_thresh) { objects.push_back(candidate[j]);