diff --git a/luxonis_ml/data/loaders/luxonis_loader.py b/luxonis_ml/data/loaders/luxonis_loader.py index 0c9b9e7e..44853a9c 100644 --- a/luxonis_ml/data/loaders/luxonis_loader.py +++ b/luxonis_ml/data/loaders/luxonis_loader.py @@ -330,11 +330,11 @@ def _load_image_with_annotations( (len(self.class_mappings[task]), height, width), dtype=np.uint8, ) - if task == LabelType.BOUNDINGBOX: + elif task == LabelType.BOUNDINGBOX: empty_array = np.zeros((0, 6), dtype=np.float32) - if task == LabelType.KEYPOINTS: + elif task == LabelType.KEYPOINTS: empty_array = np.zeros((0, 3), dtype=np.float32) - if task == LabelType.CLASSIFICATION: + elif task == LabelType.CLASSIFICATION: empty_array = np.zeros( (0, len(self.class_mappings[task])), dtype=np.float32 )