This topic describes the detailed information about the facial attributes model, including the features, input format, and output format. This topic also provides a set of test data.

  • Overview

    The facial attributes model uses the Residual Networks 50 (ResNet50) framework. The model involves multiple facial attributes and generates a facial expression, an age, and a detection frame for each detected face.

  • Input format
    The input data must be in the JSON format. It contains the image parameter. The value of the parameter is the image content that is encoded in the Base64 format.
    {
      "image": "Base64-encoded image content"
    }
  • Output format
    The output format is JSON. The following table describes the parameters in the output data.
    Parameter Description Type
    request_id The unique ID of the request. STRING
    success Indicates whether the request is successful. Valid values:
    • true: The request is successful.
    • false: The request fails.
    BOOL
    face_age The estimated ages of the faces detected in the image. The values are stored in a list in sequence. LIST
    face_gender The estimated genders of the faces detected in the image. The values are stored in a list in sequence. LIST
    face_emo The estimated emotions of the faces detected in the image. The values are stored in a list in sequence. LIST
    face_bbox The coordinates of the faces detected in the image. The values are stored in a list in sequence. LIST
    error_code The error code returned if the request fails. INT
    error_msg The error message returned if the request fails. STRING
    The following code provides an example of the output data:
    {
    "request_id": "597a4180-6fcd-4dec-b1e6-9864b812****", 
    "success": true, 
    "face_age": [19.693389892578125, 20.624303817749023], 
    "face_gender": ["female", "female"], 
    "face_emo": ["Happiness,", "Happiness,"], 
    "face_bbox": [[452.0916877910495, 61.250034026801586, 643.2265069484711, 321.3869784325361, 0.9999947547912598], [87.99690818786621, 81.17595142126083, 260.9599985778332, 312.2925915122032, 0.9999878406524658]]
     }
  • Test data