@@ -114,8 +114,8 @@ Upload groundtruth annotations for the items in your dataset.
114
114
Box2DAnnotation has same format as https://dashboard.scale.com/nucleus/docs/api#add-ground-truth
115
115
116
116
``` python
117
- annotation_1 = BoxAnnotation(reference_id = " 1" , label = " label" , x = 0 , y = 0 , width = 10 , height = 10 , annotation_id = " ann_1" , metadata = {})
118
- annotation_2 = BoxAnnotation(reference_id = " 2" , label = " label" , x = 0 , y = 0 , width = 10 , height = 10 , annotation_id = " ann_2" , metadata = {})
117
+ annotation_1 = nucleus. BoxAnnotation(reference_id = " 1" , label = " label" , x = 0 , y = 0 , width = 10 , height = 10 , annotation_id = " ann_1" , metadata = {})
118
+ annotation_2 = nucleus. BoxAnnotation(reference_id = " 2" , label = " label" , x = 0 , y = 0 , width = 10 , height = 10 , annotation_id = " ann_2" , metadata = {})
119
119
response = dataset.annotate([annotation_1, annotation_2])
120
120
```
121
121
@@ -138,8 +138,8 @@ Takes a list of Box2DPredictions within the payload, where Box2DPrediction
138
138
is formulated as in https://dashboard.scale.com/nucleus/docs/api#upload-model-outputs
139
139
140
140
``` python
141
- prediction_1 = BoxPrediction(reference_id = " 1" , label = " label" , x = 0 , y = 0 , width = 10 , height = 10 , annotation_id = " pred_1" , confidence = 0.9 )
142
- prediction_2 = BoxPrediction(reference_id = " 2" , label = " label" , x = 0 , y = 0 , width = 10 , height = 10 , annotation_id = " pred_2" , confidence = 0.2 )
141
+ prediction_1 = nucleus. BoxPrediction(reference_id = " 1" , label = " label" , x = 0 , y = 0 , width = 10 , height = 10 , annotation_id = " pred_1" , confidence = 0.9 )
142
+ prediction_2 = nucleus. BoxPrediction(reference_id = " 2" , label = " label" , x = 0 , y = 0 , width = 10 , height = 10 , annotation_id = " pred_2" , confidence = 0.2 )
143
143
144
144
model_run = model.create_run(name = " My Model Run" , metadata = {" timestamp" : " 121012401" }, dataset = dataset, predictions = [prediction_1, prediction_2])
145
145
```
0 commit comments