File tree Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Original file line number Diff line number Diff line change 67
67
68
68
from .annotation import (
69
69
BoxAnnotation ,
70
- Point ,
71
70
PolygonAnnotation ,
72
71
Segment ,
73
72
SegmentationAnnotation ,
73
+ Point ,
74
+ CuboidAnnotation ,
74
75
)
75
76
from .constants import (
76
77
ANNOTATION_METADATA_SCHEMA_KEY ,
118
119
)
119
120
from .prediction import (
120
121
BoxPrediction ,
122
+ CuboidPrediction ,
121
123
PolygonPrediction ,
122
124
SegmentationPrediction ,
123
125
)
@@ -569,6 +571,8 @@ def annotate_dataset(
569
571
:param update: whether to update or ignore conflicting annotations
570
572
:return: {"dataset_id: str, "annotations_processed": int}
571
573
"""
574
+ if any ((isinstance (ann , CuboidAnnotation ) for ann in annotations )):
575
+ raise NotImplementedError ("Cuboid annotations not yet supported" )
572
576
573
577
# Split payload into segmentations and Box/Polygon
574
578
segmentations = [
@@ -727,6 +731,9 @@ def predict(
727
731
"predictions_ignored": int,
728
732
}
729
733
"""
734
+ if any ((isinstance (ann , CuboidPrediction ) for ann in annotations )):
735
+ raise NotImplementedError ("Cuboid predictions not yet supported" )
736
+
730
737
segmentations = [
731
738
ann
732
739
for ann in annotations
Original file line number Diff line number Diff line change 3
3
import requests
4
4
5
5
from nucleus .job import AsyncJob
6
+ from nucleus .url_utils import sanitize_string_args
6
7
from nucleus .utils import (
7
8
convert_export_payload ,
8
9
format_dataset_item_response ,
9
10
serialize_and_write_to_presigned_url ,
10
11
)
11
12
12
- from nucleus .url_utils import sanitize_string_args
13
-
14
- from .annotation import Annotation , check_all_annotation_paths_remote
13
+ from .annotation import (
14
+ Annotation ,
15
+ CuboidAnnotation ,
16
+ check_all_annotation_paths_remote ,
17
+ )
15
18
from .constants import (
16
19
DATASET_ITEM_IDS_KEY ,
17
20
DATASET_LENGTH_KEY ,
33
36
)
34
37
from .payload_constructor import construct_model_run_creation_payload
35
38
36
-
37
39
WARN_FOR_LARGE_UPLOAD = 50000
38
40
39
41
@@ -166,6 +168,9 @@ def annotate(
166
168
"ignored_items": int,
167
169
}
168
170
"""
171
+ if any ((isinstance (ann , CuboidAnnotation ) for ann in annotations )):
172
+ raise NotImplementedError ("Cuboid annotations not yet supported" )
173
+
169
174
if asynchronous :
170
175
check_all_annotation_paths_remote (annotations )
171
176
You can’t perform that action at this time.
0 commit comments