@@ -114,8 +114,8 @@ Upload groundtruth annotations for the items in your dataset.
114114Box2DAnnotation has same format as https://dashboard.scale.com/nucleus/docs/api#add-ground-truth
115115
116116``` 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 = {})
119119response = dataset.annotate([annotation_1, annotation_2])
120120```
121121
@@ -138,8 +138,8 @@ Takes a list of Box2DPredictions within the payload, where Box2DPrediction
138138is formulated as in https://dashboard.scale.com/nucleus/docs/api#upload-model-outputs
139139
140140``` 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 )
143143
144144model_run = model.create_run(name = " My Model Run" , metadata = {" timestamp" : " 121012401" }, dataset = dataset, predictions = [prediction_1, prediction_2])
145145```
0 commit comments