Skip to content

Commit

Permalink
fix: add images with no annotations to LuxonisDataset
Browse files Browse the repository at this point in the history
  • Loading branch information
sokovninn committed Nov 1, 2024
1 parent 749696d commit f763786
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions datadreamer/utils/luxonis_dataset_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ def dataset_generator():
image_full_path = os.path.join(dataset_dir, image_path)
width, height = Image.open(image_full_path).size
labels = data[image_path]["labels"]

if len(labels) == 0:
yield {
"file": image_full_path,
}

for label in labels:
yield {
"file": image_full_path,
Expand Down

0 comments on commit f763786

Please sign in to comment.