From 5c3f5aee090812fdcdd52b0ab2e48bb0fa1bdc8f Mon Sep 17 00:00:00 2001 From: Xin Chen Date: Wed, 11 Jan 2023 11:09:02 +0800 Subject: [PATCH] update --- demo/csrc/c/image_segmentation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo/csrc/c/image_segmentation.cpp b/demo/csrc/c/image_segmentation.cpp index 4e5600bc57..5d13a56137 100644 --- a/demo/csrc/c/image_segmentation.cpp +++ b/demo/csrc/c/image_segmentation.cpp @@ -59,6 +59,7 @@ int main(int argc, char* argv[]) { cv::Mat color_mask = cv::Mat::zeros(result->height, result->width, CV_8UC3); int pos = 0; + std::vector idxs(result->classes); for (auto iter = color_mask.begin(); iter != color_mask.end(); ++iter) { // output mask if (result->mask) { @@ -66,7 +67,6 @@ int main(int argc, char* argv[]) { } // output score if (result->score) { - std::vector idxs(result->classes); std::iota(idxs.begin(), idxs.end(), 0); auto k = std::max_element( idxs.begin(), idxs.end(),