From 15c83940fe68e3adca3546ba4316681672a9e5ab Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Tue, 2 Jul 2019 11:53:40 +0200 Subject: [PATCH] Added wordnet id to visualised bboxes Signed-off-by: Jim Martens --- src/twomartens/masterthesis/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/twomartens/masterthesis/cli.py b/src/twomartens/masterthesis/cli.py index e91e44c..b70ec51 100644 --- a/src/twomartens/masterthesis/cli.py +++ b/src/twomartens/masterthesis/cli.py @@ -390,7 +390,7 @@ def visualise(args: argparse.Namespace) -> None: xmax = bbox[2] ymax = bbox[3] color = colors[cats_to_classes[int(instance['coco_id'])]] - label = f"{cats_to_names[int(instance['coco_id'])]}: {instance['wordnet_class_name']}" + label = f"{cats_to_names[int(instance['coco_id'])]}: {instance['wordnet_class_name']}, {instance['wordnet_id']}" current_axis.add_patch( pyplot.Rectangle((xmin, ymin), xmax - xmin, ymax - ymin, color=color, fill=False, linewidth=2)) current_axis.text(xmin, ymin, label, size='x-large', color='white',