Global Attributes

Using the "is_global": true flag in the conditions JSON when defining attributes marks the attribute as global.

For imageannotation and segmentannotation tasks, this means the attribute applies to the scene as a whole instead of any particular annotation. Therefore, the label_condition condition will never apply.

For videoannotation and videoplaybackannotation tasks, this means the attribute applies to events which occur on a frame or during a group of frames. The label_condition can be used to restrict the attribute to appear on specific event labels.

{
  "annotation_attributes": {
    "is_night": {
      "type": "category",
      "description": "Does this scene take place at night?",
      "choices": ["Yes", "No"],
      "conditions": {
        "is_global": true
      }
    }
  }
}

Response Format

For imageannotation and segmentannotation tasks, global attributes will be returned alongside the annotations object, under the global_attributes key.

{
  "response": {
    "annotations": [
      // ...
    ],
    "global_attributes": {
      "driving": "Yes",
      "night": "No"
    }
  }
}

For videoannotation or videoplaybackannotation tasks, the attribute values are specified in events within the events file JSON.

{
  "events": [
    {
      "label": "Driving In Lane",
      "type": "range",
      "start": 1,
      "end": 15,
      "attributes": {
        "lane": "left"
      }
    }
  ]
}

🚧

Multiple Types of "Global" Attributes

Global Attributes (here) are different from Global Track Attributes for Multiframe Tasks.

Global Attributes specify a global, scene-level attribute, or an attribute of events if using events in videoannotation or videoplaybackannotation tasks. It is not used to customize the attributes of a single annotation.

Global Track Attributes (Multiframe Tasks) specify one attribute of annotations when using multiframe tasks, like videoannotation or videoplaybackannotation. Once set, all frames of the annotation must have the same, consistent attribute value. Global Track Attributes should only be used to specify annotation attributes of videoannotation , videoplaybackannotation or lidarannotation tasks.