未验证 提交 4cff569c 编写于 作者: J JYChen 提交者: GitHub

fix the order of calculation of center coordinary in ToHeatmapsTopDown (#5223)

上级 99a65a8d
...@@ -694,8 +694,8 @@ class ToHeatmapsTopDown(object): ...@@ -694,8 +694,8 @@ class ToHeatmapsTopDown(object):
tmp_size = self.sigma * 3 tmp_size = self.sigma * 3
feat_stride = image_size / self.hmsize feat_stride = image_size / self.hmsize
for joint_id in range(num_joints): for joint_id in range(num_joints):
mu_x = int(joints[joint_id][0] + 0.5) / feat_stride[0] mu_x = int(joints[joint_id][0] / feat_stride[0] + 0.5)
mu_y = int(joints[joint_id][1] + 0.5) / feat_stride[1] mu_y = int(joints[joint_id][1] / feat_stride[1] + 0.5)
# Check that any part of the gaussian is in-bounds # Check that any part of the gaussian is in-bounds
ul = [int(mu_x - tmp_size), int(mu_y - tmp_size)] ul = [int(mu_x - tmp_size), int(mu_y - tmp_size)]
br = [int(mu_x + tmp_size + 1), int(mu_y + tmp_size + 1)] br = [int(mu_x + tmp_size + 1), int(mu_y + tmp_size + 1)]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册