diff --git a/src/twomartens/masterthesis/data.py b/src/twomartens/masterthesis/data.py index 609fb3c..03937ec 100644 --- a/src/twomartens/masterthesis/data.py +++ b/src/twomartens/masterthesis/data.py @@ -413,11 +413,9 @@ 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 coordinates is None: # the current instance was not in this frame + if coordinates is None or not coordinates: # the current instance was not in this frame continue else: - print(instance_local) - print(coordinates) coordinates = coordinates[0] # extract the coords of the one object x = coordinates[0]