From aaaea5f942da83c7b0e6bb11db48c46873253c0b Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Sun, 8 Sep 2019 21:45:32 +0200 Subject: [PATCH] Added if clause to check for empty instance Signed-off-by: Jim Martens --- src/twomartens/masterthesis/debug.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/twomartens/masterthesis/debug.py b/src/twomartens/masterthesis/debug.py index 4291c82..a1d3a81 100644 --- a/src/twomartens/masterthesis/debug.py +++ b/src/twomartens/masterthesis/debug.py @@ -93,6 +93,8 @@ def save_ssd_train_images(images: Union[np.ndarray, Sequence[str]], labels: np.n ymin = instance[3] xmax = instance[4] ymax = instance[5] + elif not len(instance): + continue else: instance = np.copy(instance) class_id = np.argmax(instance[:-12], axis=0)