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',