提交 07f5f782 编写于 作者: Z zhiboniu 提交者: zhiboniu

update review

上级 47897299
......@@ -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;
......
......@@ -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')
......
......@@ -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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册