diff --git a/csrc/mmdeploy/codebase/mmdet/yolo_head.cpp b/csrc/mmdeploy/codebase/mmdet/yolo_head.cpp index e9f0c8ce0f..82101df5cd 100644 --- a/csrc/mmdeploy/codebase/mmdet/yolo_head.cpp +++ b/csrc/mmdeploy/codebase/mmdet/yolo_head.cpp @@ -197,10 +197,6 @@ Result YOLOHead::GetBBoxes(const Value& prep_res, return objs; } -Result YOLOV3Head::operator()(const Value& prep_res, const Value& infer_res) { - return YOLOHead::operator()(prep_res, infer_res); -} - std::array YOLOV3Head::yolo_decode(float box_x, float box_y, float box_w, float box_h, float stride, const std::vector>& anchor, int j, @@ -212,11 +208,7 @@ std::array YOLOV3Head::yolo_decode(float box_x, float box_y, float box return std::array{box_x, box_y, box_w, box_h}; } -Result YOLOv5Head::operator()(const Value& prep_res, const Value& infer_res) { - return YOLOHead::operator()(prep_res, infer_res); -} - -std::array YOLOv5Head::yolo_decode(float box_x, float box_y, float box_w, float box_h, +std::array YOLOV5Head::yolo_decode(float box_x, float box_y, float box_w, float box_h, float stride, const std::vector>& anchor, int j, int i, int a) const { diff --git a/csrc/mmdeploy/codebase/mmdet/yolo_head.h b/csrc/mmdeploy/codebase/mmdet/yolo_head.h index 34ba4a27fc..918a359aab 100644 --- a/csrc/mmdeploy/codebase/mmdet/yolo_head.h +++ b/csrc/mmdeploy/codebase/mmdet/yolo_head.h @@ -33,7 +33,6 @@ class YOLOHead : public MMDetection { class YOLOV3Head : public YOLOHead { public: using YOLOHead::YOLOHead; - Result operator()(const Value& prep_res, const Value& infer_res); std::array yolo_decode(float box_x, float box_y, float box_w, float box_h, float stride, const std::vector>& anchor, int j, int i, int a) const override; @@ -42,7 +41,6 @@ class YOLOV3Head : public YOLOHead { class YOLOv5Head : public YOLOHead { public: using YOLOHead::YOLOHead; - Result operator()(const Value& prep_res, const Value& infer_res); std::array yolo_decode(float box_x, float box_y, float box_w, float box_h, float stride, const std::vector>& anchor, int j, int i, int a) const override; diff --git a/csrc/mmdeploy/experimental/module_adapter.h b/csrc/mmdeploy/experimental/module_adapter.h index e5e2985ec2..74dd9d9b86 100644 --- a/csrc/mmdeploy/experimental/module_adapter.h +++ b/csrc/mmdeploy/experimental/module_adapter.h @@ -63,12 +63,12 @@ Result Invoke(Ret (*f)(Args...), const Value& args) { } // member function pointer -template -Result Invoke(Ret (C::*f)(Args...) const, C* inst, const Value& args) { +template +Result Invoke(Ret (C0::*f)(Args...) const, C1* inst, const Value& args) { return InvokeImpl::apply(f, args, inst); } -template -Result Invoke(Ret (C::*f)(Args...), C* inst, const Value& args) { +template +Result Invoke(Ret (C0::*f)(Args...), C1* inst, const Value& args) { return InvokeImpl::apply(f, args, inst); }