Face Detection
Last Updated:2021-12-08
Feature Description
- It detects the face in the request image and returns the face position, 72 key point coordinates, and face-related attribute information.
- The detection response speed is related to the number of faces in the image. The larger the number of faces, the longer the response time is.
- Typical application scenarios: For example, face attribute analysis, processing analysis based on the face key points, and face marketing activity.
- The position of facial features is marked with a specific coordinate. The 72 key points coordinate also contains the specific coordinate, but it does not contain the detailed description of the corresponding position.
Request Parameters
None
Return Parameters
Parameters | Type | Required? | Description |
---|---|---|---|
log_id | uint64 | Yes | Log ID |
result_num | uint32 | Yes | Number of faces |
result | object[] | Yes | Collection of the face attribute objects |
+age | double | No | Age. It returns the value when face_fields contains the age. |
+beauty | double | No | Beauty score, which is within the range of 0-100. The larger the image, the more beautiful it is. It returns the value when face_fields contains the beauty. |
+location | object | Yes | Position of the face in the image |
++left | uint32 | Yes | Distance from face area to left boundary |
++top | uint32 | Yes | Distance from face area to top boundary |
++width | uint32 | Yes | Width of face area |
++height | uint32 | Yes | Height of face area |
+face_probability | double | Yes | Face confidence level, which is within the range of 0-1. |
+rotation_angle | int32 | Yes | Clockwise rotation angle of the face frame relative to the vertical direction, [-180,180] |
+yaw | double | Yes | Left and right rotation angle of the 3D rotation [-90 (left), 90 (right)] |
+pitch | double | Yes | Pitch angle of the 3D rotation [-90 (top), 90 (bottom)] |
+roll | double | Yes | In-plane rotation angle [-180 (anticlockwise), 180 (clockwise)] |
+expression | uint32 | No | Expression: 0. No smile, 1. Smile, 2. Laugh. It returns the value when face_fields contains the expression. |
+expression_probability | double | No | Expression confidence level, which is within the range of 0-1. It returns the value when face_fields contains the expression. |
+faceshape | object[] | No | Face feature confidence level. It returns the value when face_fields contains the face_fields. |
++type | string | Yes | Face feature: square/triangle/oval/heart/round |
++probability | double | Yes | Confidence level: 0-1. |
+gender | string | No | Male or female. It returns the value when face_fields contains the gender. |
+gender_probability | double | No | Gender confidence level, which is within the range of 0-1. It returns the value when face_fields contains the gender. |
+glasses | uint32 | No | Whether to wear glasses, 0 – No glasses, 1 - Ordinary glasses, 2 - Sunglass It returns the value when face_fields contains the glasses. |
+glasses_probability | double | No | Glasses confidence level, which is within the range of 0-1. It returns the value when face_fields contains the glasses. |
+landmark | object[] | No | 4 key positions: Left eye center, right eye center, nose tip, and mouth center. It returns the value when face_fields contains the landmark. |
++x | uint32 | No | X coordinate |
++y | uint32 | No | y coordinate |
+landmark72 | object[] | No | 72 feature point positions, as shown in the figure. It returns the value when face_fields contains the landmark. |
++x | uint32 | No | X coordinate |
++y | uint32 | No | y coordinate |
+race | string | No | yellow, white, black, and arabs. It returns the value when face_fields contains the race. |
+race_probability | double | No | Race confidence level, which is within the range of 0-1. It returns the value when face_fields contains the race. |
+qualities | object | No | Face quality information. It returns the value when face_fields contains the qualities. |
++occlusion | object | Yes | Probability of blocking of different parts of face, [0, 1] (to be launched) |
+++left_eye | double | Yes | Left eye |
+++right_eye | double | Yes | Right eye |
+++nose | double | Yes | Nose |
+++mouth | double | Yes | Mouth |
+++left_cheek | double | Yes | Left cheek |
+++right_cheek | double | Yes | Right cheek |
+++chin | double | Yes | Chin |
++blur | double | Yes | Face ambiguity, [0, 1]. 0 indicates that it is clear, and 1 indicates that it is blurred (to be launched). |
++illumination | - | Yes | The value range is [0,255], indicating the illumination level of the face area (to be launched). |
++completeness | - | Yes | Face completeness, [0, 1]. 0 indicates that it is complete, and 1 indicates that it is incomplete (to be launched). |
++type | object | Yes | Real face/cartoon face confidence level |
+++human | - | Yes | Real face confidence level, [0, 1]. |
+++cartoon | - | Yes | Cartoon face confidence level, [0, 1]. |
Return Example
{
"result_num": 1,
"result": [
{
"location": {
"left": 90,
"top": 92,
"width": 111,
"height": 99
},
"face_probability": 1,
"rotation_angle": 6,
"yaw": 11.61234664917,
"pitch": -0.30852827429771,
"roll": 8.8044967651367,
"landmark": [
{
"x": 105,
"y": 110
},
...
],
"landmark72": [
{
"x": 88,
"y": 109
},
...
],
"gender": "male",
"gender_probability": 0.99358034133911,
"glasses": 0,
"glasses_probability": 0.99991309642792,
"race": "yellow",
"race_probability": 0.99960690736771,
"qualities": {
"occlusion": {
"left_eye": 0.000085282314103097,
"right_eye": 0.00001094374601962,
"nose": 3.2677664307812e-7,
"mouth": 2.6582130940866e-10,
"left_cheek": 8.752236624332e-8,
"right_cheek": 1.0212766454742e-7,
"chin": 4.2632994357028e-10
},
"blur": 4.5613666312237e-41,
"illumination": 0,
"completeness": 0,
"type": {
"human": 0.98398965597153,
"cartoon": 0.016010366380215
}
}
}
],
"log_id": 2418894422
}