google-cloud-platformvideo-intelligence-api

How can I track eye movements with Google Video Intelligence API?


I have a video with 3 persons speaking and I would like to annotate the location of people's eyes during it. I know that the Google Video Intelligence API has functionalities for object tracking, but it's possible to handle such an eye-tracking process using the API?


Solution

  • Google Video Intelligence API represents Face detection feature, which gives you opportunity to perform face detection from within video frames as well as special face attributes.

    In general, you need to adjust FaceDetectionConfig throughout videos.annotate method, supplying includeBoundingBoxes and includeAttributes arguments in JSON request body:

    {
       "inputUri":"string",
       "inputContent":"string",
       "features":[
          "FACE_DETECTION"
       ],
       "videoContext":{
          "segments":[
             "object (VideoSegment)"
          ],
          "faceDetectionConfig":{
             "model":"string",
             "includeBoundingBoxes":"true",
             "includeAttributes":"true"
          }
       },
       "outputUri":"string",
       "locationId":"string"
    }