fix wrong input mat type (#362)

* fix wrong input mat type

* fix lint
This commit is contained in:
Chen Xin 2022-04-15 12:30:55 +08:00 committed by GitHub
parent ade8e02047
commit fdbd3d1a52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 10 deletions

View File

@ -86,8 +86,8 @@ int mmdeploy_classifier_apply(mm_handle_t handle, const mm_mat_t* mats, int mat_
Value input{Value::kArray};
for (int i = 0; i < mat_count; ++i) {
mmdeploy::Mat _mat{mats[i].height, mats[i].width, PixelFormat(mats[i].format),
DataType(mats->type), mats[i].data, Device{"cpu"}};
mmdeploy::Mat _mat{mats[i].height, mats[i].width, PixelFormat(mats[i].format),
DataType(mats[i].type), mats[i].data, Device{"cpu"}};
input.front().push_back({{"ori_img", _mat}});
}

View File

@ -85,8 +85,8 @@ int mmdeploy_detector_apply(mm_handle_t handle, const mm_mat_t* mats, int mat_co
Value input{Value::kArray};
for (int i = 0; i < mat_count; ++i) {
mmdeploy::Mat _mat{mats[i].height, mats[i].width, PixelFormat(mats[i].format),
DataType(mats->type), mats[i].data, Device{"cpu"}};
mmdeploy::Mat _mat{mats[i].height, mats[i].width, PixelFormat(mats[i].format),
DataType(mats[i].type), mats[i].data, Device{"cpu"}};
input.front().push_back({{"ori_img", _mat}});
}

View File

@ -104,8 +104,8 @@ int mmdeploy_pose_detector_apply_bbox(mm_handle_t handle, const mm_mat_t* mats,
Value input{Value::kArray};
auto result_count = 0;
for (int i = 0; i < mat_count; ++i) {
mmdeploy::Mat _mat{mats[i].height, mats[i].width, PixelFormat(mats[i].format),
DataType(mats->type), mats[i].data, Device{"cpu"}};
mmdeploy::Mat _mat{mats[i].height, mats[i].width, PixelFormat(mats[i].format),
DataType(mats[i].type), mats[i].data, Device{"cpu"}};
Value img_with_boxes;
if (bboxes && bbox_count) {

View File

@ -84,8 +84,8 @@ int mmdeploy_segmentor_apply(mm_handle_t handle, const mm_mat_t* mats, int mat_c
Value input{Value::kArray};
for (int i = 0; i < mat_count; ++i) {
mmdeploy::Mat _mat{mats[i].height, mats[i].width, PixelFormat(mats[i].format),
DataType(mats->type), mats[i].data, Device{"cpu"}};
mmdeploy::Mat _mat{mats[i].height, mats[i].width, PixelFormat(mats[i].format),
DataType(mats[i].type), mats[i].data, Device{"cpu"}};
input.front().push_back({{"ori_img", _mat}});
}

View File

@ -142,8 +142,8 @@ int mmdeploy_text_recognizer_apply_bbox(mm_handle_t handle, const mm_mat_t *imag
}
result_index[i] = static_cast<int>(input_images.size());
mmdeploy::Mat _mat{images[i].height, images[i].width, PixelFormat(images[i].format),
DataType(images->type), images[i].data, Device{"cpu"}};
mmdeploy::Mat _mat{images[i].height, images[i].width, PixelFormat(images[i].format),
DataType(images[i].type), images[i].data, Device{"cpu"}};
input_images.push_back({{"ori_img", _mat}});
}