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

@ -87,7 +87,7 @@ 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"}};
DataType(mats[i].type), mats[i].data, Device{"cpu"}};
input.front().push_back({{"ori_img", _mat}});
}

View File

@ -86,7 +86,7 @@ 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"}};
DataType(mats[i].type), mats[i].data, Device{"cpu"}};
input.front().push_back({{"ori_img", _mat}});
}

View File

@ -105,7 +105,7 @@ int mmdeploy_pose_detector_apply_bbox(mm_handle_t handle, const mm_mat_t* mats,
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"}};
DataType(mats[i].type), mats[i].data, Device{"cpu"}};
Value img_with_boxes;
if (bboxes && bbox_count) {

View File

@ -85,7 +85,7 @@ 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"}};
DataType(mats[i].type), mats[i].data, Device{"cpu"}};
input.front().push_back({{"ori_img", _mat}});
}

View File

@ -143,7 +143,7 @@ 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"}};
DataType(images[i].type), images[i].data, Device{"cpu"}};
input_images.push_back({{"ori_img", _mat}});
}