Events

For video task types (videoannotation and videoplaybackannotation), in addition to objects in the scene, you can also request to annotate specific events that happen during the video.

The main difference between events and annotations is that events are not linked to a specific object or shape, but rather to a frame or specific timestamp.

You can provide any set of events to annotate through the events_to_annotate API param, and they can relate to both events in the video images or audio.

Events Request Format

{
  "events_to_annotate": ["Environment", "Action", "Turning"]
}

Events Response Format

{
  "events": [
    {
      "label": "Mentioned",
      "type": "range",
      "start": 3,
      "end": 10
    },
    {
      "label": "Mentioned",
      "type": "point",
      "start": 8,
      "attributes": {
        "Speaker": "Primary"
      }
    },
    ...
  ]
}

If the annotation was completed successfully, the events field will contain an array of annotated events. Each event will have the following values:

  • label: The label for the event, which will be one of the specified task.params.events_to_annotate.
  • type: The type of event. This can be point if the event happens in a single frame, or range if has a start and an end.
  • start: Frame where the event starts.
  • end (only if the type is range): Frame where the event ends.
  • attributes: Key/value pairs for frame attributes as per the global attributes specification.