@@ -92,8 +92,8 @@ item = dataset.loc("dataset_item_id")
92
92
Upload groundtruth annotations for the items in your dataset.
93
93
Box2DAnnotation has same format as https://dashboard.scale.com/nucleus/docs/api#add-ground-truth
94
94
``` python
95
- annotation_1 = BoxAnnotation(reference_id = " 1" , label = " label" , x = 0 , y = 0 , width = 10 , height = 10 , metadata = {})
96
- annotation_2 = BoxAnnotation(reference_id = " 2" , label = " label" , x = 0 , y = 0 , width = 10 , height = 10 , metadata = {})
95
+ annotation_1 = BoxAnnotation(reference_id = " 1" , label = " label" , x = 0 , y = 0 , width = 10 , height = 10 , annotation_id = " ann_1 " , metadata = {})
96
+ annotation_2 = BoxAnnotation(reference_id = " 2" , label = " label" , x = 0 , y = 0 , width = 10 , height = 10 , annotation_id = " ann_2 " , metadata = {})
97
97
response = dataset.annotate([annotation_1, annotation_2])
98
98
```
99
99
@@ -113,8 +113,8 @@ Returns the associated model_id, human-readable name of the run, status, and use
113
113
Takes a list of Box2DPredictions within the payload, where Box2DPrediction
114
114
is formulated as in https://dashboard.scale.com/nucleus/docs/api#upload-model-outputs
115
115
``` python
116
- prediction_1 = BoxPrediction(reference_id = " 1" , label = " label" , x = 0 , y = 0 , width = 10 , height = 10 , confidence = 0.9 )
117
- prediction_2 = BoxPrediction(reference_id = " 2" , label = " label" , x = 0 , y = 0 , width = 10 , height = 10 , confidence = 0.2 )
116
+ prediction_1 = BoxPrediction(reference_id = " 1" , label = " label" , x = 0 , y = 0 , width = 10 , height = 10 , annotation_id = " pred_1 " , confidence = 0.9 )
117
+ prediction_2 = BoxPrediction(reference_id = " 2" , label = " label" , x = 0 , y = 0 , width = 10 , height = 10 , annotation_id = " pred_2 " , confidence = 0.2 )
118
118
119
119
model_run = model.create_run(name = " My Model Run" , metadata = {" timestamp" : " 121012401" }, dataset = dataset, predictions = [prediction_1, prediction_2])
120
120
```
0 commit comments