Skip to content

Commit 0493671

Browse files
author
Bihan Jiang
authored
Fix documentation
Fixing documentation for add annotations and upload predictions
1 parent 0ebb44a commit 0493671

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ Upload groundtruth annotations for the items in your dataset.
114114
Box2DAnnotation 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={})
119119
response = dataset.annotate([annotation_1, annotation_2])
120120
```
121121

@@ -138,8 +138,8 @@ Takes a list of Box2DPredictions within the payload, where Box2DPrediction
138138
is 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

144144
model_run = model.create_run(name="My Model Run", metadata={"timestamp": "121012401"}, dataset=dataset, predictions=[prediction_1, prediction_2])
145145
```

0 commit comments

Comments
 (0)