ci:CreateFaceEffectJob permission is required. For details, see Cloud Infinite action.GET /<ObjectKey>?ci-process=DetectFace&max-face-num=<FaceNum> HTTP/1.1Host: <BucketName-APPID>.cos.<Region>.myqcloud.comDate: <GMT Date>Authorization: <Auth String>
Parameter Name | Description | Type | Required or Not |
ObjectKey | object filename, for example: folder/document.jpg. | String | Yes |
ci-process | Cloud Infinite processing capability, face detection is fixed as DetectFace. | String | Yes |
max-face-num | Maximum number of faces processed. The default value is 1 (only the face with the largest area in the image is detected), and the maximum value is 120. This parameter is used to control the number of faces processed in the image to be detected. A smaller value results in faster processing speed. | Integer | No |
<Response><ImageWidth>616</ImageWidth><ImageHeight>442</ImageHeight><FaceModelVersion>4.0</FaceModelVersion><RequestId>NjEzZjBlZGRfOTBmYTUwNjRfZWUx****</RequestId><FaceInfos><X>312</X><Y>-5</Y><Width>117</Width><Height>173</Height></FaceInfos></Response>
Node Name (Keyword) | Parent Node | Description | Type |
Response | None. | Container for saving results. | Container |
Node Name (Keyword) | Parent Node | Description | Type |
ImageWidth | Response | Image width of the request | Integer |
ImageHeight | Response | Image height of the request | Integer |
FaceModelVersion | Response | The algorithm model version used for face recognition. | String |
RequestId | Response | unique request ID, returned for each request. RequestId is required for locating a problem. | String |
Status | Response | Recognition status: 1 indicates a human face is detected in the image; 0 indicates no human face is detected in the image. | String |
FaceInfos | Response | face information list. It contains face coordinate information. | Container |
Node Name (Keyword) | Parent Node | Description | Type |
Score | FaceInfos | confidence degree. It represents the confidence level of detected faces, ranging from 0 to 100. | Integer |
X | FaceInfos | horizontal coordinate of top-left corner of face frame. The face frame contains the positions of facial features and is expanded on this basis. If the face frame exceeds the image range, it can cause negative coordinate values. | Integer |
Y | FaceInfos | vertical coordinate of top-left corner of face frame. The face frame contains the positions of facial features and is expanded on this basis. If the face frame exceeds the image range, it can cause negative coordinate values. | Integer |
Width | FaceInfos | width of face frame | Integer |
Height | FaceInfos | height of face frame | Integer |
Error Code | Description |
FailedOperation.ConflictOperation | Operation conflict. Do not operate the same Person simultaneously. |
FailedOperation.GroupInDeletedState | The current group is in deletion status. Please wait. |
FailedOperation.GroupPersonMapExist | The group already contains the corresponding personnel ID. |
FailedOperation.GroupPersonMapNotExist | The group does not include the corresponding personnel ID. |
FailedOperation.ImageDecodeFailed | Image decoding failed. |
FailedOperation.ImageDownloadError | Image download error. |
FailedOperation.ImageFacedetectFailed | Face detection failed. |
FailedOperation.ImageResolutionExceed | Image resolution is too high. |
FailedOperation.ImageResolutionTooSmall | The short side resolution of the image is less than 64. |
FailedOperation.ImageSizeExceed | Image data size after base64 encoding shall not exceed 5MB. |
FailedOperation.RequestLimitExceeded | Request frequency exceeds the limit. |
FailedOperation.RequestTimeout | Backend service timeout. |
FailedOperation.ServerError | Algorithm service exception, please retry. |
InternalError | internal error. |
InvalidParameter.InvalidParameter | Invalid parameters. |
InvalidParameterValue.AccountFaceNumExceed | The number of faces for the account exceeds the limit. |
InvalidParameterValue.FaceModelVersionIllegal | Invalid algorithm model version. |
InvalidParameterValue.ImageEmpty | Image is empty. |
InvalidParameterValue.LimitExceed | The number of returned results exceeds the limit. |
InvalidParameterValue.NoFaceInPhoto | No human face in the image. |
InvalidParameterValue.UrlIllegal | The URL format is invalid. |
LimitExceeded.ErrorFaceNumExceed | The number of human faces exceeds the limit. |
MissingParameter.ErrorParameterEmpty | Required parameter is empty. |
ResourceUnavailable.Freeze | The account has been frozen. |
ResourceUnavailable.InArrears | Account in arrears. |
ResourceUnavailable.LowBalance | Insufficient balance. |
ResourceUnavailable.StopUsing | Account suspended. |
ResourceUnavailable.UnknownStatus | Billing status unknown. |
ResourcesSoldOut.ChargeStatusException | Billing status abnormal. |
UnsupportedOperation.UnknowMethod | Unknown method name. |
GET /test.jpg?max-face-num=1&ci-process=detect-face HTTP/1.1Authorization: q-sign-algorithm=sha1&q-ak=************************************&q-sign-time=1497530202;1497610202&q-key-time=1497530202;1497610202&q-header-list=&q-url-param-list=&q-signature=****************************************Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.com
HTTP/1.1 200 OKContent-Type: application/xmlContent-Length: 414641Date: Thu, 15 Jun 2017 12:37:29 GMTServer: tencent-cix-ci-request-id: NTk0MjdmODlfMjQ4OGY3XzYzYzhf****<Response><ImageWidth>616</ImageWidth><ImageHeight>442</ImageHeight><FaceModelVersion>3.0</FaceModelVersion><RequestId>NjEzZjBlZGRfOTBmYTUwNjRfZWUxXzE=</RequestId><FaceInfos><X>312</X><Y>-5</Y><Width>117</Width><Height>173</Height></FaceInfos><FaceInfos><X>600</X><Y>-5</Y><Width>117</Width><Height>173</Height></FaceInfos></Response>
Feedback