Calculate metrics per scene. Scene transition frames are optional. If no transition frames are provided the scene detection is automatic.

Pre-requisites

You must have an existing video with an associated media_id and the prediction status as done.

Use the media_id to send the POST request to the endpoint /predict/v2/videos/media_id/scene_detection

Metrics can be calculated for predefined scenes or, in case no scene transition frames are provided, the scene detection is automated,and scores are presented from the defined or auto-detected scenes.

Expected request payload for predefined scene metrics

The scene_transition_frames are optional.

{
    "scene_transition_frames": [ 353, 578 ]
}

The transition frames signify the "boundaries" of each scene. So if, for example, in a video with 800 frames, the provided transition frames are 353 and 578, as showcased above, then the metrics will be calculated for 3 scenes:

  1. From frame 1 until frame 352
  2. From frame 353 until frame 577
  3. From frame 578 until frame 800

For automated scene detection, no payload should be sent.

Example of a successful response

The results present the average of the prediction metrics for each scene. Each scene is defined by a unique identifier in the form of a UUID.

{
  "media_id": "c88ded20-69ad-457e-ae34-d04dfa9ad447", 
  "success": true, 
  "message": "OK", 
  "results": {
    "684b309b-5c75-434f-8db7-3f94f1bdda75": {
      "start_frame": 1, 
      "end_frame": 352, 
      "focus": 80.50604034612387, 
      "cognitive_demand": 45.078818846324495, 
      "memory": 56.21344592314347, 
      "engagement_frt": 62.88968305369173, 
      "aois": [
        {
          "uuid": "b8eded7a-1d2d-5452-df39-4fa7298ab972",
        	"name": "Getty Images",
       		"availability": 0.08333333333333333,
        	"total_attention": 23.5226571559906,
        	"relative_attention": 23.5226571559906          
        }
      ]
    }, 
    "08244ec2-0e41-40ea-8341-364415c452a9": {
      "start_frame": 353, 
      "end_frame": 577, 
      "focus": 87.38416864131615, 
      "cognitive_demand": 47.39792340437856, 
      "memory": 58.96938118994907, 
      "engagement_frt": 59.803821352594724, 
      "aois": [
        {
          "uuid": "b8eded7a-1d2d-5452-df39-4fa7298ab972",
          "name": "Getty Images",
          "availability": 0.7083333333333334,
          "total_attention": 31.4802991993287,
          "relative_attention": 31.4802991993287          
        }
      ]
    }, 
    "f7b93f99-cd0a-4627-986e-a7b46644c3df": {
      "start_frame": 578, 
      "end_frame": 800, 
      "focus": 68.33355230263865, 
      "cognitive_demand": 72.30813829044762, 
      "memory": 72.1463888155716, 
      "engagement_frt": 49.55575712129309, 
      "aois": [
        {
          "uuid": "b8eded7a-1d2d-5452-df39-4fa7298ab972",
          "name": "Getty Images",
          "availability": 0.5833333333333334,
          "total_attention": 0.6565483934853388,
          "relative_attention": 12.94338261442525
        }
      ]
    }
  }
}

In videos containing AOIs (static or autodetected) the scene metrics also contain the availability, total and relative attention of each video AOI per scene.

Language
Credentials
Header
Click Try It! to start a request and see the response here!