diff --git a/deploy/cpp/src/keypoint_postprocess.cc b/deploy/cpp/src/keypoint_postprocess.cc index 4cb53d8aa2b4b6ac0811b156529b7a39f0a917b1..eb692b0a78bcf48ac96aa45b671300b9ff2db400 100644 --- a/deploy/cpp/src/keypoint_postprocess.cc +++ b/deploy/cpp/src/keypoint_postprocess.cc @@ -300,8 +300,6 @@ float PoseSmooth::OneEuroFilter(float x_cur, float x_pre, int loc) { float fc = this->fc_min + this->beta * abs(dx_cur_hat); this->alpha = this->smoothing_factor(te, fc); float x_cur_hat = this->ExpSmoothing(x_cur, x_pre); - // printf("alpha:%f, x_cur:%f, x_pre:%f, x_cur_hat:%f\n", this->alpha, x_cur, - // x_pre, x_cur_hat); this->x_prev_hat.keypoints[loc] = x_cur_hat; this->dx_prev_hat.keypoints[loc] = dx_cur_hat; return x_cur_hat; diff --git a/deploy/python/det_keypoint_unite_infer.py b/deploy/python/det_keypoint_unite_infer.py index 62d3b82f4512488a10319ef7cc3d145b316d7524..f0b80752ea087cd438bd3f87b9ff267a5c0be4dc 100644 --- a/deploy/python/det_keypoint_unite_infer.py +++ b/deploy/python/det_keypoint_unite_infer.py @@ -165,7 +165,7 @@ def topdown_unite_predict_video(detector, frame2, results, topdown_keypoint_detector, keypoint_batch_size, FLAGS.run_benchmark) - if FLAGS.smooth: + if FLAGS.smooth and len(keypoint_res['keypoint'][0])==1: current_keypoints = np.array(keypoint_res['keypoint'][0][0]) smooth_keypoints = keypoint_smoothing.smooth_process( current_keypoints) @@ -231,9 +231,9 @@ class KeypointSmoothing(object): self.fc_min = fc_min self.beta = beta - if self.filter_type == 'one_euro': + if self.filter_type == 'OneEuro': self.smooth_func = self.one_euro_filter - elif self.filter_type == 'ema': + elif self.filter_type == 'EMA': self.smooth_func = self.exponential_smoothing else: raise ValueError('filter type must be one_euro or ema') diff --git a/deploy/python/det_keypoint_unite_utils.py b/deploy/python/det_keypoint_unite_utils.py index 129969df2db0e079e363a09c33861d1ff3cc6ca2..7de1295128d9151cf55a7b1e427d6ee946db8bc4 100644 --- a/deploy/python/det_keypoint_unite_utils.py +++ b/deploy/python/det_keypoint_unite_utils.py @@ -135,7 +135,7 @@ def argsparser(): parser.add_argument( '--filter_type', type=str, - default='one_euro', - help='when set --smooth True, choose filter type you want to use, it can be one_euro or ema.' + default='OneEuro', + help='when set --smooth True, choose filter type you want to use, it can be [OneEuro] or [EMA].' ) return parser