Global Attributes

Using the "is_global": true flag in the conditions JSON when defining attributes allows an attribute to be marked as global. For annotation, imageannotation, and segmentannotation tasks, this means the attribute should apply to the scene as a whole, instead of any particular annotation. Therefore, the label_condition condition will never apply.

When specified on a videoannotation or videoplaybackannotation task, these attributes will apply to events and can be set for a frame or group of frames. In these cases, the label_condition can be used to restrict the attribute to appear on one or more 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 annotation, imageannotation, and segmentannotation tasks, global attributes attributes will be returned alongside the annotations object, under the global_attributes key.

For videoannotation or videoplaybackannotation tasks, the attribute results are found within the events return object.

{
  "response": {
    "annotations": [
      // ...
    ],
    "global_attributes": {
      "driving": "Yes",
      "night": "No"
    }
  }
}
{
  "events": [
    {
      "label": "Driving In Lane",
      "type": "range",
      "start": 1,
      "end": 15,
      "attributes": {
        "lane": "left"
      }
    }
  ]
}