File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 6868 Segment ,
6969 SegmentationAnnotation ,
7070 Point ,
71+ CuboidAnnotation ,
7172)
7273from .constants import (
7374 ANNOTATION_METADATA_SCHEMA_KEY ,
115116)
116117from .prediction import (
117118 BoxPrediction ,
119+ CuboidPrediction ,
118120 PolygonPrediction ,
119121 SegmentationPrediction ,
120122)
@@ -565,6 +567,8 @@ def annotate_dataset(
565567 :param update: whether to update or ignore conflicting annotations
566568 :return: {"dataset_id: str, "annotations_processed": int}
567569 """
570+ if any ((isinstance (ann , CuboidAnnotation ) for ann in annotations )):
571+ raise NotImplementedError ("Cuboid annotations not yet supported" )
568572
569573 # Split payload into segmentations and Box/Polygon
570574 segmentations = [
@@ -723,6 +727,9 @@ def predict(
723727 "predictions_ignored": int,
724728 }
725729 """
730+ if any ((isinstance (ann , CuboidPrediction ) for ann in annotations )):
731+ raise NotImplementedError ("Cuboid predictions not yet supported" )
732+
726733 segmentations = [
727734 ann
728735 for ann in annotations
Original file line number Diff line number Diff line change 99 serialize_and_write_to_presigned_url ,
1010)
1111
12- from .annotation import Annotation , check_all_annotation_paths_remote
12+ from .annotation import (
13+ Annotation ,
14+ CuboidAnnotation ,
15+ check_all_annotation_paths_remote ,
16+ )
1317from .constants import (
1418 DATASET_ITEM_IDS_KEY ,
1519 DATASET_LENGTH_KEY ,
@@ -163,6 +167,9 @@ def annotate(
163167 "ignored_items": int,
164168 }
165169 """
170+ if any ((isinstance (ann , CuboidAnnotation ) for ann in annotations )):
171+ raise NotImplementedError ("Cuboid annotations not yet supported" )
172+
166173 if asynchronous :
167174 check_all_annotation_paths_remote (annotations )
168175
You can’t perform that action at this time.
0 commit comments