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"
      }
    }
  ]
}