mirror of
https://github.com/open-mmlab/mmdeploy.git
synced 2025-01-14 08:09:43 +08:00
parent
ade8e02047
commit
fdbd3d1a52
@ -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}});
|
||||
}
|
||||
|
||||
|
@ -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}});
|
||||
}
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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}});
|
||||
}
|
||||
|
||||
|
@ -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}});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user