diff --git a/deploy/cpp/src/paddlex.cpp b/deploy/cpp/src/paddlex.cpp index d55a576aad93c88a62089a3dc8289a2403a2dd42..a3bf1dc3be42f2e4546b2799c24a68e7946a4eb8 100644 --- a/deploy/cpp/src/paddlex.cpp +++ b/deploy/cpp/src/paddlex.cpp @@ -350,7 +350,7 @@ bool Model::predict(const cv::Mat& im, DetResult* result) { auto end_mask = begin_mask + mask_pixels; for (auto iter = begin_mask; iter != end_mask; iter++) { int mask_int = floor((*iter) + 0.5); - box->mask.push_back(mask_int); + box->mask.data.push_back(mask_int); } box->mask.shape = {static_cast(box->coordinate[2]), static_cast(box->coordinate[3])}; @@ -527,7 +527,7 @@ bool Model::predict(const std::vector& im_batch, auto end_mask = begin_mask + mask_pixels; for (auto iter = begin_mask; iter != end_mask; iter++) { int mask_int = floor((*iter) + 0.5); - box->mask.push_back(mask_int); + box->mask.data.push_back(mask_int); } box->mask.shape = {static_cast(box->coordinate[2]), static_cast(box->coordinate[3])};