From 7d7162bafd0793881aba4e0e770ee8520a041aa6 Mon Sep 17 00:00:00 2001 From: lupeng Date: Fri, 18 Aug 2023 13:58:38 +0800 Subject: [PATCH] fix a bug when visualize keypoint indices --- 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',