diff --git a/csrc/apis/c/classifier.cpp b/csrc/apis/c/classifier.cpp index ecdfaafc8..10b8708df 100644 --- a/csrc/apis/c/classifier.cpp +++ b/csrc/apis/c/classifier.cpp @@ -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}}); } diff --git a/csrc/apis/c/detector.cpp b/csrc/apis/c/detector.cpp index 4dbb573f9..375c6e07a 100644 --- a/csrc/apis/c/detector.cpp +++ b/csrc/apis/c/detector.cpp @@ -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}}); } diff --git a/csrc/apis/c/pose_detector.cpp b/csrc/apis/c/pose_detector.cpp index 6c5ef426e..acc148ee1 100644 --- a/csrc/apis/c/pose_detector.cpp +++ b/csrc/apis/c/pose_detector.cpp @@ -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) { diff --git a/csrc/apis/c/segmentor.cpp b/csrc/apis/c/segmentor.cpp index bcdca722a..1f6ba9750 100644 --- a/csrc/apis/c/segmentor.cpp +++ b/csrc/apis/c/segmentor.cpp @@ -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}}); } diff --git a/csrc/apis/c/text_recognizer.cpp b/csrc/apis/c/text_recognizer.cpp index 975a34b2e..441a7c942 100644 --- a/csrc/apis/c/text_recognizer.cpp +++ b/csrc/apis/c/text_recognizer.cpp @@ -142,8 +142,8 @@ int mmdeploy_text_recognizer_apply_bbox(mm_handle_t handle, const mm_mat_t *imag } result_index[i] = static_cast(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}}); }