From 9287258124f63a5fdae58e7227de2e379ba31e83 Mon Sep 17 00:00:00 2001 From: JYChen Date: Thu, 17 Feb 2022 14:41:10 +0800 Subject: [PATCH] fix the order of calculation of center coordinary in ToHeatmapsTopDown (#5222) --- ppdet/data/transform/keypoint_operators.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ppdet/data/transform/keypoint_operators.py b/ppdet/data/transform/keypoint_operators.py index c98833c93..4715feca8 100644 --- a/ppdet/data/transform/keypoint_operators.py +++ b/ppdet/data/transform/keypoint_operators.py @@ -698,8 +698,8 @@ class ToHeatmapsTopDown(object): tmp_size = self.sigma * 3 feat_stride = image_size / self.hmsize for joint_id in range(num_joints): - mu_x = int(joints[joint_id][0] + 0.5) / feat_stride[0] - mu_y = int(joints[joint_id][1] + 0.5) / feat_stride[1] + mu_x = int(joints[joint_id][0] / feat_stride[0] + 0.5) + mu_y = int(joints[joint_id][1] / feat_stride[1] + 0.5) # Check that any part of the gaussian is in-bounds ul = [int(mu_x - tmp_size), int(mu_y - tmp_size)] br = [int(mu_x + tmp_size + 1), int(mu_y + tmp_size + 1)] -- GitLab