Feature | Description |
Beauty filter | You can upload a selfie and quickly apply smart skin brightening, skin smoothing, face slimming, eye enlarging, and contouring filters. You can also customize parameters. |
Gender swap | You can upload a face image and have the gender swapped based on the face editing and generation algorithms. Beauty filters, makeup, bang, and long hair can be added to a face swapped from male to female, while beard and short hair can be added to a face swapped from female to male. |
Age change | You can upload a face image and make the face look older or younger based on the face editing and generation algorithms. |
Face cut-out | You can upload an image and get the body contour recognized and separated from the background. The binary image, grayscale image, and foreground portrait are returned. This is applicable to portrait keying, photo synthesis, face special effect, and other use cases and greatly improves the tool efficiency. |
GET /<ObjectKey>?ci-process=face-effect&type=<type> HTTP/1.1Host: <BucketName-APPID>.cos.<Region>.myqcloud.comDate: <GMT Date>Authorization: <Auth String>
Parameter | Description | Type | Required |
ObjectKey | Object name, such as folder/document.jpg . | String | Yes |
ci-process | CI's processing capability, which is fixed at face-effect for face filter. | String | Yes |
type | Face filter type. Valid value: face-beautify, face-gender-transformation, face-age-transformation, face-segmentation. | String | Yes |
whitening | Skin brightening level, which takes effect if type is face-beautify . Value range: [0,100]. Default value: 30. The higher the value, the more obvious the effect. | Integer | No |
smoothing | Skin smoothing level, which takes effect if type is face-beautify . Value range: [0,100]. Default value: 10. The higher the value, the more obvious the effect. | Integer | No |
faceLifting | Face slimming level, which takes effect if type is face-beautify . Value range: [0,100]. Default value: 70. The higher the value, the more obvious the effect. | Integer | No |
eyeEnlarging | Eye enlarging level, which takes effect if type is face-beautify . Value range: [0,100]. Default value: 70. The higher the value, the more obvious the effect. | Integer | No |
gender | Target gender, which takes effect if type is face-gender-transformation . 0: male to female; 1: female to male. There is no default value. Note that only the gender of the largest face in the image will be swapped. | Integer | Yes |
age | Target age, which takes effect if type is face-age-transformation . Value range: [10, 80]. There is no default value. Note that only the age of the largest face in the image will be changed. | Integer | Yes |
<Response><ResultImage>Base64-encoded image</ResultImage><ResultMask>Base64-encoded file</ResultMask></Response>
Node Name (Keyword) | Parent Node | Description | Type |
Response | None | Response container | Container |
Response
has the following sub-nodes:Node Name (Keyword) | Parent Node | Description | Type |
ResultImage | Response | Base64-encoded result image data | String |
ResultMask | Response | Face cut-out output parameter, which is a Base64-encoded file consisting of floating point numbers after being decoded. These numbers represent pixels in each line starting from the top-left corner of the input image. The value of each number is the grayscale value (0–255) converted from the confidence (0–1) of the body contour. | String |
GET /test.jpg?ci-process=face-effect&type=face-beautify&whitening=70&smoothing=80&faceLifting=70&eyeEnlarging=70 HTTP/1.1Authorization: q-sign-algorithm=sha1&q-ak=AKIDZfbOAo7cllgPvF9cXFrJD0a1ICvR****&q-sign-time=1497530202;1497610202&q-key-time=1497530202;1497610202&q-header-list=&q-url-param-list=&q-signature=28e9a4986df11bed0255e97ff90500557e0e****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-imagex-ci-request-id: NTk0MjdmODlfMjQ4OGY3XzYzYzhf****<Response><ResultImage>Base64-encoded image</ResultImage></Response>
Was this page helpful?