Skip to content

Commit

Permalink
refactor conditional logic
Browse files Browse the repository at this point in the history
  • Loading branch information
JSabadin committed Nov 27, 2024
1 parent b39761a commit 3716ba7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions luxonis_ml/data/loaders/luxonis_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(

Check warning on line 338 in luxonis_ml/data/loaders/luxonis_loader.py

View check run for this annotation

Codecov / codecov/patch

luxonis_ml/data/loaders/luxonis_loader.py#L333-L338

Added lines #L333 - L338 were not covered by tests
(0, len(self.class_mappings[task])), dtype=np.float32
)
Expand Down

0 comments on commit 3716ba7

Please sign in to comment.