|
|
@@ -532,14 +532,14 @@ bool Model::predict(const std::vector<cv::Mat>& im_batch,
|
|
|
for (int i = 0; i < lod_vector[0].size() - 1; ++i) {
|
|
|
(*results)[i].mask_resolution = output_mask_shape[2];
|
|
|
for (int j = 0; j < (*results)[i].boxes.size(); ++j) {
|
|
|
- Box* box = &(*results)[i]->boxes[i];
|
|
|
+ Box* box = &(*results)[i].boxes[i];
|
|
|
int category_id = box->category_id;
|
|
|
box->mask.shape = {static_cast<int>(box->coordinate[2]),
|
|
|
static_cast<int>(box->coordinate[3])};
|
|
|
auto begin_mask =
|
|
|
output_mask.data() + (i * classes + box->category_id) * mask_pixels;
|
|
|
- cv::Mat bin_mask(result->mask_resolution,
|
|
|
- result->mask_resolution,
|
|
|
+ cv::Mat bin_mask(output_mask_shape[2],
|
|
|
+ output_mask_shape[2],
|
|
|
CV_32FC1,
|
|
|
begin_mask);
|
|
|
cv::resize(bin_mask,
|