@@ -311,8 +311,8 @@ static const std::vector<std::vector<uint8_t>> SKELETON = {
311311 {8 , 10 }, {9 , 11 }, {2 , 3 }, {1 , 2 }, {1 , 3 }, {2 , 4 }, {3 , 5 }, {4 , 6 }, {5 , 7 }};
312312
313313void post_process (AX_ENGINE_IO_INFO_T* io_info, AX_ENGINE_IO_T* io_data, const cv::Mat& mat, int & input_w, int & input_h,
314- int & cls_num, float & prob_threshold , float & nms_threshold, std::vector<detection::Object>& objects ,
315- std::string& model_type)
314+ int & cls_num, int & point_num , float & prob_threshold, float & nms_threshold ,
315+ std::vector<detection::Object>& objects, std:: string& model_type)
316316{
317317 // std::vector<detection::Object> objects;
318318 std::vector<detection::Object> proposals;
@@ -352,7 +352,7 @@ void post_process(AX_ENGINE_IO_INFO_T* io_info, AX_ENGINE_IO_T* io_data, const c
352352 auto feat_kps_ptr = output_kps_ptr[i];
353353 int32_t stride = (1 << i) * 8 ;
354354 detection::generate_proposals_yolov8_pose_native (stride, feat_ptr, feat_kps_ptr, prob_threshold, proposals,
355- input_h, input_w, 17 , cls_num);
355+ input_h, input_w, point_num , cls_num);
356356 }
357357 detection::get_out_bbox_kps (proposals, objects, nms_threshold, input_h, input_w, mat.rows , mat.cols );
358358 // detection::draw_keypoints(mat, objects, KPS_COLORS, LIMB_COLORS, SKELETON, "yolo11_pose_out");
@@ -368,10 +368,12 @@ void post_process(AX_ENGINE_IO_INFO_T* io_info, AX_ENGINE_IO_T* io_data, const c
368368 }
369369}
370370
371- int EngineWrapper::Post_Process (cv::Mat& mat, int & input_w, int & input_h, int & cls_num, float & pron_threshold,
372- float & nms_threshold, std::vector<detection::Object>& objects, std::string& model_type)
371+ int EngineWrapper::Post_Process (cv::Mat& mat, int & input_w, int & input_h, int & cls_num, int & point_num,
372+ float & pron_threshold, float & nms_threshold, std::vector<detection::Object>& objects,
373+ std::string& model_type)
373374{
374- post_process (m_io_info, &m_io, mat, input_w, input_h, cls_num, pron_threshold, nms_threshold, objects, model_type);
375+ post_process (m_io_info, &m_io, mat, input_w, input_h, cls_num, point_num, pron_threshold, nms_threshold, objects,
376+ model_type);
375377 return 0 ;
376378}
377379
0 commit comments