Face detection

The Video Intelligence API Face detection feature looks for faces in a video and returns:

  • The video segment, or segments in which a face is detected, across all videos in the given request.

  • Optional: bounding boxes defining the area of the video frame in which the face is detected. To enable this feature, set the includeBoundingBoxes field in the FaceDetectionConfig to True.

  • Optional: the detected attributes of the face. To enable attribute detection set the includeAttributes field within FaceDetectionConfig to True. (note: You must also setincludeBoundingBoxes to True). Also see DetectedAttribute.

    Possible boolean attributes:

Attribute Description
headwear The person is wearing a hat, cap, scarf and so on. Does not include small objects that hold the hair (e.g., hair pins).
frontal_gaze Whether the person's eyes are looking directly into the camera as opposed to simply have both eyes visible.
eyes_visible The sclera (white of the eye) is visible for both eyes.
glasses The person is wearing glasses on their face and over their eyes. The glasses may be clear or colored. Note: Worn in any other way (e.g., top of head, around the neck) the glasses are ignored.
mouth_open The person's mouth is open.
smiling The person is smiling.

For an example, see Face detection.

Video Intelligence API Visualizer

Check out the Video Intelligence API visualizer to see this feature in action.