Skip to content

Commit

Permalink
Updated changes to be compatible with AI-1260
Browse files Browse the repository at this point in the history
  • Loading branch information
JBWilkie committed Oct 23, 2023
1 parent dcc6d76 commit 7171b3c
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion darwin/dataset/local_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,16 @@ def _validate_inputs(self, partition, split_type, annotation_type):
"annotation_type should be either 'tag', 'bounding_box', or 'polygon'"
)

def _setup_annotations_and_images(
self,
release_path,
annotations_dir,
images_dir,
annotation_type,
split,
partition,
split_type,
):
# Find all the annotations and their corresponding images
for annotation_path in sorted(annotations_dir.glob("**/*.json")):
darwin_json = stream_darwin_json(annotation_path)
Expand All @@ -130,7 +140,9 @@ def _validate_inputs(self, partition, split_type, annotation_type):
self.annotations_path.append(annotation_path)
continue
else:
raise ValueError(f"Annotation ({annotation_path}) does not have a corresponding image")
raise ValueError(
f"Annotation ({annotation_path}) does not have a corresponding image"
)

def _initial_setup(self, dataset_path, release_name):
assert dataset_path is not None
Expand Down

0 comments on commit 7171b3c

Please sign in to comment.