Skip to content

Commit 07f5f78

Browse files
committed
update review
1 parent 4789729 commit 07f5f78

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

deploy/cpp/src/keypoint_postprocess.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,6 @@ float PoseSmooth::OneEuroFilter(float x_cur, float x_pre, int loc) {
300300
float fc = this->fc_min + this->beta * abs(dx_cur_hat);
301301
this->alpha = this->smoothing_factor(te, fc);
302302
float x_cur_hat = this->ExpSmoothing(x_cur, x_pre);
303-
// printf("alpha:%f, x_cur:%f, x_pre:%f, x_cur_hat:%f\n", this->alpha, x_cur,
304-
// x_pre, x_cur_hat);
305303
this->x_prev_hat.keypoints[loc] = x_cur_hat;
306304
this->dx_prev_hat.keypoints[loc] = dx_cur_hat;
307305
return x_cur_hat;

deploy/python/det_keypoint_unite_infer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def topdown_unite_predict_video(detector,
165165
frame2, results, topdown_keypoint_detector, keypoint_batch_size,
166166
FLAGS.run_benchmark)
167167

168-
if FLAGS.smooth:
168+
if FLAGS.smooth and len(keypoint_res['keypoint'][0])==1:
169169
current_keypoints = np.array(keypoint_res['keypoint'][0][0])
170170
smooth_keypoints = keypoint_smoothing.smooth_process(
171171
current_keypoints)
@@ -231,9 +231,9 @@ def __init__(self,
231231
self.fc_min = fc_min
232232
self.beta = beta
233233

234-
if self.filter_type == 'one_euro':
234+
if self.filter_type == 'OneEuro':
235235
self.smooth_func = self.one_euro_filter
236-
elif self.filter_type == 'ema':
236+
elif self.filter_type == 'EMA':
237237
self.smooth_func = self.exponential_smoothing
238238
else:
239239
raise ValueError('filter type must be one_euro or ema')

deploy/python/det_keypoint_unite_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def argsparser():
135135
parser.add_argument(
136136
'--filter_type',
137137
type=str,
138-
default='one_euro',
139-
help='when set --smooth True, choose filter type you want to use, it can be one_euro or ema.'
138+
default='OneEuro',
139+
help='when set --smooth True, choose filter type you want to use, it can be [OneEuro] or [EMA].'
140140
)
141141
return parser

0 commit comments

Comments
 (0)