From 67c098b0d61db47bccf3d5ca15d1b66e0920c5ad Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Wed, 10 Jul 2019 16:01:18 +0200 Subject: [PATCH] Added conversion to int for class_id Signed-off-by: Jim Martens --- src/twomartens/masterthesis/debug.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/twomartens/masterthesis/debug.py b/src/twomartens/masterthesis/debug.py index cf7d446..08faaca 100644 --- a/src/twomartens/masterthesis/debug.py +++ b/src/twomartens/masterthesis/debug.py @@ -71,7 +71,7 @@ def save_ssd_train_images(images: np.ndarray, labels: np.ndarray, for instance in instances: if len(instance) == 5: - class_id = instance[0] + class_id = int(instance[0]) xmin = instance[1] ymin = instance[2] xmax = instance[3] @@ -91,7 +91,6 @@ def save_ssd_train_images(images: np.ndarray, labels: np.ndarray, xmax *= image_size ymax *= image_size - print(class_id) color = colors[class_id] label = f"{classes_to_names[class_id]}" current_axis.add_patch(