From b1d51e39031a3be6f07da1e58c91a073cb2ac33d Mon Sep 17 00:00:00 2001 From: Yifan Lareina WU Date: Wed, 13 Sep 2023 14:18:03 +0800 Subject: [PATCH] fix lint --- mmpose/models/pose_estimators/topdown.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mmpose/models/pose_estimators/topdown.py b/mmpose/models/pose_estimators/topdown.py index a142217fa3..f5bb90273e 100644 --- a/mmpose/models/pose_estimators/topdown.py +++ b/mmpose/models/pose_estimators/topdown.py @@ -152,8 +152,8 @@ def add_pred_to_datasample(self, batch_pred_instances: InstanceList, input_size = data_sample.metainfo['input_size'] pred_instances.keypoints[..., :2] = \ - pred_instances.keypoints[..., :2] / input_size * bbox_scales \ - + bbox_centers - 0.5 * bbox_scales + pred_instances.keypoints[..., :2] / input_size * input_scale \ + + input_center - 0.5 * input_scale if 'keypoints_visible' not in pred_instances: pred_instances.keypoints_visible = \ pred_instances.keypoint_scores @@ -182,4 +182,5 @@ def add_pred_to_datasample(self, batch_pred_instances: InstanceList, pred_fields.set_field(value[output_keypoint_indices], key) data_sample.pred_fields = pred_fields + return batch_data_samples