From 14e0d67a8a7626f833660bbc9bd2aedb424cb483 Mon Sep 17 00:00:00 2001 From: Peng Lu Date: Fri, 18 Aug 2023 14:59:36 +0800 Subject: [PATCH] [Fix] fix a bug when visualize keypoint indices (#2631) --- mmpose/visualization/local_visualizer.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mmpose/visualization/local_visualizer.py b/mmpose/visualization/local_visualizer.py index 4eea0925c5..4e7bb92348 100644 --- a/mmpose/visualization/local_visualizer.py +++ b/mmpose/visualization/local_visualizer.py @@ -345,11 +345,10 @@ def _draw_instances_kpts(self, alpha=transparency, line_widths=self.radius) if show_kpt_idx: - kpt[0] += self.radius - kpt[1] -= self.radius + kpt_idx_coords = kpt + [self.radius, -self.radius] self.draw_texts( str(kid), - kpt, + kpt_idx_coords, colors=color, font_sizes=self.radius * 3, vertical_alignments='bottom',