Detect Faces

To detect faces that appear in media, follow these steps.

To detect faces in media

  1. Create a new configuration to send to Media Server with the process action, or open an existing configuration that you want to modify.

  2. In the [Analysis] section, add a new analysis task by setting the AnalysisEngineN parameter. You can give the task any name, for example:

  3. Create a new configuration section to contain the task settings, and set the following parameters:

    Type The analysis engine to use. Set this parameter to FaceDetect.
    Input (Optional) The image track to process. If you do not set this parameter, Media Server processes the first track of the correct type.
    Region (Optional) The region that you want to search for faces.
    RegionUnit (Optional) The units to use for specifying the region (default pixel). To specify the position and size of the region as a percentage of the media size, set this parameter to percent.
    FaceDirection (Optional) Media Server can detect faces looking in any direction, but if you know that all faces will look directly at the camera you can set FaceDirection=Front. This is faster and might produce fewer false detections.
    ColorAnalysis (Optional) A Boolean value that specifies whether to perform color analysis on detected faces. This can reduce the number of false detections.
    MinSize (Optional) The minimum expected size of faces in the video (in pixels unless you set the SizeUnit parameter). Increasing the minimum size can increase processing speed.
    SizeUnit (Optional) The units to use for setting the MinSize parameter (default pixel). To specify the size as a percentage of the smallest image side, set this parameter to percent.

    For example:


    For more information about the parameters that you can use to configure Face Detection, refer to the Media Server Reference.

  4. Save and close the configuration file. HPE recommends that you save your configuration files in the location specified by the ConfigDirectory parameter.