From a0a976f9d70c021da236da59e0944924cee2b56a Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Tue, 9 Jul 2019 14:21:38 +0200 Subject: [PATCH] Fixed saving debug images Signed-off-by: Jim Martens --- src/twomartens/masterthesis/debug.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/twomartens/masterthesis/debug.py b/src/twomartens/masterthesis/debug.py index 8e254d4..b10395b 100644 --- a/src/twomartens/masterthesis/debug.py +++ b/src/twomartens/masterthesis/debug.py @@ -55,10 +55,10 @@ def save_ssd_train_images(images: np.ndarray, labels: np.ndarray, output_path: s current_axis = pyplot.gca() for instance in instances: - xmin = instance[-12] * image_size - ymin = instance[-11] * image_size - xmax = instance[-10] * image_size - ymax = instance[-9] * image_size + xmin = (instance[-12] + instance[-8]) * image_size + ymin = (instance[-11] + instance[-7]) * image_size + xmax = (instance[-10] + instance[-6]) * image_size + ymax = (instance[-9] + instance[-5]) * image_size class_id = np.argmax(instance[:-12], axis=0) color = colors[class_id] label = f"{classes_to_names[class_id]}"