Query Language Reference
Nucleus provides a powerful querying engine with many types of filters and operators. The Nucleus query bar filters dataset items or annotations based on the given conditions, which can also be combined with AND or OR statements.
queried_items = dataset.query_items("annotations.count > 3") all_accepted_items = dataset.query_items("scale_metadata.task_audit_status = accepted")
Supported Query Types
Supported Query Operators
To query using strings that contain special characters such as hyphens and spaces (for example, for class names that are multiple words), use double quotes to delimit, e.g.
annotations.”traffic sign” > 0.
When the query bar is used in Objects view, some queries still apply to the entire dataset item (image). So, for example, querying
annotations.truck > 0 in the Objects view will show all objects from dataset items that contain more than 0 trucks. To further filter individual objects in Objects view, for example based on model confidence, IoU, or object class, use the Search Options sidebar on the left.
Sorting Query Results
Query results can be sorted on metrics of interest, using the “Sort By” section of the Search Options controls in the top left of the Image grid view. In the Image grid view, sorting is available on image-level metadata attributes and Autotag scores. In the Objects view, sorting is also available on object-level metrics, like intersection over union and model confidence.
Account for Indexing!
Nucleus indexes queryable data immediately after it is uploaded to power the fast querying engine. This can sometimes take up to ~60s, so please account for this lag before running queries immediately after uploading data.
Updated 8 months ago