From 4cff569cbf3a2120e97ea69a5a0902fe6c4fb78a Mon Sep 17 00:00:00 2001 From: JYChen Date: Thu, 17 Feb 2022 14:41:25 +0800 Subject: [PATCH] fix the order of calculation of center coordinary in ToHeatmapsTopDown (#5223) --- 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 81770b63e..c4182377f 100644 --- a/ppdet/data/transform/keypoint_operators.py +++ b/ppdet/data/transform/keypoint_operators.py @@ -694,8 +694,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