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 68
68
Segment ,
69
69
SegmentationAnnotation ,
70
70
Point ,
71
+ CuboidAnnotation ,
71
72
)
72
73
from .constants import (
73
74
ANNOTATION_METADATA_SCHEMA_KEY ,
115
116
)
116
117
from .prediction import (
117
118
BoxPrediction ,
119
+ CuboidPrediction ,
118
120
PolygonPrediction ,
119
121
SegmentationPrediction ,
120
122
)
@@ -565,6 +567,8 @@ def annotate_dataset(
565
567
:param update: whether to update or ignore conflicting annotations
566
568
:return: {"dataset_id: str, "annotations_processed": int}
567
569
"""
570
+ if any ((isinstance (ann , CuboidAnnotation ) for ann in annotations )):
571
+ raise NotImplementedError ("Cuboid annotations not yet supported" )
568
572
569
573
# Split payload into segmentations and Box/Polygon
570
574
segmentations = [
@@ -723,6 +727,9 @@ def predict(
723
727
"predictions_ignored": int,
724
728
}
725
729
"""
730
+ if any ((isinstance (ann , CuboidPrediction ) for ann in annotations )):
731
+ raise NotImplementedError ("Cuboid predictions not yet supported" )
732
+
726
733
segmentations = [
727
734
ann
728
735
for ann in annotations
Original file line number Diff line number Diff line change 9
9
serialize_and_write_to_presigned_url ,
10
10
)
11
11
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
+ )
13
17
from .constants import (
14
18
DATASET_ITEM_IDS_KEY ,
15
19
DATASET_LENGTH_KEY ,
@@ -163,6 +167,9 @@ def annotate(
163
167
"ignored_items": int,
164
168
}
165
169
"""
170
+ if any ((isinstance (ann , CuboidAnnotation ) for ann in annotations )):
171
+ raise NotImplementedError ("Cuboid annotations not yet supported" )
172
+
166
173
if asynchronous :
167
174
check_all_annotation_paths_remote (annotations )
168
175
You can’t perform that action at this time.
0 commit comments