Tag captured data

Tags are short labels you attach to captured items. Use them to mark which items have been reviewed, group items by source or condition, build a dataset for ML training, or narrow the scope of a delete operation.

A few important boundaries:

  • Binary data only. You can tag images, point clouds, audio, and other binary uploads. Tabular data (sensor readings) does not support post-capture tagging.
  • Different from bounding boxes and labels. Tags apply to a whole item. Bounding boxes mark regions of an image and are used for object-detection training. See Annotate images for both classification tags and bounding boxes in the ML training context.
  • Different from tabular tags capture attributes. The tags field in a data capture method config attaches a fixed list of tags at capture time. The operations on this page apply tags after data is captured.

Apply tags to binary data

  1. On your organization’s DATA page, click an item to open the side panel.
  2. Open the Actions tab.
  3. In the Tags section, type a tag name and press Enter.

Repeat to add more tags. Click the x next to a tag to remove it.

The Viam app applies tags one item at a time. To tag many items in a single operation, use the CLI or the SDK.

Tag specific items by their binary data IDs:

viam data tag ids add \
  --tags=reviewed,approved \
  --binary-data-ids=<id1>,<id2>

Remove tags from specific items:

viam data tag ids remove \
  --tags=reviewed \
  --binary-data-ids=<id1>,<id2>

Tag every item that matches a filter (organization, location, MIME type, time range, and more):

viam data tag filter add \
  --tags=reviewed,approved \
  --org-ids=<org-id> \
  --location-ids=<location-id> \
  --mime-types=image/jpeg

For the full list of flags, see the viam data tag CLI reference.

To find binary data IDs, run viam data export binary filter and read the IDs from the JSON metadata file each download produces, or query through the SDK with BinaryDataByFilter.

binary_ids = ["binary-data-id-1", "binary-data-id-2"]

await data_client.add_tags_to_binary_data_by_ids(
    tags=["reviewed", "approved"],
    binary_ids=binary_ids,
)

The data client API also supports adding and removing tags by filter, removing tags by ID, and listing the distinct tags that match a filter.

binaryIDs := []string{"binary-data-id-1", "binary-data-id-2"}

err := dataClient.AddTagsToBinaryDataByIDs(
    ctx,
    []string{"reviewed", "approved"},
    binaryIDs,
)

The data client API also supports adding and removing tags by filter, removing tags by ID, and listing the distinct tags that match a filter.

Use tags downstream

Once data is tagged, you can use those tags to:

  • Filter the DATA page. Use the tag filter at the top of the page to view only items with a given tag.
  • Build a dataset. Add tagged items to a dataset for ML training. See Create a dataset.
  • Scope an export. Pass --tags to viam data export binary filter to download only items with a given tag, or --tags=tagged and --tags=untagged to scope to all tagged or all untagged items.

Related pages