From d7ef9513a7a40fd172a174c1e92e0e2d4c6ead07 Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Sun, 28 Apr 2019 18:19:28 +0200 Subject: [PATCH] Fixed comparison of coordinates Signed-off-by: Jim Martens --- src/twomartens/masterthesis/data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/twomartens/masterthesis/data.py b/src/twomartens/masterthesis/data.py index afdae70..13507f8 100644 --- a/src/twomartens/masterthesis/data.py +++ b/src/twomartens/masterthesis/data.py @@ -395,7 +395,7 @@ def prepare_scenenet_val(data_path: str, protobuf_path: str) -> Tuple[List[List[ instance_local[instance_local != instance_id] = 0 instance_local[instance_local == instance_id] = 1 coordinates = ndimage.find_objects(instance_local) - if not coordinates: # the current instance was not in this frame + if coordinates is None: # the current instance was not in this frame continue else: coordinates = coordinates[0] # extract the coords of the one object