Querying Objects
Besides images, Nucleus provides a way to query Annotation
, Prediction
, or EvaluationMatch
objects through the query_objects
method, utilising the same query engine used for dataset items:
annotations = dataset.query_objects(
"annotations.metadata.distance_to_device > 150",
QueryObjectType.GROUND_TRUTH_ONLY
)
#annotations: [CuboidAnnotation(label='traffic_sign', position=Point3D(...)), ...]
predictions = dataset.query_objects(
"<query>",
QueryObjectType.PREDICTIONS_ONLY,
model_run_id="<modelRunId>"
)
#predictions: [CuboidPrediction(label='vehicle', position=Point3D(...), confidence=0.27), ...]
iou_matches = dataset.query_objects(
"<query>,
QueryObjectType.IOU,
model_run_id="<modelRunId>"
)
#iou_matches: [EvaluationMatch(iou=0.5276925, confusion_category='true_positive', model_prediction_label='Car', ground_truth_annotation_label='vehicle'), ...]
Updated about 1 year ago