summaryrefslogtreecommitdiff
path: root/data/en_us/facebody
diff options
context:
space:
mode:
authorZhineng Li <im@zhineng.li>2026-07-12 17:11:17 +0800
committerZhineng Li <im@zhineng.li>2026-07-12 17:11:17 +0800
commit1c7f908ce09f98fdcbf79ed2a8ae21be60eaa634 (patch)
tree5f0857666365b7e40cdaa3733ebe1f3ba9e13c67 /data/en_us/facebody
parent7347bac4ab7e136157fc94777e6cf87ef9e08599 (diff)
downloadafterglow-metadata-full-1c7f908ce09f98fdcbf79ed2a8ae21be60eaa634.tar.gz
afterglow-metadata-full-1c7f908ce09f98fdcbf79ed2a8ae21be60eaa634.zip
update APIs 20260712
Diffstat (limited to 'data/en_us/facebody')
-rw-r--r--data/en_us/facebody/2019-12-30/api-docs.php10960
-rw-r--r--data/en_us/facebody/2020-09-10/api-docs.php93
2 files changed, 6467 insertions, 4586 deletions
diff --git a/data/en_us/facebody/2019-12-30/api-docs.php b/data/en_us/facebody/2019-12-30/api-docs.php
index 9a5e65e..3bc7627 100644
--- a/data/en_us/facebody/2019-12-30/api-docs.php
+++ b/data/en_us/facebody/2019-12-30/api-docs.php
@@ -1,211 +1,45 @@
<?php return [
'version' => '1.0',
- 'info' => [
- 'style' => 'RPC',
- 'product' => 'facebody',
- 'version' => '2019-12-30',
- ],
+ 'info' => ['style' => 'RPC', 'product' => 'facebody', 'version' => '2019-12-30'],
'directories' => [
[
- 'id' => 183667,
- 'title' => null,
+ 'children' => ['AddFaceEntity', 'AddFace', 'CreateFaceDb', 'DeleteFace', 'DeleteFaceDb', 'DeleteFaceEntity', 'UpdateFaceEntity', 'SearchFace', 'GetFaceEntity', 'ListFaceEntities', 'ListFaceDbs'],
'type' => 'directory',
- 'children' => [
- 'AddFaceEntity',
- 'AddFace',
- 'CreateFaceDb',
- 'DeleteFace',
- 'DeleteFaceDb',
- 'DeleteFaceEntity',
- 'UpdateFaceEntity',
- 'SearchFace',
- 'GetFaceEntity',
- 'ListFaceEntities',
- 'ListFaceDbs',
- ],
+ 'title' => 'Face search',
],
[
- 'id' => 130136,
- 'title' => null,
+ 'children' => ['AddFaceImageTemplate', 'DeleteFaceImageTemplate', 'QueryFaceImageTemplate', 'BlurFace', 'CompareFace', 'DetectFace', 'DetectLivingFace', 'FaceBeauty', 'EnhanceFace', 'RecognizeFace', 'RecognizePublicFace', 'MergeImageFace'],
'type' => 'directory',
- 'children' => [
- 'AddFaceImageTemplate',
- 'DeleteFaceImageTemplate',
- 'QueryFaceImageTemplate',
- 'BlurFace',
- 'CompareFace',
- 'DetectFace',
- 'DetectLivingFace',
- 'FaceBeauty',
- 'EnhanceFace',
- 'RecognizeFace',
- 'RecognizePublicFace',
- 'MergeImageFace',
- ],
- ],
- [
- 'id' => 130164,
- 'title' => null,
- 'type' => 'directory',
- 'children' => [
- 'BodyPosture',
- 'DetectBodyCount',
- 'DetectPedestrian',
- 'PedestrianDetectAttribute',
- ],
+ 'title' => 'Face',
],
[
- 'id' => 130185,
- 'title' => null,
+ 'children' => ['BodyPosture', 'DetectBodyCount', 'DetectPedestrian', 'PedestrianDetectAttribute'],
'type' => 'directory',
- 'children' => [
- 'GetRealPersonVerificationResult',
- 'GenRealPersonVerificationToken',
- ],
+ 'title' => 'Human body',
],
[
- 'id' => 130188,
- 'title' => null,
+ 'children' => ['GetRealPersonVerificationResult', 'GenRealPersonVerificationToken'],
'type' => 'directory',
- 'children' => [
- 'DetectCelebrity',
- 'DetectVideoLivingFace',
- 'GenerateHumanAnimeStyle',
- 'GenerateHumanSketchStyle',
- 'RecognizeAction',
- 'RecognizeExpression',
- ],
+ 'title' => 'Real-person authentication',
],
[
- 'id' => 130198,
- 'title' => null,
+ 'children' => ['DetectCelebrity', 'DetectVideoLivingFace', 'GenerateHumanAnimeStyle', 'GenerateHumanSketchStyle', 'RecognizeAction', 'RecognizeExpression'],
'type' => 'directory',
- 'children' => [
- 'BatchAddFaces',
- 'ExtractFingerPrint',
- 'LiquifyFace',
- 'MonitorExamination',
- 'RetouchSkin',
- ],
+ 'title' => 'Other recognition',
],
[
- 'id' => 0,
- 'title' => '其它',
+ 'children' => ['BatchAddFaces', 'ExtractFingerPrint', 'LiquifyFace', 'MonitorExamination', 'RetouchSkin', 'CompareFaceWithMask', 'DeepfakeFace', 'DetectInfraredLivingFace'],
'type' => 'directory',
- 'children' => [
- 'CompareFaceWithMask',
- 'DetectInfraredLivingFace',
- 'DeepfakeFace',
- ],
+ 'title' => 'Others',
],
],
'components' => [
'schemas' => [],
],
'apis' => [
- 'AddFaceEntity' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
- 'security' => [
- [
- 'AK' => [],
- ],
- ],
- 'operationType' => 'read',
- 'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'create',
- ],
- 'parameters' => [
- [
- 'name' => 'DbName',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'default',
- ],
- ],
- [
- 'name' => 'EntityId',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'mm2',
- ],
- ],
- [
- 'name' => 'Labels',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => false,
- 'example' => '',
- ],
- ],
- ],
- 'responses' => [
- 200 => [
- 'schema' => [
- 'type' => 'object',
- 'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'DA7CAFEB-0A37-4496-9CDF-E3DBB6309CB2',
- ],
- ],
- ],
- ],
- ],
- 'errorCodes' => [
- 400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
- ],
- 403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
- ],
- 408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
- ],
- 503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
- ],
- ],
- ],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"DA7CAFEB-0A37-4496-9CDF-E3DBB6309CB2\\"\\n}","errorExample":""},{"type":"xml","example":"<RequestId>DA7CAFEB-0A37-4496-9CDF-E3DBB6309CB2</RequestId>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
- ],
'AddFace' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -213,83 +47,44 @@
],
'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'create',
- ],
+ 'systemTags' => ['operationType' => 'create'],
'parameters' => [
[
'name' => 'DbName',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'default',
- ],
+ 'schema' => ['description' => 'Database name. Supports combinations of lowercase letters, digits, and underscores, with a length of 1 to 64 characters.', 'type' => 'string', 'required' => true, 'example' => 'default', 'title' => ''],
],
[
'name' => 'ImageUrl',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'https://viapi-test.oss-cn-shanghai.aliyuncs.com/test/imgsearch/demo/1.png',
- 'isFileTransferUrl' => true,
- ],
+ 'schema' => ['description' => 'URL of the face image. The face must be a frontal, unobstructed face. If multiple faces are included, the largest face is selected for addition. We recommend that you use China (Shanghai) region OSS links. For local files or OSS links in regions other than China (Shanghai), see [File URL Processing](~~155645~~). The URL cannot exceed 1,024 characters in length.', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'https://viapi-test.oss-cn-shanghai.aliyuncs.com/test/imgsearch/demo/1.png', 'title' => ''],
],
[
'name' => 'EntityId',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'U1',
- ],
+ 'schema' => ['description' => 'Entity ID, used to uniquely identify a user, such as a user ID or employee ID. Each entity can contain multiple face images. Supports combinations of uppercase and lowercase letters, digits, and underscores, with a length of 1 to 64 characters.', 'type' => 'string', 'required' => true, 'example' => 'U1', 'title' => ''],
],
[
'name' => 'ExtraData',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => false,
- 'example' => '',
- ],
+ 'schema' => ['description' => 'Custom information. Supports letters, digits, punctuation marks, and Chinese characters. Must not exceed 512 characters.', 'type' => 'string', 'required' => false, 'example' => '王小二', 'title' => ''],
],
[
'name' => 'QualityScoreThreshold',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'required' => false,
- 'example' => '50.0',
- ],
+ 'schema' => ['description' => 'Quality score threshold. The system performs quality analysis on the new face image. If the quality score is lower than this threshold, the face image quality does not meet the requirements and the addition fails. Valid values: \\[0.0, 100.0]. A value of 0.0 or empty indicates that no quality score evaluation is performed.', 'type' => 'number', 'format' => 'float', 'required' => false, 'example' => '50.0', 'title' => ''],
],
[
'name' => 'SimilarityScoreThresholdInEntity',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'required' => false,
- 'example' => '50.0',
- ],
+ 'schema' => ['description' => 'Intra-entity similarity threshold. The new face image is compared with existing faces within the **EntityId**. If the similarity score is lower than this threshold, the face image differs significantly from other face images, and the addition fails. If no faces exist within the **EntityId**, the addition succeeds. Valid values: \\[0.0, 100.0]. A value of 0.0 or empty indicates that no intra-entity similarity evaluation is performed. For reference values, see the **Thresholds** field in the response of the [Face Comparison 1:1](~~151891~~) operation.', 'type' => 'number', 'format' => 'float', 'required' => false, 'example' => '50.0', 'title' => ''],
],
[
'name' => 'SimilarityScoreThresholdBetweenEntity',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'required' => false,
- 'example' => '50.0',
- ],
+ 'schema' => ['description' => 'Inter-entity similarity threshold. The new face image is compared with existing faces across all other **EntityId** values. If the similarity score is greater than or equal to this threshold, it indicates that similar faces exist under other **EntityId** values, meaning duplicates are detected, and the addition fails. Valid values: \\[0.0, 100.0]. A value of 0.0 or empty indicates that no inter-entity similarity evaluation is performed. For reference values, see the **Thresholds** field in the response of the [Face Comparison 1:1](~~151891~~) operation.'."\n"
+ ."\n"
+ .'> The inter-entity similarity threshold check applies only to the first face image uploaded under each EntityId.', 'type' => 'number', 'format' => 'float', 'required' => false, 'example' => '50.0', 'title' => ''],
],
],
'responses' => [
@@ -298,70 +93,120 @@
'description' => '1',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '2B93C43A-F824-40C8-AF79-844342B0F43A',
- ],
+ 'RequestId' => ['description' => 'Request ID.', 'type' => 'string', 'example' => '2B93C43A-F824-40C8-AF79-844342B0F43A', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned result data.',
'type' => 'object',
'properties' => [
- 'FaceId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '5',
- ],
- 'QualitieScore' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '99.79581',
- ],
+ 'FaceId' => ['description' => 'The output face ID.', 'type' => 'string', 'example' => '5', 'title' => ''],
+ 'QualitieScore' => ['description' => 'The quality score of the face in the input image.', 'type' => 'number', 'format' => 'float', 'example' => '99.79581', 'title' => ''],
],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'title' => '',
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable.'],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"2B93C43A-F824-40C8-AF79-844342B0F43A\\",\\n \\"Data\\": {\\n \\"FaceId\\": \\"5\\",\\n \\"QualitieScore\\": 99.79581\\n }\\n}","type":"json"}]',
+ 'title' => 'Add Face Data',
+ 'summary' => 'This topic describes the syntax and examples of the AddFace operation for adding face data.',
+ 'description' => '## Feature Description'."\n"
+ .'The Add Face Data feature enables you to add face data to a specified database. A single face database supports up to 50,000 face images. Face data is added to pre-created face entities, and each face entity supports up to 5 face images.'."\n"
+ .'The maximum number of face images in the database and the maximum number of images per face entity cannot be expanded.'."\n"
+ ."\n\n"
+ .'> - You can access [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for online assistance.'."\n"
+ .'- For questions about Alibaba Cloud Visual Intelligence Open Platform visual AI capability API access, API usage, or consultation, search for DingTalk group 23109592 to join the Alibaba Cloud Visual Intelligence Open Platform consultation group and contact us.'."\n"
+ ."\n"
+ .'## Access Guide'."\n"
+ .'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete account registration.'."\n"
+ .'2. Activate the service: Make sure you have activated the [Face and Body service](https://vision.aliyun.com/facebody). If the service is not activated, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open).'."\n"
+ ."\n"
+ .'><notice>'."\n"
+ .'This feature can be activated by enterprise or individual verified users. For more information about identity verification, see [Identity Verification](https://help.aliyun.com/knowledge_list/37170.html).'."\n"
+ .'></notice>'."\n"
+ ."\n"
+ .'3. Create an AccessKey: Make sure you have [created an AccessKey](~~175144~~). If you are using a RAM user AccessKey, you need to grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM Authorization](~~145025~~).'."\n"
+ .'4. Prerequisites:'."\n"
+ .'- You have created a database name (DbName) by calling the [Create Face Database](~~159141~~) (CreateFaceDb) operation.'."\n"
+ .'- You have created an entity ID (EntityId) by calling the [Add Face Entity](~~161144~~) (AddFaceEntity) operation.'."\n"
+ ."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/facebody/2019-12-30/AddFace?lang=JAVA) to debug the feature online, view complete sample code and SDK dependency information, and download the complete project.'."\n"
+ .'5. Development access steps:'."\n"
+ .'- Select the SDK language you want to use in [SDK Overview](~~145033~~).'."\n"
+ .'- Find the SDK package for the AI category Face and Body (facebody) in the corresponding language SDK documentation and install it.'."\n"
+ .'- Modify the sample code provided in the documentation as needed and make the call.'."\n"
+ ."\n"
+ .'6. Sample code: For sample code of this feature in commonly used languages, see [Add Face Data Sample Code](~~477964~~).'."\n"
+ ."\n"
+ .'7. Client-side direct calls: Common client-side call methods for this feature include the following.'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from mini programs](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~)'."\n"
+ ."\n"
+ .'## Input Limits'."\n"
+ .'- Image format: JPG, JPEG, PNG.'."\n"
+ .'- Image size: No larger than 5 MB.'."\n"
+ .'- Image resolution: Greater than 32 × 32 pixels and less than 4,096 × 4,096 pixels. The face area must be at least 64 × 64 pixels.'."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ .'- If the image contains multiple faces, the largest face is selected for addition.'."\n"
+ ."\n"
+ .'>When the image resolution exceeds the maximum limit, please resize the image first. For more information, see [Image Resizing](~~44688~~). '."\n"
+ ."\n"
+ .'## Rate Limiting'."\n"
+ .'The Add Face Data operation has a default concurrency limit of 2 QPS.'."\n"
+ ."\n"
+ .'## Billing Description'."\n"
+ .'The Add Face Data feature is free of charge.',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK Reference'."\n"
+ .'For the Add Face Data feature under the Alibaba Cloud Visual AI Face and Body category, we recommend that you use the SDK for calls. The SDK supports multiple programming languages. When making calls, select the SDK package for the AI category Face and Body (facebody). File parameters can be passed as local files or arbitrary URLs through SDK calls. For more information, see [SDK Overview](~~145033~~).'."\n"
+ ."\n"
+ .'## Sample Code'."\n"
+ .'For sample code of this feature in commonly used languages, see [Add Face Data Sample Code](~~477964~~).',
+ 'extraInfo' => '## Error Codes'."\n"
+ .'For error codes of the Add Face Data operation, see [Common Error Codes](~~146756~~).'."\n"
+ ."\n"
+ .'## Security Statement'."\n"
+ .'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically cleaned up and deleted by the system after 24 hours.'."\n"
+ .'- The platform does not store original face images or file information involved in the use of the service.'."\n"
+ .'- The platform freezes face feature vector data for users who have not made API service calls for more than 6 months to ensure the information security of customers with no service calls. To unfreeze, contact us through DingTalk group 23109592.',
+ 'changeSet' => [],
+ 'ramActions' => [
+ [
+ 'operationType' => 'create',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:AddFace',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"2B93C43A-F824-40C8-AF79-844342B0F43A\\",\\n \\"Data\\": {\\n \\"FaceId\\": \\"5\\",\\n \\"QualitieScore\\": 99.79581\\n }\\n}","errorExample":""},{"type":"xml","example":"<AddFaceResponse>\\n <RequestId>2B93C43A-F824-40C8-AF79-844342B0F43A</RequestId>\\n <Data>\\n <FaceId>5</FaceId>\\n <QualitieScore>99.79581</QualitieScore>\\n </Data>\\n</AddFaceResponse>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
],
- 'CreateFaceDb' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'AddFaceEntity' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -369,19 +214,24 @@
],
'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'create',
- ],
+ 'systemTags' => ['operationType' => 'create'],
'parameters' => [
[
- 'name' => 'Name',
+ 'name' => 'DbName',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'default',
- ],
+ 'schema' => ['description' => 'The name of the database.', 'type' => 'string', 'required' => true, 'example' => 'default', 'title' => ''],
+ ],
+ [
+ 'name' => 'EntityId',
+ 'in' => 'formData',
+ 'schema' => ['description' => 'The entity ID. The ID can contain digits, letters, and underscores.', 'type' => 'string', 'required' => true, 'example' => 'mm2', 'title' => ''],
+ ],
+ [
+ 'name' => 'Labels',
+ 'in' => 'formData',
+ 'schema' => ['description' => 'The custom labels. You can add up to 10 labels with a total length of no more than 1,024 characters. The format requirements are as follows:'."\n"
+ .'- Labels can contain only underscores (_) and hyphens (-). Other special characters are not supported.'."\n"
+ .'- Separate multiple labels with commas (,).', 'type' => 'string', 'required' => false, 'example' => '视觉智能', 'title' => ''],
],
],
'responses' => [
@@ -389,137 +239,269 @@
'schema' => [
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '818D24A6-E368-46B3-99C5-3CF36D98CCA3',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => 'DA7CAFEB-0A37-4496-9CDF-E3DBB6309CB2', 'title' => ''],
],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable.'],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"DA7CAFEB-0A37-4496-9CDF-E3DBB6309CB2\\"\\n}","type":"json"}]',
+ 'title' => 'Add face entity',
+ 'summary' => 'This topic describes the syntax and examples of the AddFaceEntity operation.',
+ 'description' => '## Description'."\n"
+ .'The AddFaceEntity operation adds face entity data to a face database. Face entity data uniquely identifies a user, such as a user ID or employee ID.'."\n"
+ ."\n"
+ .'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for online assistance.'."\n"
+ .'- To consult about the integration, usage, or issues of visual AI APIs on Alibaba Cloud Vision Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Getting started'."\n"
+ .'1. Create an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to create an account.'."\n"
+ .'2. Activate the service: Make sure you have activated the [Face and Body service](https://vision.aliyun.com/facebody). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open).'."\n"
+ ."\n"
+ .'><notice>'."\n"
+ .'This feature is available to enterprise users or users who have completed verify your identity - Individual account. For more information about identity verification, see [Identity verification](https://help.aliyun.com/knowledge_list/37170.html).'."\n"
+ .'></notice>'."\n"
+ ."\n"
+ .'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using an AccessKey pair of a RAM user, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Before you begin: Create a database name (DbName) by invoking the [CreateFaceDb](~~159141~~) operation.'."\n"
+ ."\n"
+ .'5. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/facebody/2019-12-30/AddFaceEntity?lang=JAVA) to debug this operation online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'6. Integration steps:'."\n"
+ .'- Select the SDK language you want to use from [SDK overview](~~145033~~).'."\n"
+ .'- Find the SDK package for the Face and Body category (facebody) in the corresponding SDK documentation and install it.'."\n"
+ .'- Modify the sample code provided in the References as needed and invoke the operation.'."\n"
+ ."\n"
+ .'7. Sample code: For sample code in commonly used languages, see [AddFaceEntity sample code](~~477933~~).'."\n"
+ ."\n"
+ .'8. Direct client calls: Common client call methods for this feature include the following:'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from mini programs](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Limits'."\n"
+ .'- Each face database supports a maximum of 50,000 face features and cannot be scaled. A face entity and its labels are combined as one face feature.'."\n"
+ .'- Each face entity supports a maximum of 10 labels and cannot be scaled.'."\n"
+ .'- The default concurrency for the AddFaceEntity operation is 2 QPS.'."\n"
+ ."\n"
+ .'## Billing'."\n"
+ .'The AddFaceEntity operation is free of charge.',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'We recommend that you use an SDK to call the AddFaceEntity operation under the Face and Body category of Alibaba Cloud Vision AI. The SDK supports multiple programming languages. When calling the operation, select the SDK package for the Face and Body category (facebody). File parameters support local files and arbitrary URLs through SDK calls. For more information, see [SDK overview](~~145033~~).'."\n"
+ ."\n"
+ .'## Sample code'."\n"
+ .'For sample code in commonly used languages, see [AddFaceEntity sample code](~~477933~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of the AddFaceEntity operation, see [Common error codes](~~146756~~).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Ensure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging console are valid for 1 hour and are automatically deleted by the system after 24 hours.'."\n"
+ .'- The platform does not store original face images or file information involved during service usage.'."\n"
+ .'- The platform freezes characteristic vector data of face features for users who have not made any API invocation for 6 months or more to ensure the information security of inactive users. To unfreeze data, contact us through the DingTalk group (23109592).',
+ 'changeSet' => [],
+ 'ramActions' => [
+ [
+ 'operationType' => 'create',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:AddFaceEntity',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"818D24A6-E368-46B3-99C5-3CF36D98CCA3\\"\\n}","errorExample":""},{"type":"xml","example":"<RequestId>818D24A6-E368-46B3-99C5-3CF36D98CCA3</RequestId>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
],
- 'DeleteFace' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'AddFaceImageTemplate' => [
+ 'summary' => 'This topic describes the syntax and examples of AddFaceImageTemplate for adding face image templates for face fusion.',
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
- 'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'delete',
- ],
+ 'systemTags' => ['operationType' => 'create'],
'parameters' => [
[
- 'name' => 'DbName',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'default',
- ],
- ],
- [
- 'name' => 'FaceId',
+ 'name' => 'ImageURL',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => '001',
- ],
+ 'schema' => ['description' => 'The URL of the face template image. We recommend that you use an Object Storage Service (OSS) URL in the Shanghai region. If the file is stored locally or the OSS URL is not in the Shanghai region, see [File URL processing](~~155645~~).'."\n"
+ .'Input limits:'."\n"
+ .'- Image format: JPG, JPEG, or PNG.'."\n"
+ .'- Image size: up to 20 MB.'."\n"
+ .'- Image resolution: at least 128 × 128 pixels and at most 2000 × 2000 pixels. The longest side must be at most 2000 pixels.'."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ .'- Multi-person images are supported. We recommend that the number of faces in the image does not exceed 5.', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'https://invi-label.oss-cn-shanghai.aliyuncs.com/label/temp/faceswap/img_facefusion/template/sucai1.jpg', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
+ 'title' => '',
+ 'description' => 'Schema of Response',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'FAC90D32-2F04-5AD4-B94B-BAA163AB3724',
+ 'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '798A721D-7C7F-4D87-A125-1D04B3055C2C'],
+ 'Data' => [
+ 'description' => 'The returned data.',
+ 'type' => 'object',
+ 'properties' => [
+ 'TemplateId' => ['description' => 'The template ID.', 'type' => 'string', 'example' => '6cd509ea-54fa-4730-8e9d-c94cadcda048', 'title' => ''],
+ 'FaceInfos' => [
+ 'description' => 'The face IDs and position information returned when the input image contains multiple faces.'."\n"
+ ."\n"
+ .'> The FaceInfos parameter is returned only in multi-face scenarios.',
+ 'type' => 'array',
+ 'items' => [
+ 'description' => 'The face IDs and position information returned when the input image contains multiple faces.'."\n"
+ ."\n"
+ .'> The FaceInfos parameter is returned only in multi-face scenarios.',
+ 'type' => 'object',
+ 'properties' => [
+ 'TemplateFaceID' => ['description' => 'The sub-template ID corresponding to the face.', 'type' => 'string', 'example' => 'string 6cd509ea-54fa-4730-8e9d-c94cadcda048_0', 'title' => ''],
+ 'FaceRect' => [
+ 'description' => 'The position information of the face.',
+ 'type' => 'object',
+ 'properties' => [
+ 'X' => ['description' => 'The x-coordinate of the upper-left corner of the face bounding box.', 'type' => 'string', 'example' => '254', 'title' => ''],
+ 'Y' => ['description' => 'The y-coordinate of the upper-left corner of the face bounding box.', 'type' => 'string', 'example' => '318', 'title' => ''],
+ 'Height' => ['description' => 'The height of the face bounding box.', 'type' => 'string', 'example' => '94', 'title' => ''],
+ 'Width' => ['description' => 'The width of the face bounding box.', 'type' => 'string', 'example' => '89', 'title' => ''],
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ ],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable.'],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"798A721D-7C7F-4D87-A125-1D04B3055C2C\\",\\n \\"Data\\": {\\n \\"TemplateId\\": \\"6cd509ea-54fa-4730-8e9d-c94cadcda048\\",\\n \\"FaceInfos\\": [\\n {\\n \\"TemplateFaceID\\": \\"string 6cd509ea-54fa-4730-8e9d-c94cadcda048_0\\",\\n \\"FaceRect\\": {\\n \\"X\\": \\"254\\",\\n \\"Y\\": \\"318\\",\\n \\"Height\\": \\"94\\",\\n \\"Width\\": \\"89\\"\\n }\\n }\\n ]\\n }\\n}","type":"json"}]',
+ 'title' => 'Add a face image template',
+ 'description' => '## Description'."\n"
+ .'The face image template addition feature allows you to add face images that have passed content moderation as template images for the face fusion feature.'."\n"
+ ."\n"
+ .'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for online assistance.'."\n"
+ .'- To consult about Alibaba Cloud Vision Intelligence Open Platform visual AI API integration, API usage, or other issues, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Getting started'."\n"
+ .'1. Create an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete account registration.'."\n"
+ .'2. Activate the service: Make sure you have activated the [Face and Body service](https://vision.aliyun.com/facebody). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open).'."\n"
+ .'><notice>'."\n"
+ .'This feature is available only to users who have completed verify your identity - Enterprise account. For more information about real-name verification, see [Real-name verification](https://help.aliyun.com/knowledge_list/37170.html).'."\n"
+ .'></notice>'."\n"
+ ."\n"
+ .'3. Create an AccessKey: Make sure you have [created an AccessKey](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ ."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/facebody/2019-12-30/AddFaceImageTemplate?lang=JAVA&sdkStyle=old&params=%7B%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development integration steps:'."\n"
+ .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
+ .'- Find the SDK package for the Face and Body (facebody) AI category in the corresponding SDK documentation and install it.'."\n"
+ .'- Modify the sample code provided in the References as needed and invoke it.'."\n"
+ ."\n"
+ .'6. Sample code: For sample code in commonly used languages, see [Face image template increase sample code](~~478119~~).'."\n"
+ ."\n"
+ .'7. Direct client calls: Common client call methods for this feature include the following.'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from mini programs](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Input limits'."\n"
+ .'- Image format: JPG, JPEG, or PNG.'."\n"
+ .'- Image size: up to 20 MB.'."\n"
+ .'- Image resolution: at least 128 × 128 pixels and at most 2000 × 2000 pixels. The longest side must be at most 2000 pixels.'."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ .'- Multi-person images are supported. We recommend that the number of faces in the image does not exceed 5.'."\n"
+ .'- There is no limit on the number of templates you can add.'."\n"
+ ."\n"
+ .'## Image quality recommendations'."\n"
+ .'- Ensure that the faces in the image are clear. The face size should be at least 64 × 64 pixels, and the face region should not exceed 2/3 of the total image area.'."\n"
+ .'- Ensure that the facial features are complete and not significantly occluded. The face fusion algorithm supports faces turned at certain angles, and achieves better results when the angle does not exceed 30 degrees.'."\n"
+ ."\n"
+ .'Recommended image examples:'."\n"
+ .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20221114/jris/MergeImageFacetuijian.png" width="300)'."\n"
+ .'Not recommended image examples:'."\n"
+ .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20221114/rkbx/MergeImageFacebutuijian.png" width="300).'."\n"
+ ."\n"
+ .'## Billing'."\n"
+ .'The face image template addition feature is free of charge.',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'We recommend that you use an SDK to call the AddFaceImageTemplate operation in the Face and Body category of Alibaba Cloud Vision AI. SDKs are available in multiple programming languages. When making the call, select the SDK package for the Face and Body (facebody) AI category. File parameters support local files and arbitrary URLs through SDK calls. For more information, see [SDK overview](~~145033~~).'."\n"
+ ."\n"
+ .'## Sample code'."\n"
+ .'For sample code in commonly used languages, see [AddFaceImageTemplate sample code](~~478119~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of AddFaceImageTemplate, see [Common error codes](~~146756~~).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Ensure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging console are valid for 1 hour and are automatically deleted by the system after 24 hours.',
+ 'changeSet' => [],
+ 'ramActions' => [
+ [
+ 'operationType' => 'create',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:AddFaceImageTemplate',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"FAC90D32-2F04-5AD4-B94B-BAA163AB3724\\"\\n}","errorExample":""},{"type":"xml","example":"<DeleteFaceResponse>\\n <RequestId>FAC90D32-2F04-5AD4-B94B-BAA163AB3724</RequestId>\\n</DeleteFaceResponse>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
],
- 'DeleteFaceDb' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'BatchAddFaces' => [
+ 'summary' => 'This topic describes the syntax and examples of BatchAddFaces for batch adding face data.',
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -527,73 +509,201 @@
],
'operationType' => 'write',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'delete',
- ],
+ 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free', 'tenantRelevance' => 'publicInformation'],
'parameters' => [
[
- 'name' => 'Name',
+ 'name' => 'DbName',
+ 'in' => 'formData',
+ 'schema' => ['description' => 'The name of the database. The name can contain lowercase letters, digits, and underscores (_), and must be 1 to 64 characters in length.', 'type' => 'string', 'required' => true, 'example' => 'default', 'title' => ''],
+ ],
+ [
+ 'name' => 'EntityId',
'in' => 'formData',
+ 'schema' => ['description' => 'The entity ID, which is used to identify the uniqueness of a user, such as a user ID or employee ID. Each entity can contain multiple face images. The ID can contain uppercase letters, lowercase letters, digits, and underscores (_), and must be 1 to 64 characters in length.', 'type' => 'string', 'required' => true, 'example' => 'U1', 'title' => ''],
+ ],
+ [
+ 'name' => 'SimilarityScoreThresholdInEntity',
+ 'in' => 'formData',
+ 'schema' => ['description' => 'The intra-entity similarity threshold. The new face image is compared with existing faces within the **EntityId**. If the similarity score is less than this threshold, the face image is considered too different from the other face images and the addition fails. If no faces exist within the **EntityId**, the addition succeeds. Valid values: \\[0.0,100.0]. A value of 0.0 or empty indicates that the intra-entity similarity check logic is not performed. For reference values, see the **Thresholds** field in the response of the [CompareFace](~~151891~~) operation.', 'type' => 'number', 'format' => 'float', 'required' => false, 'example' => '50.0', 'title' => ''],
+ ],
+ [
+ 'name' => 'SimilarityScoreThresholdBetweenEntity',
+ 'in' => 'formData',
+ 'schema' => ['description' => 'The inter-entity similarity threshold. The new face image is compared with existing faces in all other **EntityId** values. If the similarity score is greater than or equal to this threshold, a similar face exists in another **EntityId**, indicating duplication, and the addition fails. Valid values: \\[0.0,100.0]. A value of 0.0 or empty indicates that the inter-entity similarity check logic is not performed. For reference values, see the **Thresholds** field in the response of the [CompareFace](~~151891~~) operation.'."\n"
+ ."\n"
+ .'> The inter-entity similarity threshold check applies only to the first face image uploaded under each EntityId.', 'type' => 'number', 'format' => 'float', 'required' => false, 'example' => '50.0', 'title' => ''],
+ ],
+ [
+ 'name' => 'Faces',
+ 'in' => 'formData',
+ 'style' => 'json',
'schema' => [
- 'description' => '',
- 'type' => 'string',
+ 'description' => 'The face information.',
+ 'type' => 'array',
+ 'items' => [
+ 'description' => '1',
+ 'type' => 'object',
+ 'properties' => [
+ 'ExtraData' => ['description' => 'The custom information. The value can contain letters, digits, punctuation marks, and Chinese characters. The maximum length is 512 characters.', 'type' => 'string', 'required' => false, 'example' => '王小二', 'title' => ''],
+ 'ImageURL' => ['description' => 'The URL of the face image. The face must be a frontal, unoccluded, single-person face. We recommend that you use an OSS URL from the China (Shanghai) region. For files stored locally or OSS URLs from regions other than China (Shanghai), see [File URL Processing](~~155645~~). The maximum URL length is 1024 characters.', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'https://viapi-test.oss-cn-shanghai.aliyuncs.com/test/imgsearch/demo/1.png', 'title' => ''],
+ ],
+ 'required' => false,
+ 'title' => '',
+ 'example' => '',
+ ],
'required' => true,
- 'example' => 'default',
+ 'maxItems' => 5,
+ 'title' => '',
+ 'example' => '',
],
],
+ [
+ 'name' => 'QualityScoreThreshold',
+ 'in' => 'formData',
+ 'schema' => ['description' => 'The quality score threshold. A quality analysis is performed on the new face image. If the quality score is less than this threshold, the face image quality does not meet the requirements and the addition fails. Valid values: \\[0.0,100.0]. A value of 0.0 or empty indicates that the quality score check logic is not performed.', 'type' => 'number', 'format' => 'float', 'required' => false, 'example' => '50.0', 'title' => ''],
+ ],
],
'responses' => [
200 => [
'schema' => [
+ 'title' => '',
+ 'description' => '1',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '203AE658-CFE1-507D-B105-F88CD1F1F71B',
+ 'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => 'C46A46D0-3263-181A-A1EE-0901E4595390'],
+ 'Data' => [
+ 'description' => 'The returned result data.',
+ 'type' => 'object',
+ 'properties' => [
+ 'InsertedFaces' => [
+ 'description' => 'The results of successfully added records.',
+ 'type' => 'array',
+ 'items' => [
+ 'description' => '1',
+ 'type' => 'object',
+ 'properties' => [
+ 'ImageURL' => ['description' => 'The face image URL, which is the same as the input ImageUrl and is used to identify the image record.', 'type' => 'string', 'example' => 'https://viapi-test.oss-cn-shanghai.aliyuncs.com/test/imgsearch/demo/xxxx.png', 'title' => ''],
+ 'FaceId' => ['description' => 'The output face ID.', 'type' => 'string', 'example' => '16350536', 'title' => ''],
+ 'QualitieScore' => ['description' => 'The quality score of the face in the input image.', 'type' => 'number', 'format' => 'float', 'example' => '99.79581', 'title' => ''],
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'FailedFaces' => [
+ 'description' => 'The results of records that failed to be added.',
+ 'type' => 'array',
+ 'items' => [
+ 'description' => '1',
+ 'type' => 'object',
+ 'properties' => [
+ 'ImageURL' => ['description' => 'The face image URL, which is the same as the input ImageUrl and is used to identify the image record.', 'type' => 'string', 'example' => 'https://viapi-test.oss-cn-shanghai.aliyuncs.com/test/imgsearch/demo/xxxx.png', 'title' => ''],
+ 'Code' => ['description' => 'The error code.', 'type' => 'string', 'example' => 'ClientError.IllegalArgument', 'title' => ''],
+ 'Message' => ['description' => 'The error message.', 'type' => 'string', 'example' => 'not found the db=test', 'title' => ''],
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ ],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable.'],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"C46A46D0-3263-181A-A1EE-0901E4595390\\",\\n \\"Data\\": {\\n \\"InsertedFaces\\": [\\n {\\n \\"ImageURL\\": \\"https://viapi-test.oss-cn-shanghai.aliyuncs.com/test/imgsearch/demo/xxxx.png\\",\\n \\"FaceId\\": \\"16350536\\",\\n \\"QualitieScore\\": 99.79581\\n }\\n ],\\n \\"FailedFaces\\": [\\n {\\n \\"ImageURL\\": \\"https://viapi-test.oss-cn-shanghai.aliyuncs.com/test/imgsearch/demo/xxxx.png\\",\\n \\"Code\\": \\"ClientError.IllegalArgument\\",\\n \\"Message\\": \\"not found the db=test\\"\\n }\\n ]\\n }\\n}","type":"json"}]',
+ 'title' => 'Batch Add Face Data',
+ 'description' => '## Feature Description'."\n"
+ .'The Batch Add Face Data feature allows you to batch add face data to existing face samples. Each face sample can contain up to 5 face photos, so a maximum of 5 face photos can be added in a single batch operation.'."\n"
+ ."\n"
+ .'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) to get online assistance.'."\n"
+ .'- For API integration, usage, or inquiries about Visual AI capabilities on the Alibaba Cloud Visual Intelligence Open Platform, join DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Integration Guide'."\n"
+ .'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete the registration.'."\n"
+ .'2. Activate the service: Make sure you have activated the [Face and Body service](https://vision.aliyun.com/facebody). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open).'."\n"
+ ."\n"
+ .'><notice>'."\n"
+ .'This feature is available to enterprise or individual verified users. For more information about identity verification, see [Identity Verification](https://help.aliyun.com/knowledge_list/37170.html).'."\n"
+ .'></notice>'."\n"
+ ."\n"
+ .'3. Create an AccessKey: Make sure you have [created an AccessKey](~~175144~~). If you are using a RAM user AccessKey, you need to grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM Authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/facebody/2019-12-30/BatchAddFaces?lang=JAVA) to debug the feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development integration steps:'."\n"
+ .'- Select the SDK language you want to use from the [SDK Overview](~~145033~~).'."\n"
+ .'- Find and install the SDK package with the AI category of Face and Body (facebody) in the corresponding language SDK documentation.'."\n"
+ .'- Modify and call the sample code provided in the documentation.'."\n"
+ ."\n"
+ .'6. Client-side direct calls: The following are common client-side call methods for this feature.'."\n"
+ .'- [Direct call from Web frontend](~~467779~~)'."\n"
+ .'- [Direct call in mini program scenarios](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~)'."\n"
+ ."\n"
+ .'## Input Limits'."\n"
+ .'- Image format: JPG, JPEG, PNG, BMP.'."\n"
+ .'- Image size: No larger than 5 MB.'."\n"
+ .'- Image resolution: Greater than 32×32 pixels and less than 4096×4096 pixels. The face area must be no less than 64×64 pixels.'."\n"
+ .'- The URL must not contain Chinese characters.'."\n"
+ ."\n"
+ .'> If the image resolution exceeds the maximum limit, resize the image first. For more information, see [Image Resizing](~~44688~~).'."\n"
+ ."\n"
+ .'## Throttling'."\n"
+ .'The default concurrency limit for the Batch Add Face Data operation is 2 QPS.'."\n"
+ ."\n"
+ .'## Billing'."\n"
+ .'The Batch Add Face Data feature is free of charge.',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK Reference'."\n"
+ .'For the Batch Add Face Data feature under the Face and Body category of Alibaba Cloud Visual AI, we recommend using SDK calls. Multiple programming languages are supported. When making calls, select the SDK package with the AI category of Face and Body (facebody). File parameters support local files and any URL through SDK calls. For more information, see [SDK Overview](~~145033~~).',
+ 'extraInfo' => '## Error Codes'."\n"
+ .'For error codes related to Batch Add Face Data, see [Common Error Codes](~~146756~~).'."\n"
+ ."\n"
+ .'## Security Statement'."\n"
+ ."\n"
+ .'- Ensure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging experience are valid for 1 hour and will be automatically cleaned up and deleted by the system after 24 hours.'."\n"
+ .'- The platform does not store the original face images or file information involved in the user\'s use of the service.'."\n"
+ .'- The platform freezes the face feature vector data of users who have not made any API service calls for 6 months or more to ensure the information security of customers with no service calls. To unfreeze, contact us through DingTalk group (23109592).',
+ 'changeSet' => [],
+ 'ramActions' => [
+ [
+ 'operationType' => 'none',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:BatchAddFaces',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"203AE658-CFE1-507D-B105-F88CD1F1F71B\\"\\n}","errorExample":""},{"type":"xml","example":"<DeleteFaceDbResponse>\\n <RequestId>203AE658-CFE1-507D-B105-F88CD1F1F71B</RequestId>\\n</DeleteFaceDbResponse>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
],
- 'DeleteFaceEntity' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'BlurFace' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -601,29 +711,12 @@
],
'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'delete',
- ],
+ 'systemTags' => [],
'parameters' => [
[
- 'name' => 'DbName',
+ 'name' => 'ImageURL',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'default',
- ],
- ],
- [
- 'name' => 'EntityId',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'wood',
- ],
+ 'schema' => ['description' => 'The URL of the image. We recommend that you use an OSS URL in the Shanghai region. If the file is stored locally or in an OSS bucket outside the Shanghai region, see [File URL Processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/BlurFace/BlurFace1.png', 'title' => ''],
],
],
'responses' => [
@@ -631,53 +724,106 @@
'schema' => [
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'DA7CAFEB-0A37-4496-9CDF-E3DBB6309CB2',
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '4C6080B0-64C4-488E-BBA6-245749CA11AD', 'title' => ''],
+ 'Data' => [
+ 'description' => 'The result data.',
+ 'type' => 'object',
+ 'properties' => [
+ 'ImageURL' => ['description' => 'The URL of the de-identified image.'."\n"
+ .'> This URL is a temporary URL that is valid for 30 minutes. After it expires, the URL is no longer accessible. To store the file for an extended period or permanently, access the URL within 30 minutes, download the file, and save it to your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://viapi-cn-shanghai-dha-segmenter.oss-cn-shanghai.aliyuncs.com/upload/result_FaceBlur/2020-8-5/invi_FaceBlur_015966077063461060948_IBdDsq.jpg?Expires=1596609506&OSSAccessKeyId=LTAI****************&Signature=x8n3jq1X91Sq7BKWE4vRHSu6g9****', 'title' => ''],
+ 'MaskURL' => ['description' => 'The mask URL of the de-identified image.'."\n"
+ .'> This URL is a temporary URL that is valid for 30 minutes. After it expires, the URL is no longer accessible. To store the file for an extended period or permanently, access the URL within 30 minutes, download the file, and save it to your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://vibktprfx-prod-prod-aic-gd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/person-image-cartoonizer/59697D68-2A6E-4553-89BD-0FADD07881E8_7ee5_20201027-070958.jpg?Expires=1603784400&OSSAccessKeyId=LTAI****************&Signature=ut2kn46Lz%2FRwqJ9jWJ0RBDut12****', 'title' => ''],
+ ],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable.'],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"4C6080B0-64C4-488E-BBA6-245749CA11AD\\",\\n \\"Data\\": {\\n \\"ImageURL\\": \\"http://viapi-cn-shanghai-dha-segmenter.oss-cn-shanghai.aliyuncs.com/upload/result_FaceBlur/2020-8-5/invi_FaceBlur_015966077063461060948_IBdDsq.jpg?Expires=1596609506&OSSAccessKeyId=LTAI****************&Signature=x8n3jq1X91Sq7BKWE4vRHSu6g9****\\",\\n \\"MaskURL\\": \\"http://vibktprfx-prod-prod-aic-gd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/person-image-cartoonizer/59697D68-2A6E-4553-89BD-0FADD07881E8_7ee5_20201027-070958.jpg?Expires=1603784400&OSSAccessKeyId=LTAI****************&Signature=ut2kn46Lz%2FRwqJ9jWJ0RBDut12****\\"\\n }\\n}","type":"json"}]',
+ 'title' => 'Face de-identification',
+ 'summary' => 'This topic describes the syntax and provides examples of the face de-identification feature (BlurFace).',
+ 'description' => '## Feature description'."\n"
+ .'The face de-identification feature blurs faces in input images and returns the de-identified images.'."\n"
+ ."\n"
+ .'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for online assistance.'."\n"
+ .'- You can try this feature for free on the China Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=BlurFace) to experience this feature or purchase it online.'."\n"
+ .'- For questions about API integration or usage of Alibaba Cloud Vision Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Integration guide'."\n"
+ .'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete registration.'."\n"
+ .'2. Activate the service: Make sure you have activated the [Face and Body service](https://vision.aliyun.com/facebody). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open).'."\n"
+ .'> This feature is available to enterprise users or users who have completed verify your identity - Individual account. For more information about identity verification, see [Identity Verification](https://help.aliyun.com/knowledge_list/37170.html).'."\n"
+ .'3. Create an AccessKey: Make sure you have [created an AccessKey](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/facebody/2019-12-30/BlurFace?lang=JAVA&sdkStyle=dara&params=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Ffacebody%2FBlurFace%2FBlurFace1.png%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development integration steps:'."\n"
+ .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
+ .'- Find and install the SDK package for the Face and Body (facebody) category in the corresponding SDK documentation.'."\n"
+ .'- Modify the sample code provided in the References as needed and invoke the API.'."\n"
+ ."\n"
+ .'6. Direct client calls: Common client call methods for this feature include the following.'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from mini programs](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Input limits'."\n"
+ ."\n"
+ .'- Image format: JPEG, JPG, PNG, or BMP.'."\n"
+ .'- Image size: up to 3 MB.'."\n"
+ .'- Image resolution: greater than 32 × 32 pixels and less than 2000 × 2000 pixels.'."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ ."\n"
+ .'> If the image resolution exceeds the maximum limit, resize the image first. For more information, see [Image Resizing](~~44688~~).'."\n"
+ ."\n"
+ .'## Billing description'."\n"
+ .'For information about the billable methods and pricing of face de-identification, see [Billing](~~184049~~).'."\n"
+ .'> The debugging operation below is a paid operation. To try it for free, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=BlurFace).',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'To use the face de-identification feature under the Vision AI Face and Body category, use the SDK. Multiple programming languages are supported. Select the SDK package for the Face and Body (facebody) category. The SDK supports local files and arbitrary URLs for file parameters. For more information, see [SDK overview](~~145033~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of face de-identification, see [Common Error Codes](~~146756~~).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Ensure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.',
+ 'changeSet' => [],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:BlurFace',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"DA7CAFEB-0A37-4496-9CDF-E3DBB6309CB2\\"\\n}","errorExample":""},{"type":"xml","example":"<RequestId>DA7CAFEB-0A37-4496-9CDF-E3DBB6309CB2</RequestId>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
],
- 'UpdateFaceEntity' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'BodyPosture' => [
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -685,39 +831,12 @@
],
'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'update',
- ],
+ 'systemTags' => [],
'parameters' => [
[
- 'name' => 'DbName',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'default',
- ],
- ],
- [
- 'name' => 'EntityId',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'mm2',
- ],
- ],
- [
- 'name' => 'Labels',
+ 'name' => 'ImageURL',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => false,
- 'example' => '',
- ],
+ 'schema' => ['description' => 'The URL of the image. We recommend that you use an Object Storage Service (OSS) link in the Shanghai region. If the file is stored locally or in an OSS bucket outside the Shanghai region, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/BodyPosture/BodyPosture4.jpg', 'title' => ''],
],
],
'responses' => [
@@ -725,54 +844,182 @@
'schema' => [
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'DA7CAFEB-0A37-4496-9CDF-E3DBB6309CB2',
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => 'B854094B-9231-4A54-89AB-C377CB0D237D', 'title' => ''],
+ 'Data' => [
+ 'description' => 'The returned result data.',
+ 'type' => 'object',
+ 'properties' => [
+ 'Outputs' => [
+ 'description' => 'The detection results.',
+ 'type' => 'array',
+ 'items' => [
+ 'type' => 'object',
+ 'properties' => [
+ 'HumanCount' => ['description' => 'The number of detected human bodies.', 'type' => 'integer', 'format' => 'int32', 'example' => '1', 'title' => ''],
+ 'Results' => [
+ 'description' => 'The detection results.',
+ 'type' => 'array',
+ 'items' => [
+ 'type' => 'object',
+ 'properties' => [
+ 'Bodies' => [
+ 'description' => 'The detected body keypoint information.',
+ 'type' => 'array',
+ 'items' => [
+ 'type' => 'object',
+ 'properties' => [
+ 'Positions' => [
+ 'description' => 'The keypoint coordinates. The coordinates are relative coordinates based on the image dimensions.',
+ 'type' => 'array',
+ 'items' => [
+ 'type' => 'object',
+ 'properties' => [
+ 'Points' => [
+ 'type' => 'array',
+ 'items' => ['description' => 'The keypoint \\[x, y] coordinates.'."\n"
+ .'- x coordinate: value range [0, 1]. This is a relative coordinate based on the image width. The actual coordinate is x × width.'."\n"
+ .'- y coordinate: value range [0, 1]. This is a relative coordinate based on the image height. The actual coordinate is y × height.', 'type' => 'number', 'format' => 'float', 'example' => '[0.46296295523643494, 0.1304347813129425]', 'title' => ''],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
+ ],
+ ],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'Confident' => ['description' => 'The confidence level of the keypoint.', 'type' => 'number', 'format' => 'float', 'example' => '0.91309475898742676', 'title' => ''],
+ 'Label' => ['description' => 'The label of the keypoint. Valid values: `nose, neck, right_shoulder, right_elbow, right_wrist, left_shoulder, left_elbow, left_wrist, right_hip, right_knee, right_ankle, left_hip, left_knee, left_ankle, right_eye, left_eye, right_ear, left_ear`.', 'type' => 'string', 'example' => 'nose', 'title' => ''],
+ ],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ ],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ ],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'MetaObject' => [
+ 'description' => 'The basic image information.',
+ 'type' => 'object',
+ 'properties' => [
+ 'Width' => ['description' => 'The image width, in pixels.', 'type' => 'integer', 'format' => 'int32', 'example' => '500', 'title' => ''],
+ 'Height' => ['description' => 'The image height, in pixels.', 'type' => 'integer', 'format' => 'int32', 'example' => '500', 'title' => ''],
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ ],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable.'],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"B854094B-9231-4A54-89AB-C377CB0D237D\\",\\n \\"Data\\": {\\n \\"Outputs\\": [\\n {\\n \\"HumanCount\\": 1,\\n \\"Results\\": [\\n {\\n \\"Bodies\\": [\\n {\\n \\"Positions\\": [\\n {\\n \\"Points\\": [\\n 0\\n ]\\n }\\n ],\\n \\"Confident\\": 0.9130947589874268,\\n \\"Label\\": \\"nose\\"\\n }\\n ]\\n }\\n ]\\n }\\n ],\\n \\"MetaObject\\": {\\n \\"Width\\": 500,\\n \\"Height\\": 500\\n }\\n }\\n}","type":"json"}]',
+ 'title' => 'Body posture keypoints',
+ 'summary' => 'This topic describes the syntax and examples of the BodyPosture feature for detecting body posture keypoints.',
+ 'description' => '## Feature description'."\n"
+ .'The body posture keypoints feature detects eighteen keypoints on a human body, including: nose, neck, right_shoulder, right_elbow, right_wrist, left_shoulder, left_elbow, left_wrist, right_hip, right_knee, right_ankle, left_hip, left_knee, left_ankle, right_eye, left_eye, right_ear, and left_ear.'."\n"
+ ."\n"
+ .'> - You can join [online consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) to get online help.'."\n"
+ .'- You can try this feature for free on the Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=BodyPosture) to experience this feature or purchase it online.'."\n"
+ .'- For questions about Alibaba Cloud Vision Intelligence Open Platform visual AI API integration or usage, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Integration guide'."\n"
+ .'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete registration.'."\n"
+ .'2. Activate the feature: Make sure you have activated the [Face and Body service](https://vision.aliyun.com/facebody). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open).'."\n"
+ .'> This feature is available to enterprise or users who verify your identity - Individual account. For more information about identity verification, see [Identity verification](https://help.aliyun.com/knowledge_list/37170.html).'."\n"
+ ."\n"
+ .'3. Create an AccessKey: Make sure you have [created an AccessKey](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/facebody/2019-12-30/BodyPosture?&lang=JAVA&sdkStyle=old&params=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Ffacebody%2FBodyPosture%2FBodyPosture1.jpg%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development integration steps:'."\n"
+ .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
+ .'- Find the SDK package for the Face and Body (facebody) AI category in the corresponding SDK documentation and install it.'."\n"
+ .'- Modify the sample code provided in the References as needed and invoke it.'."\n"
+ ."\n"
+ .'6. Direct client calls: Common client call methods for this feature include the following.'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from mini programs](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Input limits'."\n"
+ .'- Image format: JPEG, JPG, BMP, or PNG.'."\n"
+ .'- Image size: up to 3 MB.'."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ ."\n"
+ .'## Billing description'."\n"
+ .'For information about the billable methods and pricing of the body posture keypoints feature, see [Billing overview](~~184049~~).'."\n"
+ ."\n"
+ .'> The debugging API below is a paid API. To try it for free, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=BodyPosture).',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'To use the body posture keypoints feature under the Alibaba Cloud Vision AI Face and Body category, use the SDK. Multiple programming languages are supported. Select the SDK package for the Face and Body (facebody) AI category. The SDK supports both local files and arbitrary URLs for file parameters. For more information, see [SDK overview](~~145033~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of the body posture keypoints feature, see [Common fault codes](~~146756~~).'."\n"
+ ."\n"
+ .'## Open source Playground'."\n"
+ .'For more open source free model experience and downloads, visit ModelScope: [HRNet Body Keypoints - 2D](https://www.modelscope.cn/models/damo/cv_hrnetv2w32_body-2d-keypoints_image/summary) and [Whole-body Keypoint Detection - General Domain - 2D](https://www.modelscope.cn/models/damo/cv_hrnetw48_human-wholebody-keypoint_image/summary).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Ensure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.',
+ 'changeSet' => [],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:BodyPosture',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"DA7CAFEB-0A37-4496-9CDF-E3DBB6309CB2\\"\\n}","errorExample":""},{"type":"xml","example":"<RequestId>DA7CAFEB-0A37-4496-9CDF-E3DBB6309CB2</RequestId>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
],
- 'SearchFace' => [
- 'summary' => 'summary',
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'CompareFace' => [
+ 'summary' => 'This topic describes the syntax and examples of the CompareFace operation.',
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -780,77 +1027,37 @@
],
'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'get',
- ],
+ 'systemTags' => [],
'parameters' => [
[
- 'name' => 'DbName',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => false,
- 'example' => 'default',
- ],
- ],
- [
- 'name' => 'ImageUrl',
+ 'name' => 'QualityScoreThreshold',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/SearchFace/SearchFace1.png',
- 'isFileTransferUrl' => true,
- ],
+ 'schema' => ['title' => '', 'description' => 'The quality score threshold. Performs quality analysis on face images. If the quality score of a face is lower than this threshold, a MessageTips note is added to the response.', 'type' => 'number', 'format' => 'float', 'required' => false, 'example' => '98.5'],
],
[
- 'name' => 'Limit',
+ 'name' => 'ImageURLA',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int32',
- 'required' => true,
- 'maximum' => '1000',
- 'minimum' => '0',
- 'example' => '2',
- 'pattern' => '^\\d+$',
- ],
+ 'schema' => ['description' => 'The URL of image A. We recommend that you use an OSS URL in the China (Shanghai) region. For local files or OSS URLs in other regions, see [File URL processing](~~155645~~).'."\n"
+ ."\n"
+ .'> Specify either **ImageURLA** or **ImageDataA**. If both a URL and a Base64-encoded string are specified, the URL takes precedence.', 'type' => 'string', 'isFileTransferUrl' => true, 'required' => false, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/CompareFace/CompareFace-right1.png', 'title' => ''],
],
[
- 'name' => 'DbNames',
+ 'name' => 'ImageURLB',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => false,
- 'example' => 'test1,test2,test3',
- 'maxLength' => 4096,
- ],
+ 'schema' => ['description' => 'The URL of image B. We recommend that you use an OSS URL in the China (Shanghai) region. For local files or OSS URLs in other regions, see [File URL processing](~~155645~~).'."\n"
+ .'> Specify either **ImageURLB** or **ImageDataB**. If both a URL and a Base64-encoded string are specified, the URL takes precedence.', 'type' => 'string', 'isFileTransferUrl' => true, 'required' => false, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/CompareFace/CompareFace-left1.png', 'title' => ''],
],
[
- 'name' => 'QualityScoreThreshold',
+ 'name' => 'ImageDataA',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'required' => false,
- 'example' => '50.0',
- ],
+ 'schema' => ['description' => 'The Base64-encoded string of image A. If both a URL and a Base64-encoded string are specified, the URL takes precedence. For information about Base64 encoding, see [File Base64 processing](~~468191~~).'."\n"
+ .'> Specify either **ImageURLA** or **ImageDataA**. If both a URL and a Base64-encoded string are specified, the URL takes precedence.', 'type' => 'string', 'required' => false, 'example' => '/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgK****', 'title' => ''],
],
[
- 'name' => 'MaxFaceNum',
+ 'name' => 'ImageDataB',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int64',
- 'required' => false,
- 'example' => '5',
- ],
+ 'schema' => ['description' => 'The Base64-encoded string of image B. If both a URL and a Base64-encoded string are specified, the URL takes precedence. For information about Base64 encoding, see [File Base64 processing](~~468191~~).'."\n"
+ .'> Specify either **ImageURLB** or **ImageDataB**. If both a URL and a Base64-encoded string are specified, the URL takes precedence.', 'type' => 'string', 'required' => false, 'example' => '/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgQ****', 'title' => ''],
],
],
'responses' => [
@@ -859,266 +1066,389 @@
'description' => '1',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '4159e64a-0fe8-436c-a8de-ee531555db3c',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => 'B352CD68-C847-5C48-BE68-3F266356FDD7', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned data.',
'type' => 'object',
'properties' => [
- 'MatchList' => [
+ 'Thresholds' => [
+ 'description' => '1',
+ 'type' => 'array',
+ 'items' => ['description' => 'The confidence thresholds corresponding to false acceptance rates of 1/1,000, 1/10,000, and 1/100,000. For example, `[61.0,69.0,75.0]` indicates that at a false acceptance rate of 1/1,000, a confidence score (Confidence) exceeding 61% can be considered as the same person.', 'type' => 'number', 'format' => 'float', 'example' => '[61,69,75]', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'RectBList' => [
+ 'description' => '1',
+ 'type' => 'array',
+ 'items' => ['description' => 'The bounding box of the largest face in image B in the format `[left, top, width, height]`. For example, `[169,48,125,162]`.', 'type' => 'integer', 'format' => 'int32', 'example' => '[169,48,125,162]', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'Confidence' => ['description' => 'The confidence score that the largest faces in the two images belong to the same person. Valid values: 0 to 100. Three reference thresholds are 61, 69, and 75, corresponding to false acceptance rates of 1/1,000, 1/10,000, and 1/100,000 respectively. A higher threshold results in a lower false acceptance rate and a lower pass rate. Set a higher threshold for scenarios with higher security requirements. If no face is detected in an image, an error message is returned.', 'type' => 'number', 'format' => 'float', 'example' => '88.4831771850586', 'title' => ''],
+ 'RectAList' => [
+ 'description' => '1',
+ 'type' => 'array',
+ 'items' => ['description' => 'The bounding box of the largest face in image A in the format `[left, top, width, height]`. For example, `[157,82,147,188]`.', 'type' => 'integer', 'format' => 'int32', 'example' => '[157,82,147,188]', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'QualityScoreA' => ['title' => '', 'description' => 'The quality score of input image A.', 'type' => 'number', 'format' => 'float', 'example' => '99.65772247314453'],
+ 'QualityScoreB' => ['title' => '', 'description' => 'The quality score of input image B.', 'type' => 'number', 'format' => 'float', 'example' => '98.01177978515625'],
+ 'MessageTips' => ['title' => '', 'description' => 'The tip message in plain text. The following tip messages may appear individually or in combination.'."\n"
+ .'Quality-related tips (displayed when a face quality score is lower than the quality score threshold in the request parameters):'."\n"
+ .'- `imageA quality score less threshold`: The quality score of image A is lower than the threshold specified in the input parameters.'."\n"
+ .'- `imageB quality score less threshold`: The quality score of image B is lower than the threshold specified in the input parameters.'."\n"
+ ."\n"
+ .'Face size-related tips (displayed when a face is detected but the face width or height is less than 50 pixels. When this tip appears, provide a face image with at least 64 × 64 pixels and use the returned Confidence value at your discretion):'."\n"
+ .'- `face in imageA is too small`: The face in image A is too small.'."\n"
+ .'- `face in imageB is too small`: The face in image B is too small.', 'type' => 'string', 'example' => 'imageB quality score less threshold'],
+ 'IsMaskA' => ['description' => 'Indicates whether the face in image A is wearing a mask. Valid values:'."\n"
+ .'- 0: Not wearing a mask.'."\n"
+ .'- 1: Wearing a mask.', 'type' => 'integer', 'format' => 'int64', 'example' => '0', 'title' => ''],
+ 'IsMaskB' => ['description' => 'Indicates whether the face in image B is wearing a mask. Valid values:'."\n"
+ .'- 0: Not wearing a mask.'."\n"
+ .'- 1: Wearing a mask.', 'type' => 'integer', 'format' => 'int64', 'example' => '0', 'title' => ''],
+ 'LandmarksAList' => [
+ 'type' => 'array',
+ 'items' => ['description' => 'The facial landmark coordinates corresponding to the face bounding box in image A. The coordinates are listed in the following order: left eye x-coordinate, left eye y-coordinate, right eye x-coordinate, right eye y-coordinate, nose tip x-coordinate, nose tip y-coordinate, left mouth corner x-coordinate, left mouth corner y-coordinate, right mouth corner x-coordinate, right mouth corner y-coordinate.', 'type' => 'integer', 'format' => 'int64', 'example' => '[201,146,266,159,222,190,187,208,255,219]', 'title' => ''],
'description' => '',
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'LandmarksBList' => [
'type' => 'array',
- 'items' => [
- 'description' => '1',
- 'type' => 'object',
- 'properties' => [
- 'FaceItems' => [
- 'description' => '',
- 'type' => 'array',
- 'items' => [
- 'description' => '1',
- 'type' => 'object',
- 'properties' => [
- 'EntityId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'U1',
- ],
- 'FaceId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '001',
- ],
- 'Score' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '0.892133',
- ],
- 'ExtraData' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '',
- ],
- 'DbName' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'default',
- ],
- 'Confidence' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '36.820168',
- ],
- ],
- ],
- ],
- 'Location' => [
- 'description' => '',
- 'type' => 'object',
- 'properties' => [
- 'Width' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '200',
- ],
- 'Height' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '200',
- ],
- 'Y' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '6',
- ],
- 'X' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '5',
- ],
- ],
- ],
- 'QualitieScore' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '71.7349',
- ],
- ],
- ],
+ 'items' => ['description' => 'The facial landmark coordinates corresponding to the face bounding box in image B. The coordinates are listed in the following order: left eye x-coordinate, left eye y-coordinate, right eye x-coordinate, right eye y-coordinate, nose tip x-coordinate, nose tip y-coordinate, left mouth corner x-coordinate, left mouth corner y-coordinate, right mouth corner x-coordinate, right mouth corner y-coordinate.', 'type' => 'integer', 'format' => 'int64', 'example' => '[199,115,248,109,215,146,206,167,260,162]', 'title' => ''],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'title' => '',
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable.'],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"B352CD68-C847-5C48-BE68-3F266356FDD7\\",\\n \\"Data\\": {\\n \\"Thresholds\\": [\\n 0\\n ],\\n \\"RectBList\\": [\\n 0\\n ],\\n \\"Confidence\\": 88.4831771850586,\\n \\"RectAList\\": [\\n 0\\n ],\\n \\"QualityScoreA\\": 99.65772247314453,\\n \\"QualityScoreB\\": 98.01177978515625,\\n \\"MessageTips\\": \\"imageB quality score less threshold\\",\\n \\"IsMaskA\\": 0,\\n \\"IsMaskB\\": 0,\\n \\"LandmarksAList\\": [\\n 0\\n ],\\n \\"LandmarksBList\\": [\\n 0\\n ]\\n }\\n}","type":"json"}]',
+ 'title' => 'Face comparison',
+ 'description' => '## Feature description'."\n"
+ .'The 1:1 face comparison feature selects the largest face from each of the two input images and compares them to determine whether they belong to the same person.'."\n"
+ .'- Two-face image comparison: Compares the similarity of faces in two images and returns the rectangular bounding box coordinates, five facial landmark coordinates, comparison confidence score, and confidence thresholds at different false acceptance rates.'."\n"
+ .'- Multiple image types supported: Supports face comparison across various image types, such as lifestyle photos, ID photos, ID card chip photos, and photos with watermark patterns.'."\n"
+ ."\n"
+ .'The following figure shows an example of this operation:'."\n"
+ .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20221227/ghxo/CompareFace.png" width="500)'."\n"
+ ."\n"
+ .'> - You can go to [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for online assistance.'."\n"
+ .'- You can try this feature for free on the Visual Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=CompareFace) to experience this feature or purchase it online.'."\n"
+ .'- To consult about API access, usage, or issues related to the Alibaba Cloud Visual Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Common scenarios'."\n"
+ .'- Financial services: Compares a user\'s ID card photo with an authorized on-site photo to verify user identity. This provides a fast and secure identity verification flow for financial services such as remote account opening and face-scan payments on the Internet.'."\n"
+ .'- Employee attendance: Contactless face-scan attendance, ideal for enterprise attendance during pandemic prevention scenarios. It also effectively prevents cheating behaviors such as proxy clock-ins.'."\n"
+ .'- Public services: Customers can directly use face scanning to process services. Identity information is verified through face comparison, eliminating steps such as ID card verification and photocopying for archive. This improves the efficiency of public service counters.'."\n"
+ .'- Hotel self-service check-in: Guests can check in by scanning their faces. The on-site authorization photo is compared 1:1 with the photo fetched from the ID card to ensure the authenticity of the guest\'s identity while reducing manual verification and service costs, providing guests with a convenient check-in experience.'."\n"
+ ."\n"
+ .'## Advantages'."\n"
+ .'- High-precision recognition: The face detection and recognition algorithm achieves industry-leading accuracy.'."\n"
+ .'- Stable platform service: Provides millisecond-level recognition response and reliability under high concurrency and heavy traffic.'."\n"
+ .'- Precise landmark positioning: Supports high-precision positioning of facial features including eyes, nose, and mouth.'."\n"
+ .'- Easy to use: Directly callable API operations that are easy to use, integrate, and compatible with various systems.'."\n"
+ ."\n"
+ .'## Access guide'."\n"
+ .'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete account registration.'."\n"
+ .'2. Activate the service: Make sure that you have activated the [Face and Body service](https://vision.aliyun.com/facebody). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open).'."\n"
+ .'> This feature is available to enterprise or individual verified users. For more information about real-name verification, see [verify your identity - Individual account](https://help.aliyun.com/knowledge_list/37170.html).'."\n"
+ ."\n"
+ .'3. Create an AccessKey pair: Make sure that you have [created an AccessKey pair](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/facebody/2019-12-30/CompareFace?lang=JAVA&sdkStyle=dara&params=%7B%22ImageURLA%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Ffacebody%2FCompareFace%2FCompareFace-right1.png%22%2C%22ImageURLB%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Ffacebody%2FCompareFace%2FCompareFace-left1.png%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development and access steps:'."\n"
+ .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
+ .'- Find the SDK package for the Face and Body (facebody) AI category in the corresponding SDK documentation and install it.'."\n"
+ .'- Modify the sample code provided in the references as needed and invoke the operation.'."\n"
+ ."\n"
+ .'6. Sample code: For sample code in commonly used languages, see [Face comparison 1:1 sample code](~~465557~~).'."\n"
+ ."\n"
+ .'7. Direct client calls: Common client call methods for this feature include the following:'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from mini programs](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Input limits'."\n"
+ .'- Image format: JPEG, JPG, PNG, BMP, or WEBP.'."\n"
+ .'- Image size: Up to 5 MB.'."\n"
+ .'- Image resolution: Greater than 32 × 32 pixels and less than 4096 × 4096 pixels. The face must occupy at least 64 × 64 pixels.'."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ .'- You can use a mix of URL and Base64-encoded string inputs. For example, you can specify values for ImageURLA and ImageDataB without specifying values for ImageURLB and ImageDataA.'."\n"
+ .'> If the image resolution exceeds the maximum limit, resize the image first. For more information, see [Image resizing](~~44688~~).'."\n"
+ ."\n"
+ .'## Billing description'."\n"
+ .'For details about the billable methods and pricing of face comparison, see [Billing overview](~~184049~~).'."\n"
+ .'> The debugging operation below is a paid operation. To try it for free, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=CompareFace).',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'For the 1:1 face comparison feature under the Visual AI Face and Body category, we recommend that you use the SDK. The SDK supports multiple programming languages. Select the SDK package for the Face and Body (facebody) AI category. File parameters can be passed as local files or arbitrary URLs through the SDK. For more information, see [SDK overview](~~145033~~).'."\n"
+ ."\n"
+ .'## Sample code'."\n"
+ .'For sample code in commonly used languages, see [Face comparison 1:1 sample code](~~465557~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of the 1:1 face comparison feature, see [Common error codes](~~146756~~).'."\n"
+ ."\n"
+ .'## Open source Playground'."\n"
+ .'For more open source free model experiences and downloads, visit ModelScope: [Face Recognition OOD Model](https://modelscope.cn/models/damo/cv_ir_face-recognition-ood_rts/summary), [ArcFace Face Recognition Model](https://modelscope.cn/models/damo/cv_ir50_face-recognition_arcface/summary), [IR Face Recognition Model FRIR](https://modelscope.cn/models/damo/cv_manual_face-recognition_frir/summary), [Masked Face Recognition Model FRFM-large](https://modelscope.cn/models/damo/cv_manual_face-recognition_frfm/summary), [Masked Face Recognition Model FaceMask](https://modelscope.cn/models/damo/cv_resnet_face-recognition_facemask/summary).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.'."\n"
+ .'- The platform does not store original face images or file information involved during service usage.',
+ 'changeSet' => [],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:CompareFace',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"4159e64a-0fe8-436c-a8de-ee531555db3c\\",\\n \\"Data\\": {\\n \\"MatchList\\": [\\n {\\n \\"FaceItems\\": [\\n {\\n \\"EntityId\\": \\"U1\\",\\n \\"FaceId\\": \\"001\\",\\n \\"Score\\": 0.892133,\\n \\"ExtraData\\": \\"王小二\\",\\n \\"DbName\\": \\"default\\",\\n \\"Confidence\\": 36.820168\\n }\\n ],\\n \\"Location\\": {\\n \\"Width\\": 200,\\n \\"Height\\": 200,\\n \\"Y\\": 6,\\n \\"X\\": 5\\n },\\n \\"QualitieScore\\": 71.7349\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<SearchFaceResponse>\\n <RequestId>4159e64a-0fe8-436c-a8de-ee531555db3c</RequestId>\\n <Data>\\n <MatchList>\\n <FaceItems>\\n <EntityId>U1</EntityId>\\n <FaceId>001</FaceId>\\n <Score>0.892133</Score>\\n <ExtraData>王小二</ExtraData>\\n <DbName>default</DbName>\\n <Confidence>36.820168</Confidence>\\n </FaceItems>\\n <Location>\\n <Width>200</Width>\\n <Height>200</Height>\\n <Y>6</Y>\\n <X>5</X>\\n </Location>\\n <QualitieScore>71.7349</QualitieScore>\\n </MatchList>\\n </Data>\\n</SearchFaceResponse>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
],
- 'GetFaceEntity' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'CompareFaceWithMask' => [
+ 'summary' => 'This topic describes the syntax and provides examples of the masked face comparison 1:1 operation (CompareFaceWithMask).',
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
- 'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'get',
- ],
+ 'systemTags' => [],
'parameters' => [
[
- 'name' => 'DbName',
+ 'name' => 'ImageURLA',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'default',
- ],
+ 'schema' => ['description' => 'The URL of image A. We recommend that you use an Object Storage Service (OSS) link in the China (Shanghai) region. If the file is stored locally or the OSS link is in a region other than China (Shanghai), see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'https://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/CompareFaceWithMask/CompareFaceWithMask-left1.jpeg', 'title' => ''],
],
[
- 'name' => 'EntityId',
+ 'name' => 'ImageURLB',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => '66',
- ],
+ 'schema' => ['description' => 'The URL of image B. We recommend that you use an OSS link in the China (Shanghai) region. If the file is stored locally or the OSS link is in a region other than China (Shanghai), see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'https://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/CompareFaceWithMask/CompareFaceWithMask-right1.jpeg', 'title' => ''],
+ ],
+ [
+ 'name' => 'QualityScoreThreshold',
+ 'in' => 'formData',
+ 'schema' => ['description' => 'The quality score threshold. A quality analysis is performed on the face image. If the quality score of a face is lower than this threshold, a MessageTips field is added to the response.', 'type' => 'number', 'format' => 'float', 'required' => false, 'example' => '97.0', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
+ 'title' => '',
+ 'description' => 'Schema of Response',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'DA7CAFEB-0A37-4496-9CDF-E3DBB6309CB2',
- ],
+ 'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => 'C6499918-E932-41B3-96F5-A18F50D262DD'],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned result data.',
'type' => 'object',
'properties' => [
- 'DbName' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'default',
+ 'Confidence' => ['description' => 'The confidence level indicating whether the largest faces in the two images belong to the same person. Valid values: 0 to 100. Three reference thresholds are 61, 69, and 75, corresponding to false acceptance rates of 1/1000, 1/10000, and 1/100000 respectively. A higher threshold results in a lower false acceptance rate and a lower pass rate. Set a higher threshold for scenarios with higher security requirements. A fault message is returned if no face is detected in an image.', 'type' => 'number', 'format' => 'float', 'example' => '88.025604248046875', 'title' => ''],
+ 'IsMaskA' => ['description' => 'Indicates whether the face in image A is wearing a mask. Valid values:'."\n"
+ ."\n"
+ .'- 0: not wearing a mask'."\n"
+ .'- 1: wearing a mask.', 'type' => 'integer', 'format' => 'int64', 'example' => '1', 'title' => ''],
+ 'IsMaskB' => ['description' => 'Indicates whether the face in image B is wearing a mask. Valid values:'."\n"
+ ."\n"
+ .'- 0: not wearing a mask'."\n"
+ .'- 1: wearing a mask.', 'type' => 'integer', 'format' => 'int64', 'example' => '0', 'title' => ''],
+ 'LandmarksAList' => [
+ 'description' => 'The array of facial keypoint coordinates corresponding to the face bounding box in image A.',
+ 'type' => 'array',
+ 'items' => ['description' => 'The facial keypoint coordinates corresponding to the face bounding box in image A. The coordinates are listed in the following order: left eye X, left eye Y, right eye X, right eye Y, nose tip X, nose tip Y, left mouth corner X, left mouth corner Y, right mouth corner X, right mouth corner Y.', 'type' => 'integer', 'format' => 'int64', 'example' => '[348,490,523,478,446,577,386,677,514,668]', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
],
- 'EntityId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '66',
+ 'LandmarksBList' => [
+ 'description' => 'The array of facial keypoint coordinates corresponding to the face bounding box in image B.',
+ 'type' => 'array',
+ 'items' => ['description' => 'The facial keypoint coordinates corresponding to the face bounding box in image B. The coordinates are listed in the following order: left eye X, left eye Y, right eye X, right eye Y, nose tip X, nose tip Y, left mouth corner X, left mouth corner Y, right mouth corner X, right mouth corner Y.', 'type' => 'integer', 'format' => 'int64', 'example' => '[356,590,487,589,410,676,368,754,476,753]', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
],
- 'Labels' => [
- 'description' => '',
- 'type' => 'string',
+ 'QualityScoreA' => ['description' => 'The quality score of input image A.', 'type' => 'number', 'format' => 'float', 'example' => '75.891258239746094', 'title' => ''],
+ 'QualityScoreB' => ['description' => 'The quality score of input image B.', 'type' => 'number', 'format' => 'float', 'example' => '98.716880798339844', 'title' => ''],
+ 'RectAList' => [
+ 'description' => 'The bounding box of the largest face in image A.',
+ 'type' => 'array',
+ 'items' => ['description' => 'The bounding box of the largest face in image A in the format \\[left, top, width, height]. Example: \\[238,310,388,492].', 'type' => 'integer', 'format' => 'int64', 'example' => '[238,310,388,492]', 'title' => ''],
+ 'title' => '',
'example' => '',
],
- 'Faces' => [
- 'description' => '',
+ 'RectBList' => [
+ 'description' => 'The bounding box of the largest face in image B.',
'type' => 'array',
- 'items' => [
- 'type' => 'object',
- 'properties' => [
- 'FaceId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '3',
- ],
- ],
- ],
+ 'items' => ['description' => 'The bounding box of the largest face in image B in the format \\[left, top, width, height]. Example: \\[284,467,293,373].', 'type' => 'integer', 'format' => 'int64', 'example' => '[284,467,293,373]', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'Thresholds' => [
+ 'description' => 'The array of confidence thresholds at different false acceptance rates.',
+ 'type' => 'array',
+ 'items' => ['description' => 'The confidence thresholds corresponding to false acceptance rates of 1/1000, 1/10000, and 1/100000. For example, `[61.0,69.0,75.0]` indicates that at a false acceptance rate of 1/1000, a confidence score (Confidence) above 61% means the two faces can be considered the same person.', 'type' => 'integer', 'format' => 'int64', 'example' => '[61, 69, 75]', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
],
+ 'MessageTips' => ['description' => 'The tip message in plain text. The following tip messages may appear individually or in combination.'."\n"
+ .'Quality-related tips (appear when the quality score of a face is lower than the quality score threshold specified in the request parameter):'."\n"
+ ."\n"
+ .'- `imageA quality score less threshold`: The quality score of image A is lower than the threshold specified in the input parameter.'."\n"
+ .'- `imageB quality score less threshold`: The quality score of image B is lower than the threshold specified in the input parameter.'."\n"
+ ."\n"
+ .'Face size-related tips (appear when a face is detected but the face width or height is less than 50 pixels. When this tip appears, provide a face image with at least 64 × 64 pixels and use the returned comparison confidence score at your discretion):'."\n"
+ ."\n"
+ .'- `face in imageA is too small`: The face in image A is too small.'."\n"
+ .'- `face in imageB is too small`: The face in image B is too small.', 'type' => 'string', 'example' => 'imageB quality score less threshold', 'title' => ''],
],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable.'],
+ ],
+ ],
+ 'staticInfo' => ['returnType' => 'synchronous'],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"C6499918-E932-41B3-96F5-A18F50D262DD\\",\\n \\"Data\\": {\\n \\"Confidence\\": 88.02560424804688,\\n \\"IsMaskA\\": 1,\\n \\"IsMaskB\\": 0,\\n \\"LandmarksAList\\": [\\n 0\\n ],\\n \\"LandmarksBList\\": [\\n 0\\n ],\\n \\"QualityScoreA\\": 75.8912582397461,\\n \\"QualityScoreB\\": 98.71688079833984,\\n \\"RectAList\\": [\\n 0\\n ],\\n \\"RectBList\\": [\\n 0\\n ],\\n \\"Thresholds\\": [\\n 0\\n ],\\n \\"MessageTips\\": \\"imageB quality score less threshold\\"\\n }\\n}","type":"json"}]',
+ 'title' => 'Masked face comparison 1:1',
+ 'description' => '## Feature description'."\n"
+ .'The masked face comparison 1:1 feature selects the largest face from each of the two input images and compares them to determine whether they belong to the same person. This feature integrates three key technologies: masked face generation, occlusion-resistant keypoint localization, and occlusion-resistant feature attention optimization, enabling ultra-fast face recognition even when masks are worn.'."\n"
+ ."\n"
+ .'- Two-face image comparison: Compares the similarity of faces in two images and returns the rectangular bounding box coordinates, five facial keypoint coordinates, comparison confidence score, and confidence thresholds at different false acceptance rates.'."\n"
+ .'- Multiple image types supported: Supports face comparison for various image types such as casual photos and ID photos.'."\n"
+ .'- Mask-wearing scenario support: Performs face comparison and recognition for masked faces in mask-wearing scenarios.'."\n"
+ ."\n"
+ .'The following figure shows how this feature works:'."\n"
+ .' ![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20230206/cenz/CompareFaceWithMask.png" width="500)'."\n"
+ ."\n"
+ .'> - You can go to [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for online assistance.'."\n"
+ .'- You can try this feature for free on the Visual Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=CompareFaceWithMask) to experience this feature or purchase it online.'."\n"
+ .'- To consult about API access, usage, or issues related to the Alibaba Cloud Visual Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Common scenarios'."\n"
+ ."\n"
+ .'- Employee attendance: Contactless face recognition attendance, the preferred solution for enterprise attendance during epidemic prevention scenarios. It also effectively prevents cheating behaviors such as proxy clock-ins.'."\n"
+ .'- Public services: Customers wearing masks can directly use face recognition to handle business. Identity information is verified through face comparison, eliminating steps such as ID card verification and photocopying, improving the efficiency of public service counters.'."\n"
+ .'- Delivery rider face verification: Masked delivery riders can use face recognition for clock-in and periodic identity verification. On-site authorized masked face photos are compared 1:1 with authenticated photos to ensure rider identity authenticity, providing a convenient face recognition experience without removing masks.'."\n"
+ ."\n"
+ .'## Key advantages'."\n"
+ .'- Stable platform service: Provides millisecond-level recognition response and reliability under high concurrency and heavy traffic.'."\n"
+ .'- Occlusion-resistant facial feature localization: Supports accurate and robust keypoint localization with self-assessed accuracy even when masks are worn or faces are largely occluded.'."\n"
+ .'- Occlusion-resistant feature modeling: Supports robust attention mechanism-based feature modeling even when masks are worn or faces are largely occluded.'."\n"
+ .'- Easy to use: Provides directly callable API operations that are easy to use, integrate, and compatible with various systems.'."\n"
+ .'- Mask-wearing scenario optimization: Optimizes face comparison for mask-wearing scenarios with facial occlusion.'."\n"
+ ."\n"
+ .'## Getting started'."\n"
+ .'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete account registration.'."\n"
+ .'2. Activate the service: Make sure you have activated the [Face and Body service](https://vision.aliyun.com/facebody). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open).'."\n"
+ .'><notice>'."\n"
+ .'This feature is available only to users who have completed verify your identity - Enterprise account. For more information about real-name verification, see [Real-name verification](https://help.aliyun.com/knowledge_list/37170.html).'."\n"
+ .'></notice>'."\n"
+ ."\n"
+ .'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/facebody/2019-12-30/CompareFaceWithMask?lang=JAVA) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development and integration steps:'."\n"
+ .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
+ .'- Find and install the SDK package for the Face and Body (facebody) category in the corresponding SDK documentation.'."\n"
+ .'- Modify the sample code provided in the references as needed and invoke the operation.'."\n"
+ ."\n"
+ .'6. Sample code: For sample code in commonly used languages, see [Masked face comparison 1:1 sample code](~~601387~~).'."\n"
+ ."\n"
+ .'7. Direct client calls: Common client call methods for this feature include the following:'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from mini programs](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Input limits'."\n"
+ .'- Image format: JPEG, JPG, PNG, BMP, or WEBP.'."\n"
+ .'- Image size: Up to 3 MB.'."\n"
+ .'- Image resolution: Greater than 32 × 32 pixels and less than 4096 × 4096 pixels. The face must occupy at least 64 × 64 pixels.'."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ .'> If the image resolution exceeds the maximum limit, resize the image first. For more information, see [Image resizing](~~44688~~).'."\n"
+ ."\n"
+ .'## Billing description'."\n"
+ .'For information about the billable methods and pricing of masked face comparison 1:1, see [Billing overview](~~184049~~).'."\n"
+ .'> The debugging operation below is a paid operation. To try it for free, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=CompareFaceWithMask).',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'For the masked face comparison 1:1 feature under the Visual AI Face and Body category, use the SDK for calling. Multiple programming languages are supported. Select the SDK package for the Face and Body (facebody) category. File parameters support local files and arbitrary URLs through SDK calls. For more information, see [SDK overview](~~145033~~).'."\n"
+ ."\n"
+ .'## Sample code'."\n"
+ .'For sample code in commonly used languages, see [Masked face comparison 1:1 sample code](~~601387~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of masked face comparison 1:1, see [Common error codes](~~146756~~).'."\n"
+ ."\n"
+ .'## Open source Playground'."\n"
+ .'For more open source free model experiences and downloads, visit ModelScope: [Face Recognition OOD Model](https://modelscope.cn/models/damo/cv_ir_face-recognition-ood_rts/summary), [ArcFace Face Recognition Model](https://modelscope.cn/models/damo/cv_ir50_face-recognition_arcface/summary), [IR Face Recognition Model FRIR](https://modelscope.cn/models/damo/cv_manual_face-recognition_frir/summary), [Masked Face Recognition Model FRFM-large](https://modelscope.cn/models/damo/cv_manual_face-recognition_frfm/summary), [Masked Face Recognition Model FaceMask](https://modelscope.cn/models/damo/cv_resnet_face-recognition_facemask/summary).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Ensure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.'."\n"
+ .'- The platform does not store original face images or file information involved during your use of the service.',
+ 'changeSet' => [],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:CompareFaceWithMask',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"DA7CAFEB-0A37-4496-9CDF-E3DBB6309CB2\\",\\n \\"Data\\": {\\n \\"DbName\\": \\"default\\",\\n \\"EntityId\\": \\"66\\",\\n \\"Labels\\": \\"工厂\\",\\n \\"Faces\\": [\\n {\\n \\"FaceId\\": \\"3\\"\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<RequestId>DA7CAFEB-0A37-4496-9CDF-E3DBB6309CB2</RequestId>\\n<Data>\\n <DbName>default</DbName>\\n <EntityId>66</EntityId>\\n <Labels>工厂</Labels>\\n <Faces>\\n <FaceId>3</FaceId>\\n </Faces>\\n</Data>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
],
- 'ListFaceEntities' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'CreateFaceDb' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -1126,194 +1456,350 @@
],
'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'get',
- ],
+ 'systemTags' => ['operationType' => 'create'],
'parameters' => [
[
- 'name' => 'DbName',
+ 'name' => 'Name',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'default',
- ],
+ 'schema' => ['description' => 'The name of the database. The name can contain letters, digits, and underscores (_) and must be 1 to 64 characters in length.', 'type' => 'string', 'required' => true, 'example' => 'default', 'title' => ''],
],
- [
- 'name' => 'Offset',
- 'in' => 'formData',
+ ],
+ 'responses' => [
+ 200 => [
'schema' => [
+ 'type' => 'object',
+ 'properties' => [
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '818D24A6-E368-46B3-99C5-3CF36D98CCA3', 'title' => ''],
+ ],
'description' => '',
- 'type' => 'integer',
- 'format' => 'int32',
- 'required' => false,
- 'example' => '1',
+ 'title' => '',
+ 'example' => '',
],
],
- [
- 'name' => 'Limit',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int32',
- 'required' => false,
- 'example' => '50',
- ],
+ ],
+ 'errorCodes' => [
+ 400 => [
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
- [
- 'name' => 'Token',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => false,
- 'example' => '2',
- ],
+ 403 => [
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
- [
- 'name' => 'Labels',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => false,
- 'example' => '',
+ 408 => [
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
+ ],
+ 503 => [
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable.'],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"818D24A6-E368-46B3-99C5-3CF36D98CCA3\\"\\n}","type":"json"}]',
+ 'title' => 'Create a face database',
+ 'summary' => 'This topic describes the syntax and examples of the CreateFaceDb operation.',
+ 'description' => '## Feature description'."\n"
+ .'The CreateFaceDb operation creates a face database to store face data. Each Alibaba Cloud account can create up to 10 face databases. The 10 face databases support a total of up to 500,000 face images. Each face database supports up to 50,000 face images. A single search can query up to 10 face databases simultaneously (cross-database search).'."\n"
+ .'The number of face databases, face images, total faces per search, and face databases per search cannot be increased.'."\n"
+ ."\n"
+ .'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for online assistance.'."\n"
+ .'- To learn more about Alibaba Cloud Vision Intelligence Open Platform visual AI API integration, usage, or consultation, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Getting started'."\n"
+ .'1. Create an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to create an account.'."\n"
+ .'2. Activate the service: Make sure that you have activated the [Face and Body service](https://vision.aliyun.com/facebody). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open).'."\n"
+ .'><notice>'."\n"
+ .'This feature is available to enterprise users or users who have completed verify your identity - Individual account. For more information about identity verification, see [Identity verification](https://help.aliyun.com/knowledge_list/37170.html).'."\n"
+ .'></notice>'."\n"
+ ."\n"
+ .'3. Create an AccessKey pair: Make sure that you have [created an AccessKey pair](~~175144~~). If you are using an AccessKey pair of a RAM user, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Debug online (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/facebody/2019-12-30/CreateFaceDb?lang=JAVA) to debug the operation online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development and integration steps:'."\n"
+ .'- Select the SDK language that you want to use from [SDK overview](~~145033~~).'."\n"
+ .'- Find the SDK package for the Face and Body category (facebody) in the corresponding SDK documentation and install it.'."\n"
+ .'- Modify the sample code provided in the References as needed and invoke the operation.'."\n"
+ ."\n"
+ .'6. Sample code: For sample code in commonly used languages, see [CreateFaceDb sample code](~~477924~~).'."\n"
+ ."\n"
+ .'7. Direct client invocation: Common client invocation methods for this feature include the following:'."\n"
+ .'- [Direct invocation from web frontend](~~467779~~)'."\n"
+ .'- [Direct invocation from mini programs](~~467780~~)'."\n"
+ .'- [Direct invocation from Android](~~467781~~)'."\n"
+ .'- [Direct invocation from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Limits'."\n"
+ .'The default concurrency for submitting tasks through the CreateFaceDb operation is 2 QPS.'."\n"
+ ."\n"
+ .'## Billing description'."\n"
+ .'The CreateFaceDb operation is free of charge.',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'We recommend that you use an SDK to call the CreateFaceDb operation under the Face and Body category of Alibaba Cloud Vision AI. SDKs are available in multiple programming languages. When calling the operation, select the SDK package for the Face and Body category (facebody). File parameters support local files and arbitrary URLs through SDK calls. For more information, see [SDK overview](~~145033~~).'."\n"
+ ."\n"
+ .'## Sample code'."\n"
+ .'For sample code in commonly used languages, see [CreateFaceDb sample code](~~477924~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of the CreateFaceDb operation, see [Common faults](~~146756~~).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Ensure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging console are valid for 1 hour and are automatically deleted by the system after 24 hours.'."\n"
+ .'- The platform does not store original face images or file information involved in the use of the service.'."\n"
+ .'- The platform freezes face feature vector data for users who have not invoked any API operation for 6 months or more to ensure the information security of inactive users. To unfreeze data, contact us through the DingTalk group (23109592).',
+ 'changeSet' => [],
+ 'ramActions' => [
+ [
+ 'operationType' => 'create',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:CreateFaceDb',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
+ ],
+ ],
+ 'DeepfakeFace' => [
+ 'summary' => 'This topic describes the syntax and examples of DeepfakeFace under the facebody category.',
+ 'methods' => ['post'],
+ 'schemes' => ['https'],
+ 'security' => [
[
- 'name' => 'EntityIdPrefix',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => false,
- 'example' => 'U1',
- ],
+ 'AK' => [],
],
+ ],
+ 'operationType' => 'read',
+ 'deprecated' => false,
+ 'systemTags' => ['operationType' => 'none'],
+ 'parameters' => [
[
- 'name' => 'Order',
+ 'name' => 'Tasks',
'in' => 'formData',
+ 'style' => 'repeatList',
'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => false,
- 'example' => 'asc',
+ 'description' => 'Input facial data.',
+ 'type' => 'array',
+ 'items' => [
+ 'type' => 'object',
+ 'properties' => [
+ 'ImageURL' => ['description' => 'The URL of the image to be detected. Each element in the JSON array is an image detection task structure (image Table). Up to 10 elements are supported, meaning you can detect up to 10 images simultaneously. We recommend using an OSS link in the China (Shanghai) region. For local files or OSS links in other regions, see [File URL Processing](~~155645~~).'."\n"
+ ."\n"
+ .'> For this API, the system automatically converts the OSS URL to an internal network address before downloading the file. Therefore, invoking this API does not incur OSS traffic billing.', 'type' => 'string', 'required' => false, 'example' => 'https://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/DeepfakeFace/DeepfakeFace1.jpg', 'isFileTransferUrl' => true, 'title' => ''],
+ 'ImageData' => ['description' => 'Base64-encoded string of the image. When both Base64 and URL are provided, the URL takes precedence. '."\n"
+ .'For instructions on Base64 encoding files, see [File Base64 Processing](~~468191~~).', 'type' => 'string', 'required' => false, 'example' => '/9j/4AAQSkZJRgABAQAAAQABAAD/2****', 'title' => ''],
+ ],
+ 'required' => false,
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'required' => true,
+ 'maxItems' => 10,
+ 'title' => '',
+ 'example' => '',
],
],
],
'responses' => [
200 => [
'schema' => [
+ 'title' => 'Schema of Response',
+ 'description' => 'Schema of Response',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'DA7CAFEB-0A37-4496-9CDF-E3DBB6309CB2',
- ],
+ 'RequestId' => ['title' => 'Id of the request', 'description' => 'The request ID. ', 'type' => 'string', 'example' => '8E6F65D5-62A1-1E5B-BC0B-00508034AC92'],
'Data' => [
- 'description' => '',
+ 'description' => 'The content of the returned result data. ',
'type' => 'object',
'properties' => [
- 'Token' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '2',
- ],
- 'TotalCount' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '200',
- ],
- 'Entities' => [
- 'description' => '',
+ 'Elements' => [
+ 'description' => 'The detected elements. ',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
- 'DbName' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'default',
- ],
- 'EntityId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '222',
- ],
- 'Labels' => [
- 'description' => '',
- 'type' => 'string',
+ 'ImageURL' => ['description' => 'The image URL address corresponding to the request.', 'type' => 'string', 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/DeepfakeFace/DeepfakeFace1.jpg', 'title' => ''],
+ 'TaskId' => ['description' => 'The ID of the detection job. ', 'type' => 'string', 'example' => '8E6F65D5-62A1-1E5B-BC0B-00508034AC92', 'title' => ''],
+ 'Results' => [
+ 'description' => 'The return result. When the invocation succeeds, the result contains one or more elements. ',
+ 'type' => 'array',
+ 'items' => [
+ 'type' => 'object',
+ 'properties' => [
+ 'Label' => ['description' => 'The categorization of the detection result. Valid values include:'."\n"
+ ."\n"
+ .'- normalface: genuine face image'."\n"
+ .'- deepfakeface: face-swapped image'."\n"
+ ."\n"
+ .'If no face is detected, the Label returns `deepfake`.', 'type' => 'string', 'example' => 'normalface', 'title' => ''],
+ 'Confidence' => ['description' => 'The value range is [0.00, 100.00]. A lower value indicates a higher probability that the face is genuine.', 'type' => 'number', 'format' => 'float', 'example' => '36.6455', 'title' => ''],
+ 'Rect' => [
+ 'description' => 'Face bounding box information. ',
+ 'type' => 'object',
+ 'properties' => [
+ 'Left' => ['description' => 'The x coordinate of the top-left point of the detection box.', 'type' => 'integer', 'format' => 'int64', 'example' => '373', 'title' => ''],
+ 'Top' => ['description' => 'The y-coordinate of the top-left point of the detection bounding box.', 'type' => 'integer', 'format' => 'int64', 'example' => '111', 'title' => ''],
+ 'Width' => ['description' => 'The width of the detection bounding box.', 'type' => 'integer', 'format' => 'int64', 'example' => '207', 'title' => ''],
+ 'Height' => ['description' => 'The height of the detection bounding box.', 'type' => 'integer', 'format' => 'int64', 'example' => '284', 'title' => ''],
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'MessageTips' => ['description' => 'Prompt messages. '."\n"
+ .'- If the input face is blurred, occluded, or at a large angle, the following message is returned: `blurred, occluded or large angle face, please check.` '."\n"
+ .'- If no face is detected, the following message is returned: `no face detected, try again please.` ', 'type' => 'string', 'example' => 'blurred, occluded or large angle face, please check.', 'title' => ''],
+ ],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'title' => '',
'example' => '',
],
- 'CreatedAt' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1589203871832',
- ],
- 'FaceCount' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '3',
- ],
- 'UpdatedAt' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1589203871832',
- ],
+ 'FaceNumber' => ['description' => 'The number of faces detected in a single image. '."\n"
+ .'If no face is detected, FaceNumber returns 0.', 'type' => 'integer', 'format' => 'int64', 'example' => '1', 'title' => ''],
],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable.'],
+ ],
+ ],
+ 'staticInfo' => ['returnType' => 'synchronous'],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"8E6F65D5-62A1-1E5B-BC0B-00508034AC92\\",\\n \\"Data\\": {\\n \\"Elements\\": [\\n {\\n \\"ImageURL\\": \\"http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/DeepfakeFace/DeepfakeFace1.jpg\\",\\n \\"TaskId\\": \\"8E6F65D5-62A1-1E5B-BC0B-00508034AC92\\",\\n \\"Results\\": [\\n {\\n \\"Label\\": \\"normalface\\",\\n \\"Confidence\\": 36.6455,\\n \\"Rect\\": {\\n \\"Left\\": 373,\\n \\"Top\\": 111,\\n \\"Width\\": 207,\\n \\"Height\\": 284\\n },\\n \\"MessageTips\\": \\"blurred, occluded or large angle face, please check.\\"\\n }\\n ],\\n \\"FaceNumber\\": 1\\n }\\n ]\\n }\\n}","type":"json"}]',
+ 'title' => 'Deepfake Face Detection',
+ 'description' => '## Feature Description '."\n"
+ .'Deepfake Face Detection uses AI-based image algorithms to sensitively detect and deeply analyze the authenticity of human faces in images. This capability supports the following:'."\n"
+ ."\n"
+ .'1. Detecting whether a face in an image is a deepfake generated by AI-based face-swapping algorithms.'."\n"
+ .'2. Detecting whether a face in an image is a deepfake generated by AI-based facial attribute editing algorithms. Deepfake technology refers to techniques that leverage deep learning to swap faces or edit facial features in images or videos.'."\n"
+ ."\n"
+ .'Example images illustrating this API\'s functionality are shown below:'."\n"
+ ."\n"
+ .'- Not synthesized by algorithms: '."\n"
+ .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20231109/kpoj/real2.png) '."\n"
+ .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20231109/rvyz/real1.jpg)'."\n"
+ ."\n"
+ .'- Synthesized by algorithms: '."\n"
+ .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20231109/vcgh/fake1.png) '."\n"
+ .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20231109/xgjj/fake2.png)'."\n"
+ ."\n"
+ .'> - You can obtain live assistance by visiting [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2).'."\n"
+ .'- A complete free trial of this capability is available on Visual Intelligence API. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=DeepfakeFace) for an intuitive hands-on experience or to purchase the service online.'."\n"
+ .'- For inquiries regarding API integration, usage, or technical support for Alibaba Cloud Visual Intelligence API visual AI capabilities, join our DingTalk group (23109592) to contact us directly.'."\n"
+ ."\n"
+ .'## Common Scenarios '."\n"
+ .'- Combating the spread of deepfake videos online: With the surge in popularity of entertainment-focused face-swapping miniapps and mobile applications, deepfake detection technology can identify forged faces in short online videos, preventing video-based identity fraud.'."\n"
+ .'- Preventing online ID-based face-swapping scams: Deepfake technology is frequently exploited in combination with social media to manipulate public opinion and facilitate fraud. Deepfake detection can identify forged facial videos used in online identity verification processes, thereby reducing internet fraud.'."\n"
+ .'- Disrupting illicit industries such as pornography and cyber underground economy chains: The Internet hosts a vast volume of deepfake-generated pornographic content. Deepfake detection helps identify such forged videos, curbing the dissemination of non-consensual deepfake pornography and breaking distribution chains.'."\n"
+ .'- Detecting facial feature editing: To verify copyright ownership of real-person identities, deepfake detection identifies deepfake images in Material Libraries that were generated using facial attribute editing algorithms, preventing identity forgery and copyright infringement.'."\n"
+ ."\n"
+ .'## Key Advantages '."\n"
+ .'- Countering AI misuse: Built upon DAMO Academy’s facial image algorithms and deepfake detection technology, this service performs comprehensive analysis of facial features in images. It leverages AI to counteract the misuse of technologies such as face swapping, synthetic face generation, and facial feature editing, thereby protecting user rights and maintaining public safety.'."\n"
+ .'- Leading detection technology: By analyzing high-dimensional, full-spectrum features of human subjects in images—from low-level pixel and texture details to high-level global semantic features—the service conducts multilayer, high-semantic, holistic analysis. Its integrated attack-and-defense training methodology significantly improves detection rates for synthetic faces.'."\n"
+ .'- High accuracy: Combining Alibaba Cloud’s years of expertise in facial recognition and big data security technologies, this service accurately identifies AI-generated faces and deepfakes in images and videos, achieving high precision in detecting deepfake attacks.'."\n"
+ .'- Supports detection logic for single or multiple faces. The service provides easy-to-use, directly invocable API operations that are simple to integrate and highly compatible.'."\n"
+ ."\n"
+ .'## Integration Guide '."\n"
+ .'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com). In the upper-right corner, click **Sign Up Now** and follow the instructions to complete registration.'."\n"
+ .'2. Activate the service: Ensure you have activated the [Face and Body Service](https://vision.aliyun.com/facebody). If not yet activated, click [Activate Now](https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open).'."\n"
+ .'> This capability is available to both enterprise and individual users who have completed identity verification. For more information on identity verification, see [Identity Verification](https://help.aliyun.com/knowledge_list/37170.html).'."\n"
+ .'3. Create an AccessKey: Ensure you have [created an AccessKey](~~175144~~). If you are using a RAM user AccessKey, grant the RAM user the AliyunVIAPIFullAccess permission. For details, see [RAM Authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can debug this capability using [OpenAPI Explorer](https://next.api.aliyun.com/api/facebody/2019-12-30/DeepfakeFace) to view complete sample code and SDK dependency information, or download the full project.'."\n"
+ .'5. Development integration steps:'."\n"
+ .' - Select your preferred programming language from the [SDK Overview](~~145033~~).'."\n"
+ .' - Install the SDK package under the facebody category in the corresponding language’s SDK documentation.'."\n"
+ .' - Modify and invoke the API based on the provided sample code.'."\n"
+ .'6. Direct client invocation: Common client-side invocation methods include:'."\n"
+ .' - [Direct invocation from Web frontend](~~467779~~)'."\n"
+ .' - [Direct invocation in miniapp scenarios](~~467780~~)'."\n"
+ .' - [Direct invocation on Android](~~467781~~)'."\n"
+ .' - [Direct invocation on iOS](~~467782~~)'."\n"
+ ."\n"
+ .'## Input Restrictions '."\n"
+ .'- Image formats: PNG, JPG, JPEG, BMP, GIF, WEBP.'."\n"
+ .'- Image size: No larger than 10 MB.'."\n"
+ .'- Image resolution: Recommended to be greater than 256×256 pixels, with the facial region larger than 128×128 pixels. Lower resolutions may negatively impact detection performance.'."\n"
+ .'- URLs must not contain Chinese characters.'."\n"
+ ."\n"
+ .'> If the image resolution exceeds the recommended limit, resize the image first. For details, see [Image Scaling](~~44688~~).'."\n"
+ ."\n"
+ .'## Detection Notes '."\n"
+ .'- Maximum detection time is 5 seconds. If detection is not completed within this period, the system returns a timeout error code.'."\n"
+ .'- Image download time is limited to 3 seconds. If downloading takes longer, the system returns a download timeout error.'."\n"
+ .'- The API response time depends on the image download time. Ensure the storage service hosting the image is stable and reliable. We recommend using Alibaba Cloud OSS or Alibaba Cloud CDN for caching.'."\n"
+ .'- Up to 10 images can be processed per request.'."\n"
+ ."\n"
+ .'## Billing Information '."\n"
+ .'The Deepfake Face Detection capability is currently in public preview and can be invoked free of charge.',
+ 'responseParamsDescription' => '## SDK Reference '."\n"
+ .'Alibaba Cloud Vision AI recommends using a software development kit (SDK) to invoke the DeepfakeFace capability under the facebody category. The SDK supports multiple programming languages. When you invoke this capability, select an SDK package whose AI category is facebody. The file parameter supports local files and any URL when you use the SDK. For more information, see [SDK Overview](~~145033~~).',
+ 'extraInfo' => '## Reference Thresholds for Deepfake Face Detection'."\n"
+ .'By default, the returned **Label** is determined by a confidence level threshold of 50. If the confidence level is below 50, the **Label** is `normalface`; if above 50, the **Label** is `deepfakeface`. '."\n"
+ .'Confidence level represents the model\'s certainty, ranging from [0,100]. A lower value indicates a higher probability that the face is genuine. You can adjust the confidence threshold according to your specific scenario for more flexible usage. Internal experimental reference data is shown below.'."\n"
+ ."\n"
+ .'| Confidence Threshold | Fake Face Block Rate | Genuine Face Pass Rate |'."\n"
+ .'| ---- | ------------ | ---- |'."\n"
+ .'|15 |98.21% |80.27% |'."\n"
+ .'|30 |97.56% |87.59% |'."\n"
+ .'|40 |97.04% |90.67% |'."\n"
+ .'|50 (default) |95.09% |96.61% |'."\n"
+ .'|60 |92.50% |98.13% |'."\n"
+ .'|70 |90.59% |98.77% |'."\n"
+ ."\n"
+ .'Definitions of the metrics above:'."\n"
+ .'- Fake Face Block Rate: For example, 98% means that out of 100 fake face attacks, 98 are correctly identified and denied by the API.'."\n"
+ .'- Genuine Face Pass Rate: For example, 98% means that out of 100 genuine face requests, 98 successfully pass liveness verification.'."\n"
+ ."\n"
+ .'> Internal experimental data is provided for reference only.'."\n"
+ ."\n"
+ .'## Error Codes'."\n"
+ .'For error codes related to deepfake face detection, see [Common Error Codes](~~146756~~).'."\n"
+ ."\n"
+ .'## Security Statement'."\n"
+ .'- Ensure that the source of uploaded images or files complies with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded during testing or debugging are valid for 1 hour and will be automatically deleted by the system after 24 hours.'."\n"
+ .'- The platform does not store original facial images or file information involved during service usage.',
+ 'changeSet' => [],
+ 'ramActions' => [
+ [
+ 'operationType' => 'none',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:DeepfakeFace',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"DA7CAFEB-0A37-4496-9CDF-E3DBB6309CB2\\",\\n \\"Data\\": {\\n \\"Token\\": \\"2\\",\\n \\"TotalCount\\": 200,\\n \\"Entities\\": [\\n {\\n \\"DbName\\": \\"default\\",\\n \\"EntityId\\": \\"222\\",\\n \\"Labels\\": \\"视觉智能\\",\\n \\"CreatedAt\\": 1589203871832,\\n \\"FaceCount\\": 3,\\n \\"UpdatedAt\\": 1589203871832\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<ListFaceEntitiesResponse>\\n <RequestId>DA7CAFEB-0A37-4496-9CDF-E3DBB6309CB2</RequestId>\\n <Data>\\n <Token>2</Token>\\n <TotalCount>200</TotalCount>\\n <Entities>\\n <DbName>default</DbName>\\n <EntityId>222</EntityId>\\n <Labels>视觉智能</Labels>\\n <CreatedAt>1589203871832</CreatedAt>\\n <FaceCount>3</FaceCount>\\n <UpdatedAt>1589203871832</UpdatedAt>\\n </Entities>\\n </Data>\\n</ListFaceEntitiesResponse>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
],
- 'ListFaceDbs' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'DeleteFace' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -1321,31 +1807,17 @@
],
'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'get',
- ],
+ 'systemTags' => ['operationType' => 'delete'],
'parameters' => [
[
- 'name' => 'Offset',
+ 'name' => 'DbName',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int64',
- 'required' => false,
- 'example' => '1',
- ],
+ 'schema' => ['description' => 'The name of the database.', 'type' => 'string', 'required' => true, 'example' => 'default', 'title' => ''],
],
[
- 'name' => 'Limit',
+ 'name' => 'FaceId',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int64',
- 'required' => false,
- 'example' => '50',
- ],
+ 'schema' => ['description' => 'The ID of the face data.', 'type' => 'string', 'required' => true, 'example' => '001', 'title' => ''],
],
],
'responses' => [
@@ -1353,459 +1825,419 @@
'schema' => [
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '2B93C43A-F824-40C8-AF79-844342B0F43A',
- ],
- 'Data' => [
- 'description' => '',
- 'type' => 'object',
- 'properties' => [
- 'DbList' => [
- 'description' => '',
- 'type' => 'array',
- 'items' => [
- 'type' => 'object',
- 'properties' => [
- 'Name' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'default',
- ],
- ],
- ],
- ],
- ],
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => 'FAC90D32-2F04-5AD4-B94B-BAA163AB3724', 'title' => ''],
],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable.'],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"FAC90D32-2F04-5AD4-B94B-BAA163AB3724\\"\\n}","type":"json"}]',
+ 'title' => 'Delete a face',
+ 'summary' => 'This topic describes the syntax and examples of the DeleteFace operation.',
+ 'description' => '## Description'."\n"
+ .'The DeleteFace operation deletes face image information from a specified database.'."\n"
+ ."\n"
+ .'><warning>'."\n"
+ ."\n"
+ .'- Deleted face image information cannot be recovered. Proceed with caution.'."\n"
+ .'- You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) to get online assistance.'."\n"
+ .'- To inquire about API integration, usage, or other issues related to Alibaba Cloud Vision Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'></warning>.'."\n"
+ ."\n"
+ .'## Getting started'."\n"
+ .'1. Create an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to create an account.'."\n"
+ .'2. Activate the service: Make sure you have activated the [Face and Body service](https://vision.aliyun.com/facebody). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open).'."\n"
+ ."\n"
+ .'><notice>'."\n"
+ .'This feature is available to enterprise users or users who have completed verify your identity - Individual account. For more information about identity verification, see [Identity verification](https://help.aliyun.com/knowledge_list/37170.html).'."\n"
+ .'></notice>'."\n"
+ ."\n"
+ .'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using an AccessKey pair of a RAM user, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/facebody/2019-12-30/DeleteFace?lang=JAVA) to debug the operation online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development integration steps:'."\n"
+ .'- Select the SDK language you want to use from [SDK overview](~~145033~~).'."\n"
+ .'- Find and install the SDK package for the Face and Body category (facebody) in the corresponding SDK documentation.'."\n"
+ .'- Modify the sample code provided in the References as needed and invoke the operation.'."\n"
+ ."\n"
+ .'6. Direct client invocation: Common client invocation methods for this feature include the following:'."\n"
+ .'- [Direct invocation from web frontend](~~467779~~)'."\n"
+ .'- [Direct invocation from mini programs](~~467780~~)'."\n"
+ .'- [Direct invocation from Android](~~467781~~)'."\n"
+ .'- [Direct invocation from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Limits'."\n"
+ .'The default concurrency limit for the DeleteFace operation is 2 queries per second (QPS).'."\n"
+ ."\n"
+ .'## Billing'."\n"
+ .'The DeleteFace operation is free of charge.',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'We recommend that you use an SDK to call the DeleteFace operation under the Face and Body category of Alibaba Cloud Vision AI. The SDK supports multiple programming languages. When calling the operation, select the SDK package for the Face and Body category (facebody). File parameters support local files and arbitrary URLs when called through the SDK. For more information, see [SDK overview](~~145033~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For the error codes of the DeleteFace operation, see [Common faults](~~146756~~).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Make sure that the images or files you upload comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging console are valid for 1 hour and are automatically deleted by the system after 24 hours.'."\n"
+ .'- The platform does not store original face images or file information involved in your use of the service.'."\n"
+ .'- The platform freezes face feature vector data for users who have not made any API invocation for 6 months or more to ensure the information security of inactive users. To unfreeze data, contact us through the DingTalk group (23109592).',
+ 'changeSet' => [],
+ 'ramActions' => [
+ [
+ 'operationType' => 'delete',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:DeleteFace',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"2B93C43A-F824-40C8-AF79-844342B0F43A\\",\\n \\"Data\\": {\\n \\"DbList\\": [\\n {\\n \\"Name\\": \\"default\\"\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<ListFaceDbsResponse>\\n <RequestId>2B93C43A-F824-40C8-AF79-844342B0F43A</RequestId>\\n <Data>\\n <DbList>\\n <Name>default</Name>\\n </DbList>\\n </Data>\\n</ListFaceDbsResponse>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
],
- 'AddFaceImageTemplate' => [
- 'summary' => '图像人脸融合模板增加',
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'DeleteFaceDb' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
+ 'operationType' => 'write',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'create',
- ],
+ 'systemTags' => ['operationType' => 'delete'],
'parameters' => [
[
- 'name' => 'ImageURL',
+ 'name' => 'Name',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'https://invi-label.oss-cn-shanghai.aliyuncs.com/label/temp/faceswap/img_facefusion/template/sucai1.jpg',
- 'isFileTransferUrl' => true,
- ],
+ 'schema' => ['description' => 'The name of the database.', 'type' => 'string', 'required' => true, 'example' => 'default', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
- 'title' => 'Schema of Response',
- 'description' => 'Schema of Response',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'title' => 'Id of the request',
- 'description' => '',
- 'type' => 'string',
- 'example' => '798A721D-7C7F-4D87-A125-1D04B3055C2C',
- ],
- 'Data' => [
- 'description' => '',
- 'type' => 'object',
- 'properties' => [
- 'TemplateId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '6cd509ea-54fa-4730-8e9d-c94cadcda048',
- ],
- 'FaceInfos' => [
- 'description' => '',
- 'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'object',
- 'properties' => [
- 'TemplateFaceID' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'string 6cd509ea-54fa-4730-8e9d-c94cadcda048_0',
- ],
- 'FaceRect' => [
- 'description' => '',
- 'type' => 'object',
- 'properties' => [
- 'X' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '254',
- ],
- 'Y' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '318',
- ],
- 'Height' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '94',
- ],
- 'Width' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '89',
- ],
- ],
- ],
- ],
- ],
- ],
- ],
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '203AE658-CFE1-507D-B105-F88CD1F1F71B', 'title' => ''],
],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable.'],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"203AE658-CFE1-507D-B105-F88CD1F1F71B\\"\\n}","type":"json"}]',
+ 'title' => 'Delete a face database',
+ 'summary' => 'This topic describes the syntax and examples of the DeleteFaceDb operation.',
+ 'description' => '## Description'."\n"
+ .'The DeleteFaceDb operation deletes a specified face database.'."\n"
+ ."\n"
+ .'><warning>'."\n"
+ ."\n"
+ .'- A deleted database cannot be recovered. Proceed with caution.'."\n"
+ .'- You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) to get online assistance.'."\n"
+ .'- To inquire about API integration, usage, or issues related to Alibaba Cloud Vision Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'></warning>.'."\n"
+ ."\n"
+ .'## Getting started'."\n"
+ .'1. Create an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to create an account.'."\n"
+ .'2. Activate the service: Make sure you have activated the [Face and Body service](https://vision.aliyun.com/facebody). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open).'."\n"
+ ."\n"
+ .'><notice>'."\n"
+ .'This feature is available to enterprise users or users who verify your identity - Individual account. For more information about identity verification, see [Identity verification](https://help.aliyun.com/knowledge_list/37170.html).'."\n"
+ .'></notice>'."\n"
+ ."\n"
+ .'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using an AccessKey pair of a RAM user, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/facebody/2019-12-30/DeleteFaceDb?lang=JAVA) to debug this operation online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development integration steps:'."\n"
+ .'- Select the SDK language you want to use from [SDK overview](~~145033~~).'."\n"
+ .'- Find the SDK package for the Face and Body category (facebody) in the corresponding SDK documentation and install it.'."\n"
+ .'- Modify the sample code provided in the References as needed and invoke the operation.'."\n"
+ ."\n"
+ .'6. Direct client invocation: Common client invocation methods for this feature include the following:'."\n"
+ .'- [Direct invocation from web frontend](~~467779~~)'."\n"
+ .'- [Direct invocation from mini programs](~~467780~~)'."\n"
+ .'- [Direct invocation from Android](~~467781~~)'."\n"
+ .'- [Direct invocation from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Limits'."\n"
+ .'The default concurrency limit for the DeleteFaceDb operation is 2 queries per second (QPS).'."\n"
+ ."\n"
+ .'## Billing'."\n"
+ .'The DeleteFaceDb operation is free of charge.',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'We recommend that you use an SDK to call the DeleteFaceDb operation under the Face and Body category of Alibaba Cloud Vision AI. SDKs are available in multiple programming languages. When making the call, select the SDK package for the Face and Body category (facebody). File parameters support local files and arbitrary URLs when called through the SDK. For more information, see [SDK overview](~~145033~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For the fault codes of the DeleteFaceDb operation, see [Common fault codes](~~146756~~).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Make sure that the images or files you upload comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging console are valid for 1 hour and are automatically deleted by the system after 24 hours.'."\n"
+ .'- The platform does not store original face images or file information involved in the use of the service.'."\n"
+ .'- The platform freezes face feature vector data for users who have not made any API service invocation for 6 months or longer to ensure the information security of inactive users. To unfreeze the database, contact us through the DingTalk group (23109592).',
+ 'changeSet' => [],
+ 'ramActions' => [
+ [
+ 'operationType' => 'delete',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:DeleteFaceDb',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"798A721D-7C7F-4D87-A125-1D04B3055C2C\\",\\n \\"Data\\": {\\n \\"TemplateId\\": \\"6cd509ea-54fa-4730-8e9d-c94cadcda048\\",\\n \\"FaceInfos\\": [\\n {\\n \\"TemplateFaceID\\": \\"string 6cd509ea-54fa-4730-8e9d-c94cadcda048_0\\",\\n \\"FaceRect\\": {\\n \\"X\\": \\"254\\",\\n \\"Y\\": \\"318\\",\\n \\"Height\\": \\"94\\",\\n \\"Width\\": \\"89\\"\\n }\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<AddFaceImageTemplateResponse>\\n <RequestId>7BC58484-6724-508F-857D-0E7035AD5DEA</RequestId>\\n <Data>\\n <TemplateId>30f738a9-1e69-4ecb-8bbc-50bf0aa75e60</TemplateId>\\n </Data>\\n</AddFaceImageTemplateResponse>","errorExample":""}]',
],
- 'DeleteFaceImageTemplate' => [
- 'summary' => '图像人脸融合模板删除',
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'DeleteFaceEntity' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
+ 'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'delete',
- ],
+ 'systemTags' => ['operationType' => 'delete'],
'parameters' => [
[
- 'name' => 'TemplateId',
+ 'name' => 'DbName',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => '6cd509ea-54fa-4730-8e9d-c94cadcda048',
- ],
+ 'schema' => ['description' => 'The name of the database.', 'type' => 'string', 'required' => true, 'example' => 'default', 'title' => ''],
+ ],
+ [
+ 'name' => 'EntityId',
+ 'in' => 'formData',
+ 'schema' => ['description' => 'The entity ID, such as an employee ID. The value can contain digits, letters, and underscores.', 'type' => 'string', 'required' => true, 'example' => 'wood', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
- 'title' => 'Schema of Response',
- 'description' => 'Schema of Response',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'title' => 'Id of the request',
- 'description' => '',
- 'type' => 'string',
- 'example' => 'F9E76786-3A85-43C3-B79C-3175B4536252',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => 'DA7CAFEB-0A37-4496-9CDF-E3DBB6309CB2', 'title' => ''],
],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable.'],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"DA7CAFEB-0A37-4496-9CDF-E3DBB6309CB2\\"\\n}","type":"json"}]',
+ 'title' => 'Delete a face sample',
+ 'summary' => 'This topic describes the syntax and examples of the DeleteFaceEntity operation.',
+ 'description' => '## Feature description'."\n"
+ .'The delete face sample feature deletes face sample data from a face database.'."\n"
+ ."\n"
+ .'><warning>'."\n"
+ ."\n"
+ .'- Deleting a face sample also deletes all face data in the sample. This action is irreversible. Proceed with caution.'."\n"
+ .'- You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for online assistance.'."\n"
+ .'- To consult about API integration, usage, or issues related to Alibaba Cloud Vision Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'></warning>.'."\n"
+ ."\n"
+ .'## Integration guide'."\n"
+ .'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete account registration.'."\n"
+ .'2. Activate the service: Make sure you have activated the [Face and Body service](https://vision.aliyun.com/facebody). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open).'."\n"
+ .'><notice>'."\n"
+ .'This feature is available to enterprise users or users who have completed verify your identity - Individual account. For more information about identity verification, see [Identity verification](https://help.aliyun.com/knowledge_list/37170.html).'."\n"
+ .'></notice>'."\n"
+ ."\n"
+ .'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using an AccessKey pair of a RAM user, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/facebody/2019-12-30/DeleteFaceEntity?lang=JAVA) to debug the feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development integration steps:'."\n"
+ .'- Select the SDK language you want to use from [SDK overview](~~145033~~).'."\n"
+ .'- Find and install the SDK package for the Face and Body category (facebody) in the corresponding SDK documentation.'."\n"
+ .'- Modify the sample code provided in the References as needed and invoke the operation.'."\n"
+ ."\n"
+ .'6. Direct client invocation: Common client invocation methods for this feature include the following.'."\n"
+ .'- [Direct invocation from web frontend](~~467779~~)'."\n"
+ .'- [Direct invocation from mini programs](~~467780~~)'."\n"
+ .'- [Direct invocation from Android](~~467781~~)'."\n"
+ .'- [Direct invocation from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Limits'."\n"
+ .'The default concurrency for submitting tasks through the delete face sample operation is 2 QPS.'."\n"
+ ."\n"
+ .'## Billing description'."\n"
+ .'The delete face sample feature is free of charge.',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'We recommend that you use an SDK to call the delete face sample operation under the Face and Body category of Alibaba Cloud Vision AI. The SDK supports multiple programming languages. When making the call, select the SDK package for the Face and Body category (facebody). File parameters support local files and arbitrary URLs through SDK calls. For more information, see [SDK overview](~~145033~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of the delete face sample operation, see [Common error codes](~~146756~~).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Ensure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging console are valid for 1 hour and are automatically deleted by the system after 24 hours.'."\n"
+ .'- The platform does not store original face images or file information involved during service usage.'."\n"
+ .'- The platform freezes face feature vector data for users who have not made any API service invocation for 6 months or longer to ensure the information security of inactive users. To unfreeze the data, contact us through the DingTalk group (23109592).',
+ 'changeSet' => [],
+ 'ramActions' => [
+ [
+ 'operationType' => 'delete',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:DeleteFaceEntity',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"F9E76786-3A85-43C3-B79C-3175B4536252\\"\\n}","errorExample":""},{"type":"xml","example":"<RequestId>F9E76786-3A85-43C3-B79C-3175B4536252</RequestId>","errorExample":""}]',
],
- 'QueryFaceImageTemplate' => [
- 'summary' => '图像人脸融合模板查询',
- 'methods' => [
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'DeleteFaceImageTemplate' => [
+ 'summary' => 'This topic describes the syntax and examples of the DeleteFaceImageTemplate operation for deleting a face image template.',
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'get',
- ],
+ 'systemTags' => ['operationType' => 'delete'],
'parameters' => [
[
'name' => 'TemplateId',
- 'in' => 'query',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => false,
- 'example' => '6cd509ea-54fa-4730-8e9d-c94cadcda048',
- ],
- ],
- [
- 'name' => 'PageNo',
- 'in' => 'query',
- 'schema' => [
- 'type' => 'integer',
- 'format' => 'int64',
- 'maximum' => '5000',
- 'minimum' => '1',
- 'default' => '1',
- ],
- ],
- [
- 'name' => 'PageSize',
- 'in' => 'query',
- 'schema' => [
- 'type' => 'integer',
- 'format' => 'int64',
- 'maximum' => '500',
- 'minimum' => '1',
- 'example' => '100',
- 'default' => '100',
- ],
+ 'in' => 'formData',
+ 'schema' => ['description' => 'The ID of the template to delete.', 'type' => 'string', 'required' => true, 'example' => '6cd509ea-54fa-4730-8e9d-c94cadcda048', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
- 'title' => 'Schema of Response',
+ 'title' => '',
'description' => 'Schema of Response',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'title' => 'Id of the request',
- 'description' => '',
- 'type' => 'string',
- 'example' => '7C29675C-751F-4D2F-86FB-2BD8D69AC860',
- ],
- 'Data' => [
- 'description' => '',
- 'type' => 'object',
- 'properties' => [
- 'Total' => [
- 'type' => 'integer',
- 'format' => 'int64',
- ],
- 'Elements' => [
- 'description' => '',
- 'type' => 'array',
- 'items' => [
- 'type' => 'object',
- 'properties' => [
- 'CreateTime' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '2021-01-29 10:19:05',
- ],
- 'UpdateTime' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '2021-01-29 10:19:05',
- ],
- 'UserId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'zhangsan',
- ],
- 'TemplateId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '6cd509ea-54fa-4730-8e9d-c94cadcda048',
- ],
- 'TemplateURL' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/MergeImageFace/MergeImageFace-1.png',
- ],
- 'FaceInfos' => [
- 'description' => '',
- 'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'object',
- 'properties' => [
- 'TemplateFaceID' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '6cd509ea-54fa-4730-8e9d-c94cadcda048',
- ],
- 'FaceRect' => [
- 'description' => '',
- 'type' => 'object',
- 'properties' => [
- 'X' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '254',
- ],
- 'Y' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '318',
- ],
- 'Height' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '94',
- ],
- 'Width' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '89',
- ],
- ],
- ],
- ],
- ],
- ],
- ],
- ],
- ],
- ],
- ],
+ 'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => 'F9E76786-3A85-43C3-B79C-3175B4536252'],
],
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable.'],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"F9E76786-3A85-43C3-B79C-3175B4536252\\"\\n}","type":"json"}]',
+ 'title' => 'Delete a face image template',
+ 'description' => '## Description'."\n"
+ .'The DeleteFaceImageTemplate operation deletes a face template that you previously added.'."\n"
+ ."\n"
+ .'> - You can join the Chinese-language DingTalk group (ID 23109592) to contact Alibaba Cloud Visual Intelligence Open Platform technical support.'."\n"
+ .'- For help with API integration, usage, or troubleshooting for Alibaba Cloud Visual Intelligence Open Platform, join the DingTalk group (23109592).'."\n"
+ ."\n"
+ .'## Getting started'."\n"
+ .'1. Create an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.alibabacloud.com) and click **Register** in the upper-right corner. Follow the on-screen instructions to complete the registration.'."\n"
+ .'2. Activate the service: Make sure that you have activated the [Face and Body service](https://vision.aliyun.com/facebody). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open).'."\n"
+ .'><notice>'."\n"
+ .'This feature is available only to users who have completed verify your identity - Enterprise account. For more information about real-name verification, see [Real-name verification](https://help.aliyun.com/knowledge_list/37170.html).'."\n"
+ .'></notice>'."\n"
+ ."\n"
+ .'3. Create an AccessKey pair: Make sure that you have [created an AccessKey pair](~~175144~~). If you are using an AccessKey pair of a RAM user, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/facebody/2019-12-30/DeleteFaceImageTemplate?lang=JAVA&sdkStyle=old&params=%7B%7D&tab=DEMO) to debug the operation online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Prerequisites: You have created a TemplateId by invoking the [increase face image template](~~203512~~) (AddFaceImageTemplate) operation.'."\n"
+ .'6. Development steps:'."\n"
+ .'- Select the SDK language that you want to use from the [SDK overview](~~145033~~).'."\n"
+ .'- Find and install the SDK package for the Face and Body category (facebody) in the corresponding SDK documentation.'."\n"
+ .'- Modify the sample code provided in the References as needed and invoke the operation.'."\n"
+ ."\n"
+ .'7. Direct client calls: Common client call methods for this operation include the following:'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from a mini program](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'We recommend that you use an SDK to call the DeleteFaceImageTemplate operation of the Face and Body category in Alibaba Cloud Visual Intelligence AI. The SDK supports multiple programming languages. When calling the operation, select the SDK package for the Face and Body category (facebody). File parameters support local files and URLs when using the SDK. For more information, see [SDK overview](~~145033~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of the DeleteFaceImageTemplate operation, see [Common error codes](~~146756~~).'."\n"
+ ."\n\n"
+ .'## Security notice'."\n"
+ .'- Make sure that the images or files you upload comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging console are valid for 1 hour and are automatically deleted by the system after 24 hours.',
+ 'changeSet' => [],
+ 'ramActions' => [
+ [
+ 'operationType' => 'delete',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:DeleteFaceImageTemplate',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"7C29675C-751F-4D2F-86FB-2BD8D69AC860\\",\\n \\"Data\\": {\\n \\"Total\\": 20,\\n \\"Elements\\": [\\n {\\n \\"CreateTime\\": \\"2021-01-29 10:19:05\\",\\n \\"UpdateTime\\": \\"2021-01-29 10:19:05\\",\\n \\"UserId\\": \\"zhangsan\\",\\n \\"TemplateId\\": \\"6cd509ea-54fa-4730-8e9d-c94cadcda048\\",\\n \\"TemplateURL\\": \\"http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/MergeImageFace/MergeImageFace-1.png\\",\\n \\"FaceInfos\\": [\\n {\\n \\"TemplateFaceID\\": \\"6cd509ea-54fa-4730-8e9d-c94cadcda048\\",\\n \\"FaceRect\\": {\\n \\"X\\": \\"254\\",\\n \\"Y\\": \\"318\\",\\n \\"Height\\": \\"94\\",\\n \\"Width\\": \\"89\\"\\n }\\n }\\n ]\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<QueryFaceImageTemplateResponse>\\n <RequestId>7C29675C-751F-4D2F-86FB-2BD8D69AC860</RequestId>\\n <Data>\\n <Total>20</Total>\\n <Elements>\\n <CreateTime>2021-01-29 10:19:05</CreateTime>\\n <UpdateTime>2021-01-29 10:19:05</UpdateTime>\\n <UserId>zhangsan</UserId>\\n <TemplateId>6cd509ea-54fa-4730-8e9d-c94cadcda048</TemplateId>\\n <TemplateURL>http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/MergeImageFace/MergeImageFace-1.png</TemplateURL>\\n <FaceInfos>\\n <TemplateFaceID>6cd509ea-54fa-4730-8e9d-c94cadcda048</TemplateFaceID>\\n <FaceRect>\\n <X>254</X>\\n <Y>318</Y>\\n <Height>94</Height>\\n <Width>89</Width>\\n </FaceRect>\\n </FaceInfos>\\n </Elements>\\n </Data>\\n</QueryFaceImageTemplateResponse>","errorExample":""}]',
],
- 'BlurFace' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'DetectBodyCount' => [
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -1818,13 +2250,7 @@
[
'name' => 'ImageURL',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/BlurFace/BlurFace1.png',
- 'isFileTransferUrl' => true,
- ],
+ 'schema' => ['description' => 'The URL of the image. We recommend that you use an Object Storage Service (OSS) URL in the Shanghai region. If the file is stored locally or the OSS URL is in a region other than Shanghai, refer to [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/DetectBodyCount/DetectBodyCount3.jpg', 'title' => ''],
],
],
'responses' => [
@@ -1832,67 +2258,109 @@
'schema' => [
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '4C6080B0-64C4-488E-BBA6-245749CA11AD',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '1C709078-8886-4C91-AEDE-4E04EED0A689', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned data.',
'type' => 'object',
'properties' => [
- 'ImageURL' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'http://viapi-cn-shanghai-dha-segmenter.oss-cn-shanghai.aliyuncs.com/upload/result_FaceBlur/2020-8-5/invi_FaceBlur_015966077063461060948_IBdDsq.jpg?Expires=1596609506&OSSAccessKeyId=LTAI4FoLmvQ9urWXgSRp****&Signature=x8n3jq1X91Sq7BKWE4vRHSu6g9****',
- ],
- 'MaskURL' => [
- 'type' => 'string',
- ],
+ 'PersonNumber' => ['description' => 'The number of human bodies detected.', 'type' => 'integer', 'format' => 'int32', 'example' => '6', 'title' => ''],
],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable.'],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"1C709078-8886-4C91-AEDE-4E04EED0A689\\",\\n \\"Data\\": {\\n \\"PersonNumber\\": 6\\n }\\n}","type":"json"}]',
+ 'title' => 'Body counting',
+ 'summary' => 'This topic describes the syntax and examples of the DetectBodyCount operation.',
+ 'description' => '## Description'."\n"
+ .'The body counting feature detects the number of human bodies in an input image.'."\n"
+ ."\n"
+ .'> - You can join [online consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for human assistance.'."\n"
+ .'- You can try this feature for free on the Visual Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=DetectBodyCount) to experience this feature or purchase it online.'."\n"
+ .'- For questions about API integration or usage of Alibaba Cloud Visual Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Getting started'."\n"
+ .'1. Create an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to create an account.'."\n"
+ .'2. Activate the service: Make sure you have activated the [Face and Body service](https://vision.aliyun.com/facebody). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open).'."\n"
+ ."\n"
+ .'> This feature is available to enterprise users or users who verify your identity - Individual account. For more information about identity verification, refer to [Identity Verification](https://help.aliyun.com/knowledge_list/37170.html).'."\n"
+ ."\n"
+ .'3. Create an AccessKey: Make sure you have [created an AccessKey](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, refer to [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/facebody/2019-12-30/DetectBodyCount?lang=JAVA&sdkStyle=old&params=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Ffacebody%2FDetectBodyCount%2FDetectBodyCount1.jpg%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development integration steps:'."\n"
+ .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
+ .'- Find the SDK package for the Face and Body (facebody) category in the corresponding SDK documentation and install it.'."\n"
+ .'- Modify the sample code provided in the References as needed and invoke the operation.'."\n"
+ ."\n"
+ .'6. Sample code: For sample code in common programming languages, refer to [DetectBodyCount sample code](~~478769~~).'."\n"
+ ."\n"
+ .'7. Direct client calls: Common client call methods for this feature include the following:'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from mini programs](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Input limits'."\n"
+ ."\n"
+ .'- Image format: JPEG, JPG, BMP, or PNG.'."\n"
+ .'- Image size: up to 3 MB.'."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ ."\n"
+ .'## Billing'."\n"
+ .'For information about the billable methods and pricing of body counting, refer to [Billing overview](~~184049~~).'."\n"
+ ."\n"
+ .'> The debugging operation below is a paid operation. For a free trial, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=DetectBodyCount).',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'We recommend that you use an SDK to call the body counting feature under the Face and Body category of Alibaba Cloud Visual AI. Multiple programming languages are supported. When calling this operation, select the SDK package for the Face and Body (facebody) category. The SDK supports local files and arbitrary URLs for file parameters. For more information, refer to [SDK overview](~~145033~~).'."\n"
+ ."\n"
+ .'## Sample code'."\n"
+ .'For sample code in common programming languages, refer to [DetectBodyCount sample code](~~478769~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of body counting, refer to [Common error codes](~~146756~~).'."\n"
+ ."\n\n"
+ .'## Security notice'."\n"
+ ."\n"
+ .'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.',
+ 'changeSet' => [],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:DetectBodyCount',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"4C6080B0-64C4-488E-BBA6-245749CA11AD\\",\\n \\"Data\\": {\\n \\"ImageURL\\": \\"http://viapi-cn-shanghai-dha-segmenter.oss-cn-shanghai.aliyuncs.com/upload/result_FaceBlur/2020-8-5/invi_FaceBlur_015966077063461060948_IBdDsq.jpg?Expires=1596609506&OSSAccessKeyId=LTAI****************&Signature=x8n3jq1X91Sq7BKWE4vRHSu6g9****\\",\\n \\"MaskURL\\": \\"http://vibktprfx-prod-prod-aic-gd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/person-image-cartoonizer/59697D68-2A6E-4553-89BD-0FADD07881E8_7ee5_20201027-070958.jpg?Expires=1603784400&OSSAccessKeyId=LTAI****************&Signature=ut2kn46Lz%2FRwqJ9jWJ0RBDut12****\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<BlurFaceResponse>\\n <RequestId>4C6080B0-64C4-488E-BBA6-245749CA11AD</RequestId>\\n <Data>\\n <ImageURL>http://viapi-cn-shanghai-dha-segmenter.oss-cn-shanghai.aliyuncs.com/upload/result_FaceBlur/2020-8-5/invi_FaceBlur_015966077063461060948_IBdDsq.jpg?Expires=1596609506&amp;OSSAccessKeyId=LTAI****************&amp;Signature=x8n3jq1X91Sq7BKWE4vRHSu6g9****</ImageURL>\\n <MaskURL>http://vibktprfx-prod-prod-aic-gd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/person-image-cartoonizer/59697D68-2A6E-4553-89BD-0FADD07881E8_7ee5_20201027-070958.jpg?Expires=1603784400&amp;OSSAccessKeyId=LTAI****************&amp;Signature=ut2kn46Lz%2FRwqJ9jWJ0RBDut12****</MaskURL>\\n </Data>\\n</BlurFaceResponse>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
],
- 'CompareFace' => [
- 'summary' => '人脸比对(1:1)',
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'DetectCelebrity' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -1903,58 +2371,9 @@
'systemTags' => [],
'parameters' => [
[
- 'name' => 'QualityScoreThreshold',
- 'in' => 'formData',
- 'schema' => [
- 'title' => '质量分阈值,取值范围 [0.0, 100.0], 0.0或空 表示不做质量分判断逻辑。',
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'required' => false,
- 'example' => '75.12',
- ],
- ],
- [
- 'name' => 'ImageURLA',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => false,
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/CompareFace/CompareFace-right1.png',
- 'isFileTransferUrl' => true,
- ],
- ],
- [
- 'name' => 'ImageURLB',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => false,
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/CompareFace/CompareFace-left1.png',
- 'isFileTransferUrl' => true,
- ],
- ],
- [
- 'name' => 'ImageDataA',
+ 'name' => 'ImageURL',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => false,
- 'example' => '/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgK****',
- ],
- ],
- [
- 'name' => 'ImageDataB',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => false,
- 'example' => '/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgQ****',
- ],
+ 'schema' => ['description' => 'The URL of the image. We recommend that you use an Object Storage Service (OSS) link in the Shanghai region. If the file is stored locally or the OSS link is not in the Shanghai region, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'https://viapi-oss.oss-cn-shanghai.aliyuncs.com/doc/facebody/xxx.jpg', 'title' => ''],
],
],
'responses' => [
@@ -1963,144 +2382,132 @@
'description' => '1',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '4E92C0D4-BB0F-4F25-AD13-E87D02FAA205', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned data.',
'type' => 'object',
'properties' => [
- 'Thresholds' => [
- 'description' => '1',
- 'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '[61,69,75]',
- ],
- ],
- 'RectBList' => [
- 'description' => '1',
- 'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '',
- ],
- ],
- 'Confidence' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '',
- ],
- 'RectAList' => [
- 'description' => '1',
+ 'FaceRecognizeResults' => [
+ 'description' => 'The recognition results.',
'type' => 'array',
'items' => [
+ 'type' => 'object',
+ 'properties' => [
+ 'FaceBoxes' => [
+ 'description' => '1',
+ 'type' => 'array',
+ 'items' => ['description' => 'The coordinates of the face bounding box. The format is `[x, y, width, height]`. x and y are the coordinates of the upper-left corner of the face bounding box. width and height are the width and height of the face bounding box. The values of x, y, width, and height are ratios relative to the width and height of the input image.', 'type' => 'number', 'format' => 'float', 'example' => '[0.285,0.202,0.534,0.721]', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'Name' => ['description' => 'The name of the recognized celebrity.', 'type' => 'string', 'example' => '张三', 'title' => ''],
+ ],
'description' => '',
- 'type' => 'integer',
- 'format' => 'int32',
+ 'title' => '',
'example' => '',
],
- ],
- 'QualityScoreA' => [
- 'title' => '输入图像A的质量分',
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '75.16',
- ],
- 'QualityScoreB' => [
- 'title' => '输入图像A的质量分',
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '75.20',
- ],
- 'MessageTips' => [
- 'title' => '信息提示信息,纯文字描述,目前支持质量分的提示信息',
- 'description' => '',
- 'type' => 'string',
- 'example' => 'imageB quality score less threshold',
- ],
- 'IsMaskA' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int64',
+ 'title' => '',
'example' => '',
],
- 'IsMaskB' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '',
- ],
- 'LandmarksAList' => [
- 'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '',
- ],
- ],
- 'LandmarksBList' => [
- 'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '',
- ],
- ],
+ 'Width' => ['description' => 'The image width, in pixels.', 'type' => 'integer', 'format' => 'int32', 'example' => '1000', 'title' => ''],
+ 'Height' => ['description' => 'The image height, in pixels.', 'type' => 'integer', 'format' => 'int32', 'example' => '1000', 'title' => ''],
],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'title' => '',
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable.'],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"4E92C0D4-BB0F-4F25-AD13-E87D02FAA205\\",\\n \\"Data\\": {\\n \\"FaceRecognizeResults\\": [\\n {\\n \\"FaceBoxes\\": [\\n 0\\n ],\\n \\"Name\\": \\"张三\\"\\n }\\n ],\\n \\"Width\\": 1000,\\n \\"Height\\": 1000\\n }\\n}","type":"json"}]',
+ 'title' => 'Celebrity recognition',
+ 'summary' => 'This topic describes the syntax and examples of the celebrity recognition operation DetectCelebrity.',
+ 'description' => '## Description'."\n"
+ .'The celebrity recognition feature identifies celebrity figures in images. It can recognize more than 27,000 celebrities.'."\n"
+ ."\n"
+ .'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for online assistance.'."\n"
+ .'- You can try this feature for free on the Visual Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=DetectCelebrity) to experience this feature or purchase it online.'."\n"
+ .'- To get help with API integration, usage, or other questions about the Alibaba Cloud Visual Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Getting started'."\n"
+ .'1. Create an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete registration.'."\n"
+ .'2. Activate the feature:'."\n"
+ .'- Make sure you have activated the [Face and Body service](https://vision.aliyun.com/facebody). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open).'."\n"
+ .'- After activating the service, [commit an application](https://vision.console.aliyun.com/cn-shanghai/applyopen/facebody/DetectCelebrity). You can use this feature only after your application is approved.'."\n"
+ ."\n"
+ .'><notice>'."\n"
+ .'This feature is available only to users who verify your identity - Enterprise account. For more information about identity verification, see [Identity verification](https://help.aliyun.com/knowledge_list/37170.html).'."\n"
+ .'></notice>'."\n"
+ ."\n"
+ .'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using an AccessKey pair of a RAM user, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/facebody/2019-12-30/DetectCelebrity?lang=JAVA&sdkStyle=dara&params=%7B%22ImageURL%22%3A%22%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development integration steps:'."\n"
+ .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
+ .'- Find the SDK package for the Face and Body (facebody) category in the corresponding SDK documentation and install it.'."\n"
+ .'- Modify the sample code provided in the references as needed and invoke the operation.'."\n"
+ ."\n"
+ .'6. Direct client calls: Common client call methods for this feature include the following.'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from mini programs](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Input limits'."\n"
+ .'- Image format: JPEG, JPG, or PNG.'."\n"
+ .'- Image size: up to 3 MB.'."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ ."\n"
+ .'## Billing'."\n"
+ .'For information about the billable methods and pricing of celebrity recognition, see [Billing overview](~~184049~~).'."\n"
+ ."\n"
+ .'> The debugging operation below is a paid operation. To try it for free, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=DetectCelebrity).',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'We recommend that you use an SDK to call the celebrity recognition feature under the Face and Body category of Alibaba Cloud Visual AI. SDKs are available in multiple programming languages. When making calls, select the SDK package for the Face and Body (facebody) category. The SDK supports both local files and arbitrary URLs for file parameters. For more information, see [SDK overview](~~145033~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of celebrity recognition, see [Common error codes](~~146756~~).'."\n"
+ ."\n"
+ .'## Open source Playground'."\n"
+ .'For more open source free model experiences and downloads, visit ModelScope: [Face Recognition OOD Model](https://modelscope.cn/models/damo/cv_ir_face-recognition-ood_rts/summary), [ArcFace Face Recognition Model](https://modelscope.cn/models/damo/cv_ir50_face-recognition_arcface/summary), [IR Face Recognition Model FRIR](https://modelscope.cn/models/damo/cv_manual_face-recognition_frir/summary), [Masked Face Recognition Model FRFM-large](https://modelscope.cn/models/damo/cv_manual_face-recognition_frfm/summary), [Masked Face Recognition Model FaceMask](https://modelscope.cn/models/damo/cv_resnet_face-recognition_facemask/summary).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.'."\n"
+ .'- The platform does not store original face images or file information involved in the use of the service.',
+ 'changeSet' => [],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:DetectCelebrity',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"B352CD68-C847-5C48-BE68-3F266356FDD7\\",\\n \\"Data\\": {\\n \\"Thresholds\\": [\\n 0\\n ],\\n \\"RectBList\\": [\\n 0\\n ],\\n \\"Confidence\\": 88.4831771850586,\\n \\"RectAList\\": [\\n 0\\n ],\\n \\"QualityScoreA\\": 99.65772247314453,\\n \\"QualityScoreB\\": 98.01177978515625,\\n \\"MessageTips\\": \\"imageB quality score less threshold\\",\\n \\"IsMaskA\\": 0,\\n \\"IsMaskB\\": 0,\\n \\"LandmarksAList\\": [\\n 0\\n ],\\n \\"LandmarksBList\\": [\\n 0\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<CompareFaceResponse>\\n <RequestId>B352CD68-C847-5C48-BE68-3F266356FDD7</RequestId>\\n <Data>\\n <Thresholds>61</Thresholds>\\n <Thresholds>69</Thresholds>\\n <Thresholds>75</Thresholds>\\n <RectBList>169</RectBList>\\n <RectBList>48</RectBList>\\n <RectBList>125</RectBList>\\n <RectBList>162</RectBList>\\n <Confidence>88.4831771850586</Confidence>\\n <RectAList>157</RectAList>\\n <RectAList>82</RectAList>\\n <RectAList>147</RectAList>\\n <RectAList>188</RectAList>\\n <QualityScoreA>99.65772247314453</QualityScoreA>\\n <QualityScoreB>98.01177978515625</QualityScoreB>\\n <IsMaskA>0</IsMaskA>\\n <IsMaskB>0</IsMaskB>\\n <LandmarksAList>201</LandmarksAList>\\n <LandmarksAList>146</LandmarksAList>\\n <LandmarksAList>266</LandmarksAList>\\n <LandmarksAList>159</LandmarksAList>\\n <LandmarksAList>222</LandmarksAList>\\n <LandmarksAList>190</LandmarksAList>\\n <LandmarksAList>187</LandmarksAList>\\n <LandmarksAList>208</LandmarksAList>\\n <LandmarksAList>255</LandmarksAList>\\n <LandmarksAList>219</LandmarksAList>\\n <LandmarksBList>199</LandmarksBList>\\n <LandmarksBList>115</LandmarksBList>\\n <LandmarksBList>248</LandmarksBList>\\n <LandmarksBList>109</LandmarksBList>\\n <LandmarksBList>215</LandmarksBList>\\n <LandmarksBList>146</LandmarksBList>\\n <LandmarksBList>206</LandmarksBList>\\n <LandmarksBList>167</LandmarksBList>\\n <LandmarksBList>260</LandmarksBList>\\n <LandmarksBList>162</LandmarksBList>\\n </Data>\\n</CompareFaceResponse>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
],
'DetectFace' => [
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -2108,63 +2515,32 @@
],
'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'none',
- ],
+ 'systemTags' => ['operationType' => 'none'],
'parameters' => [
[
'name' => 'ImageURL',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/DetectFace/DetectFace1.png',
- 'isFileTransferUrl' => true,
- ],
+ 'schema' => ['description' => 'The URL of the image. We recommend that you use an OSS link in the China (Shanghai) region. For local files or OSS links in other regions, see [File URL Processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/DetectFace/DetectFace1.png', 'title' => ''],
],
[
'name' => 'Landmark',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'boolean',
- 'required' => false,
- 'example' => 'true',
- ],
+ 'schema' => ['description' => 'Specifies whether to return facial landmark localization results. Valid values: true and false.', 'type' => 'boolean', 'required' => false, 'example' => 'true', 'title' => ''],
],
[
'name' => 'Quality',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'boolean',
- 'required' => false,
- 'example' => 'true',
- ],
+ 'schema' => ['description' => 'Specifies whether to return face quality information. Valid values: true and false.', 'type' => 'boolean', 'required' => false, 'example' => 'true', 'title' => ''],
],
[
'name' => 'Pose',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'boolean',
- 'required' => false,
- 'example' => 'true',
- ],
+ 'schema' => ['description' => 'Specifies whether to return face pose information. Valid values: true and false.', 'type' => 'boolean', 'required' => false, 'example' => 'true', 'title' => ''],
],
[
'name' => 'MaxFaceNumber',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int64',
- 'required' => false,
- 'maximum' => '40',
- 'minimum' => '1',
- 'example' => '1',
- ],
+ 'schema' => ['description' => 'The maximum number of faces to return from the image. Valid values: 1 to 30. Set this parameter correctly if you want to return multiple face detection results. Results are sorted in descending order by the FaceProbabilityList response parameter by default.', 'type' => 'integer', 'format' => 'int64', 'maximum' => '40', 'minimum' => '1', 'required' => false, 'example' => '1', 'title' => ''],
],
],
'responses' => [
@@ -2173,220 +2549,252 @@
'description' => '1',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '26B5334B-FD8A-5994-A1DA-3CA8F7B25676', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned result data.',
'type' => 'object',
'properties' => [
'FaceProbabilityList' => [
'description' => '1',
'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '',
- ],
+ 'items' => ['description' => 'The probability that the detected region contains a face. Valid values: 0 to 1. If multiple faces are detected, the probabilities are returned in sequence. For example, if two faces are detected, the result is `[face_prob1, face_prob2]`. A higher value indicates a larger face region, a clearer face, and a more frontal face in the image.', 'type' => 'number', 'format' => 'float', 'example' => '0.96', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
],
'Pupils' => [
'description' => '1',
'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'double',
- 'example' => '',
- ],
+ 'items' => ['description' => 'The center coordinates and radius of the left and right pupils. Each face has 6 floating-point numbers in the following order: `[left_iris_cenpt.x, left_iris_cenpt.y, left_iris_radius, right_iris_cenpt.x, right_iris_cenpt.y, right_iris_radis]`.', 'type' => 'number', 'format' => 'double', 'example' => '[417.83, 226.09, 8.15, 517.46, 231.53, 8.15]', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
],
'FaceRectangles' => [
'description' => '1',
'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '',
- ],
- ],
- 'FaceCount' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '1',
+ 'items' => ['description' => 'The face bounding box coordinates in the format `[left, top, width, height]`. If multiple faces are detected, the bounding boxes are returned in sequence. For example, if two faces are detected, the result is `[left1, top1, width1, height1, left2, top2, width2, height2]`.'."\n"
+ .'left-top: The position of the upper-left corner of the bounding box relative to the upper-left corner of the image (x, y), where x is the distance in pixels from the left edge and y is the distance in pixels from the top edge.'."\n"
+ .'width-height: The width and height of the bounding box.'."\n"
+ .'The area of the bounding box is width × height, and the lower-right corner coordinates are (left+width, top+height).', 'type' => 'integer', 'format' => 'int32', 'example' => '[358, 141, 207, 255]', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
],
+ 'FaceCount' => ['description' => 'The number of detected faces.', 'type' => 'integer', 'format' => 'int32', 'example' => '1', 'title' => ''],
'PoseList' => [
'description' => '1',
'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '',
- ],
+ 'items' => ['description' => 'The face pose angles in the format `[yaw, pitch, roll]`. If multiple faces are detected, the values are returned in sequence.'."\n"
+ ."\n"
+ .'- yaw: the left-right angle. Valid values: -90 to 90.'."\n"
+ ."\n"
+ .'- pitch: the up-down angle. Valid values: -90 to 90.'."\n"
+ ."\n"
+ .'- roll: the in-plane rotation angle. Valid values: -180 to 180.', 'type' => 'number', 'format' => 'float', 'example' => '[5.02, -3.95, 2.41]', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
],
'Landmarks' => [
'description' => '1',
'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '',
- ],
+ 'items' => ['description' => 'The facial landmark localization results. Each face returns a set of landmark positions in the format `(x0, y0, x1, y1, ...)`. If multiple faces are detected, the floating-point values are returned in sequence.', 'type' => 'number', 'format' => 'float', 'example' => '[381.1, 201.72, 448.09, 205.17, 415.19, 191.2, 415.28, 201.64, 391.35, 196.03, 403.15, 191.57, 426.94, 194.07, 438.42, 197.65, ......]', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
],
'LandmarkScore' => [
'type' => 'array',
- 'items' => [
- 'type' => 'number',
- 'format' => 'float',
- ],
- ],
- 'LandmarkCount' => [
+ 'items' => ['description' => 'The comprehensive score for landmark detection. Valid values: (0, 100]. A threshold of 85 is recommended (you can determine whether to set a threshold and the appropriate threshold value based on your actual application scenario in Settings). A higher score indicates better landmark quality for the face, which is more favorable for recognition. This score can be used for filtering face samples.', 'type' => 'number', 'format' => 'float', 'example' => '95.89', 'title' => ''],
'description' => '',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '105',
+ 'title' => '',
+ 'example' => '',
],
+ 'LandmarkCount' => ['description' => 'The number of facial landmarks. Currently fixed at 105 points: 24 for eyebrows, 32 for eyes, 6 for nose, 34 for mouth, and 9 for face contour.', 'type' => 'integer', 'format' => 'int32', 'example' => '105', 'title' => ''],
'Qualities' => [
- 'description' => '',
+ 'description' => 'The face quality information. Higher scores indicate better suitability for recognition.',
'type' => 'object',
'properties' => [
'ScoreList' => [
'description' => '1',
'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '',
- ],
+ 'items' => ['description' => 'The comprehensive quality score. Higher scores indicate better suitability for recognition. Valid values: (0, 100]. If multiple faces are detected, the scores are returned in sequence. For recognition, a threshold of 85 or higher is recommended (you can determine whether to set a threshold and the appropriate threshold value based on your actual application scenario in Settings). A score above 85 indicates higher overall image quality, while a score below 85 indicates lower overall image quality.', 'type' => 'number', 'format' => 'float', 'example' => '99.92', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
],
'BlurList' => [
'description' => '1',
'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '',
- ],
+ 'items' => ['description' => 'The score for the impact of face blur on recognition. Higher scores indicate better suitability for recognition. Valid values: (0, 100]. If multiple faces are detected, the scores are returned in sequence. For recognition, a threshold of 85 or higher is recommended (you can determine whether to set a threshold and the appropriate threshold value based on your actual application scenario in Settings). A score above 85 indicates a lower probability of image blur, while a score below 85 indicates a higher probability of image blur.', 'type' => 'number', 'format' => 'float', 'example' => '99.21', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
],
'FnfList' => [
'description' => '1',
'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '100',
- ],
+ 'items' => ['description' => 'The score for whether the target is a face and its impact on recognition. Higher scores indicate better suitability for recognition. Valid values: (0, 100]. If multiple faces are detected, the scores are returned in sequence. For recognition, a threshold of 85 or higher is recommended (you can determine whether to set a threshold and the appropriate threshold value based on your actual application scenario in Settings). A score above 85 indicates a higher probability that the image contains a face, while a score below 85 indicates a lower probability.', 'type' => 'number', 'format' => 'float', 'example' => '100', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
],
'GlassList' => [
'description' => '1',
'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '',
- ],
+ 'items' => ['description' => 'The score for the impact of upper-face occlusion such as glasses on recognition. Higher scores indicate better suitability for recognition. Valid values: (0, 100]. If multiple faces are detected, the scores are returned in sequence. For recognition, a threshold of 85 or higher is recommended (you can determine whether to set a threshold and the appropriate threshold value based on your actual application scenario in Settings). A score above 85 indicates a lower probability of wearing glasses, while a score below 85 indicates a higher probability.', 'type' => 'number', 'format' => 'float', 'example' => '100', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
],
'IlluList' => [
'description' => '1',
'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '',
- ],
+ 'items' => ['description' => 'The score for the impact of lighting on recognition. Higher scores indicate better suitability for recognition. Valid values: (0, 100]. If multiple faces are detected, the scores are returned in sequence. For recognition, a threshold of 85 or higher is recommended (you can determine whether to set a threshold and the appropriate threshold value based on your actual application scenario in Settings). A score above 85 indicates a higher probability of good lighting, while a score below 85 indicates a lower probability.', 'type' => 'number', 'format' => 'float', 'example' => '100', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
],
'MaskList' => [
'description' => '1',
'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '',
- ],
+ 'items' => ['description' => 'The score for the impact of lower-face occlusion such as masks on recognition. Higher scores indicate better suitability for recognition. Valid values: (0, 100]. If multiple faces are detected, the scores are returned in sequence. For recognition, a threshold of 85 or higher is recommended (you can determine whether to set a threshold and the appropriate threshold value based on your actual application scenario in Settings). A score above 85 indicates a lower probability of wearing a mask, while a score below 85 indicates a higher probability.', 'type' => 'number', 'format' => 'float', 'example' => '99.53', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
],
'NoiseList' => [
'description' => '1',
'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '',
- ],
+ 'items' => ['description' => 'The score for the impact of image noise on recognition. Higher scores indicate better suitability for recognition. Valid values: (0, 100]. If multiple faces are detected, the scores are returned in sequence. For recognition, a threshold of 85 or higher is recommended (you can determine whether to set a threshold and the appropriate threshold value based on your actual application scenario in Settings). A score above 85 indicates a lower probability of image noise, while a score below 85 indicates a higher probability.', 'type' => 'number', 'format' => 'float', 'example' => '99.74', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
],
'PoseList' => [
'description' => '1',
'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '',
- ],
+ 'items' => ['description' => 'The score for the impact of face pose on recognition. Higher scores indicate better suitability for recognition. Valid values: (0, 100]. If multiple faces are detected, the scores are returned in sequence. For recognition, a threshold of 85 or higher is recommended (you can determine whether to set a threshold and the appropriate threshold value based on your actual application scenario in Settings). A score above 85 indicates a higher probability of a frontal face pose, while a score below 85 indicates a lower probability.', 'type' => 'number', 'format' => 'float', 'example' => '100', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'title' => '',
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable.'],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"26B5334B-FD8A-5994-A1DA-3CA8F7B25676\\",\\n \\"Data\\": {\\n \\"FaceProbabilityList\\": [\\n 0.96\\n ],\\n \\"Pupils\\": [\\n 0\\n ],\\n \\"FaceRectangles\\": [\\n 0\\n ],\\n \\"FaceCount\\": 1,\\n \\"PoseList\\": [\\n 0\\n ],\\n \\"Landmarks\\": [\\n 0\\n ],\\n \\"LandmarkScore\\": [\\n 95.89\\n ],\\n \\"LandmarkCount\\": 105,\\n \\"Qualities\\": {\\n \\"ScoreList\\": [\\n 99.92\\n ],\\n \\"BlurList\\": [\\n 99.21\\n ],\\n \\"FnfList\\": [\\n 100\\n ],\\n \\"GlassList\\": [\\n 100\\n ],\\n \\"IlluList\\": [\\n 100\\n ],\\n \\"MaskList\\": [\\n 99.53\\n ],\\n \\"NoiseList\\": [\\n 99.74\\n ],\\n \\"PoseList\\": [\\n 100\\n ]\\n }\\n }\\n}","type":"json"}]',
+ 'title' => 'Face detection and localization',
+ 'summary' => 'Describes the syntax and provides examples of the DetectFace operation for face detection and facial landmark localization.',
+ 'description' => '## Feature description'."\n"
+ .'The face detection and facial landmark localization feature detects faces in images and provides precise localization for each face along with 105 key point coordinates. It outputs the number of faces, face bounding box coordinates, face poses, pupil center coordinates, and face confidence scores. It supports comprehensive quality scoring for face occlusion, lighting, blur, pose, and noise, and supports detection of multiple faces with various pose angles in a single image.'."\n"
+ ."\n"
+ .'> - You can access [online consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for human assistance.'."\n"
+ .'- You can try this feature for free on the Visual Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=DetectFace) to experience this feature or purchase it online.'."\n"
+ .'- For questions about API integration and usage of Alibaba Cloud Visual Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Common scenarios'."\n"
+ .'Facial landmark detection is the foundation for subsequent recognition, analysis, and special effects applications. It provides precise face information for face recognition, expression analysis, fatigue detection, 3D face reconstruction, face beautification, face swapping, and other face-related applications.'."\n"
+ ."\n"
+ .'- Interactive entertainment: Supports precise localization of facial features and contours to enable dynamic stickers, short video effects, special effect cameras, and other interactive entertainment features.'."\n"
+ .'- Face beautification: High-precision facial landmarks enable beautification and reshaping, applicable to image, video, and interactive live streaming scenarios.'."\n"
+ .'- Facial localization and analysis: Supports precise face contour localization and facial landmark analysis for high-value scenarios such as smart medical aesthetics and intelligent applications.'."\n"
+ ."\n"
+ .'## Key advantages'."\n"
+ ."\n"
+ .'- High-precision localization: Supports precise localization of facial features including eyebrows, eyes, pupils, nose, and mouth.'."\n"
+ .'- Strong adaptability: Adapts to various scenarios with different images and face sizes, including side faces up to 90 degrees and 360-degree in-plane rotation.'."\n"
+ .'- Multi-face support: Supports detecting multiple faces in a single image for high-precision face localization scenarios such as face editing, face swapping, and pose correction.'."\n"
+ .'- Image quality scoring: Supports comprehensive quality scoring for face occlusion, lighting, blur, pose, and noise.'."\n"
+ .'- Stable platform service: Provides millisecond-level recognition response and reliability under high concurrency and heavy traffic.'."\n"
+ ."\n"
+ .'## Access guide'."\n"
+ .'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete account registration.'."\n"
+ .'2. Activate the service: Make sure you have activated the [Face and Body service](https://vision.aliyun.com/facebody). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open).'."\n"
+ .'> This feature is available for enterprise or individual verified users. For more information about real-name verification, see [Real-name verification](https://help.aliyun.com/knowledge_list/37170.html).'."\n"
+ .'3. Create an AccessKey: Make sure you have [created an AccessKey](~~175144~~). If you use a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/facebody/2019-12-30/DetectFace?lang=JAVA&sdkStyle=dara&params=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Ffacebody%2FDetectFace%2FDetectFace1.png%22%7D&tab=DEMO) for online debugging, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development steps:'."\n"
+ .'- Select the SDK language you want to use in [SDK overview](~~145033~~).'."\n"
+ .'- Find the SDK package for the Face and Body (facebody) AI category in the corresponding language SDK documentation and install it.'."\n"
+ .'- Modify the sample code provided in the documentation as needed and make the call.'."\n"
+ ."\n"
+ .'6. Sample code: For sample code in commonly used languages, see [Face Detection and Facial Landmark Localization sample code](~~465559~~).'."\n"
+ .'7. Client-side direct calls: The commonly used client-side calling methods for this feature include the following.'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from mini programs](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~)'."\n"
+ ."\n"
+ .'## Input limits'."\n"
+ ."\n"
+ .'- Image format: JPEG, JPG, PNG, or BMP.'."\n"
+ .'- Image size: up to 30 MB.'."\n"
+ .'- Image resolution: greater than 32 × 32 pixels and less than 8192 × 8192 pixels. The face must occupy at least 64 × 64 pixels.'."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ ."\n"
+ .'> If the image resolution exceeds the maximum limit, resize the image first. For more information, see [Image Resizing](~~44688~~).'."\n"
+ ."\n"
+ .'## Billing'."\n"
+ .'For information about the billing methods and pricing of face detection and facial landmark localization, see [Billing overview](~~184049~~).',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## Illustrations'."\n"
+ ."\n"
+ .'- Original image![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20221108/epcj/DetectFace.png" width="400)'."\n"
+ ."\n"
+ .'- 105 key points illustration![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20221108/zetr/DetectFace105.png" width="400).'."\n"
+ ."\n"
+ .'## SDK reference'."\n"
+ .'For the face detection and facial landmark localization feature under the Alibaba Cloud Visual AI Face and Body category, we recommend using the SDK. The SDK supports multiple programming languages. When making calls, select the SDK package for the Face and Body (facebody) AI category. File parameters support both local files and arbitrary URLs through the SDK. For more information, see [SDK overview](~~145033~~).'."\n"
+ ."\n"
+ .'## Sample code'."\n"
+ .'For sample code in commonly used languages, see [Face Detection and Facial Landmark Localization sample code](~~465559~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of face detection and facial landmark localization, see [Common error codes](~~146756~~).'."\n"
+ ."\n"
+ .'## Open-source model experience'."\n"
+ .'For more open-source free model experiences and downloads, see the ModelScope community: [106-Point Facial Landmarks - General Domain - 2D](https://www.modelscope.cn/models/damo/cv_mobilenet_face-2d-keypoints_alignment/summary) and [Whole-Body Keypoint Detection - General Domain - 2D](https://www.modelscope.cn/models/damo/cv_hrnetw48_human-wholebody-keypoint_image/summary).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Ensure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.'."\n"
+ .'- The platform does not store original face images or file information involved in the use of the service.',
+ 'changeSet' => [],
+ 'ramActions' => [
+ [
+ 'operationType' => 'none',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:DetectFace',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"26B5334B-FD8A-5994-A1DA-3CA8F7B25676\\",\\n \\"Data\\": {\\n \\"FaceProbabilityList\\": [\\n 0.96\\n ],\\n \\"Pupils\\": [\\n 0\\n ],\\n \\"FaceRectangles\\": [\\n 0\\n ],\\n \\"FaceCount\\": 1,\\n \\"PoseList\\": [\\n 0\\n ],\\n \\"Landmarks\\": [\\n 0\\n ],\\n \\"LandmarkScore\\": [\\n 95.89\\n ],\\n \\"LandmarkCount\\": 105,\\n \\"Qualities\\": {\\n \\"ScoreList\\": [\\n 99.92\\n ],\\n \\"BlurList\\": [\\n 99.21\\n ],\\n \\"FnfList\\": [\\n 100\\n ],\\n \\"GlassList\\": [\\n 100\\n ],\\n \\"IlluList\\": [\\n 100\\n ],\\n \\"MaskList\\": [\\n 99.53\\n ],\\n \\"NoiseList\\": [\\n 99.74\\n ],\\n \\"PoseList\\": [\\n 100\\n ]\\n }\\n }\\n}","errorExample":""},{"type":"xml","example":"<DetectFaceResponse>\\n <RequestId>26B5334B-FD8A-5994-A1DA-3CA8F7B25676</RequestId>\\n <Data>\\n <FaceProbabilityList>0.96</FaceProbabilityList>\\n <Pupils>417.83</Pupils>\\n <Pupils>226.09</Pupils>\\n <Pupils>8.15</Pupils>\\n <Pupils>517.46</Pupils>\\n <Pupils>231.53</Pupils>\\n <Pupils>8.15</Pupils>\\n <FaceRectangles>358</FaceRectangles>\\n <FaceRectangles>141</FaceRectangles>\\n <FaceRectangles>207</FaceRectangles>\\n <FaceRectangles>255</FaceRectangles>\\n <FaceCount>1</FaceCount>\\n <PoseList>5.02</PoseList>\\n <PoseList>-3.95</PoseList>\\n <PoseList>2.41</PoseList>\\n <Landmarks>381.1</Landmarks>\\n <Landmarks>201.72</Landmarks>\\n <Landmarks>448.09</Landmarks>\\n <Landmarks>205.17</Landmarks>\\n <Landmarks>415.19</Landmarks>\\n <Landmarks>191.2</Landmarks>\\n <Landmarks>415.28</Landmarks>\\n <Landmarks>201.64</Landmarks>\\n <Landmarks>391.35</Landmarks>\\n <Landmarks>196.03</Landmarks>\\n <Landmarks>403.15</Landmarks>\\n <Landmarks>191.57</Landmarks>\\n <Landmarks>426.94</Landmarks>\\n <Landmarks>194.07</Landmarks>\\n <Landmarks>438.42</Landmarks>\\n <Landmarks>197.65</Landmarks>\\n <LandmarkScore>95.89</LandmarkScore>\\n <LandmarkCount>105</LandmarkCount>\\n <Qualities>\\n <ScoreList>99.92</ScoreList>\\n <BlurList>99.21</BlurList>\\n <FnfList>100</FnfList>\\n <GlassList>100</GlassList>\\n <IlluList>100</IlluList>\\n <MaskList>99.53</MaskList>\\n <NoiseList>99.74</NoiseList>\\n <PoseList>100</PoseList>\\n </Qualities>\\n </Data>\\n</DetectFaceResponse>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
],
- 'DetectLivingFace' => [
- 'summary' => '人脸活体检测(DetectLivingFace)',
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'DetectInfraredLivingFace' => [
+ 'summary' => 'This topic describes the syntax and examples of the infrared face liveness detection operation DetectInfraredLivingFace.',
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
- 'operationType' => 'read',
'deprecated' => false,
'systemTags' => [],
'parameters' => [
@@ -2395,195 +2803,242 @@
'in' => 'formData',
'style' => 'repeatList',
'schema' => [
- 'description' => '',
+ 'description' => 'The array of image URLs to be detected.',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
- 'ImageURL' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => false,
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/DetectLivingFace/DetectLivingFace4.jpg',
- 'isFileTransferUrl' => true,
- ],
- 'ImageData' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => false,
- 'example' => '',
- ],
+ 'ImageURL' => ['description' => 'The URL of the image to be detected. Each element in the JSON array is an image detection task structure (image table). A maximum of 10 elements are supported, which means up to 10 images can be detected at a time. We recommend that you use OSS links in the China (Shanghai) region. For images stored locally or in OSS links outside the China (Shanghai) region, see [File URL processing](~~155645~~).'."\n"
+ ."\n"
+ .'> The system automatically converts OSS link addresses to internal network addresses before downloading files. Therefore, calling this operation does not incur OSS traffic fees.', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'https://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/DetectInfraredLivingFace/DetectInfraredLivingFace.jpeg', 'title' => ''],
],
'required' => false,
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
'required' => true,
'maxItems' => 10,
+ 'title' => '',
+ 'example' => '',
],
],
],
'responses' => [
200 => [
'schema' => [
- 'description' => '1',
+ 'title' => '',
+ 'description' => 'Schema of Response',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '2EEA0396-BD84-5729-B8BD-D60776FCEF2B',
- ],
+ 'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '68DF6EC7-3B1D-11EE-9FA7-1122F1AE92DD'],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned result data.',
'type' => 'object',
'properties' => [
'Elements' => [
- 'description' => '',
+ 'description' => 'The returned result data.',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
- 'ImageURL' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/DetectLivingFace/DetectLivingFace4.jpg',
- ],
- 'TaskId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'img1owc8WGskNm78OEAPJTZal-1****',
- ],
+ 'FaceNumber' => ['description' => 'The number of faces detected in a single image. If no face is detected, FaceNumber returns 0.', 'type' => 'integer', 'format' => 'int64', 'example' => '1', 'title' => ''],
+ 'ImageURL' => ['description' => 'The image URL corresponding to the request.', 'type' => 'string', 'example' => 'http://viapi-demo.oss-cn-shanghai.aliyuncs.com/viapi-demo/images/SegmentCommonImage/segmentimage-src-hu.jpeg', 'title' => ''],
'Results' => [
- 'description' => '',
+ 'description' => 'The face coordinates and liveness detection results.',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
- 'Suggestion' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'review',
- ],
- 'Frames' => [
- 'description' => '',
- 'type' => 'array',
- 'items' => [
- 'type' => 'object',
- 'properties' => [
- 'Url' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'http://aligreen-shanghai.oss-cn-shanghai.aliyuncs.com/prod/hammal/26210da42/28118541_TB1urBOQFXXXXbMXFXXXXXXXXXX-1442-257.png?Expires=1582703593&OSSAccessKeyId=H4sp5QfNbuDg****&Signature=%2B8iUkb5YjomYR8ujV2c8wMAavs****&x-oss-process=image%2Fcrop%2Cx_0%2Cw_288%2Fauto-orient%2C0',
- ],
- 'Rate' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '84.83',
- ],
- ],
- ],
- ],
- 'Label' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'liveness',
- ],
- 'Rate' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '76.22',
- ],
+ 'Label' => ['description' => 'The classification of the detection result. Valid values:'."\n"
+ .'- normal: a live photo.'."\n"
+ .'- liveness: a recaptured photo.'."\n"
+ ."\n"
+ .'If no face is detected, Label returns liveness.', 'type' => 'string', 'example' => 'liveness', 'title' => ''],
+ 'Rate' => ['description' => 'The probability that the result belongs to the classification. Value range: \\[0.00-100.00]. A larger value indicates a higher probability of belonging to the classification.'."\n"
+ .'If no face is detected, Rate returns 100.', 'type' => 'number', 'format' => 'float', 'example' => '83.3848', 'title' => ''],
'Rect' => [
- 'description' => '',
+ 'description' => 'The face detection bounding box information. If no face is detected, all Rect face detection coordinates return 0.',
'type' => 'object',
'properties' => [
- 'Left' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '20',
- ],
- 'Top' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '30',
- ],
- 'Width' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '50',
- ],
- 'Height' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '60',
- ],
+ 'Height' => ['description' => 'The height of the detection bounding box.', 'type' => 'integer', 'format' => 'int64', 'example' => '20', 'title' => ''],
+ 'Width' => ['description' => 'The width of the detection bounding box.', 'type' => 'integer', 'format' => 'int64', 'example' => '30', 'title' => ''],
+ 'Top' => ['description' => 'The y-coordinate of the upper-left corner of the detection bounding box.', 'type' => 'integer', 'format' => 'int64', 'example' => '50', 'title' => ''],
+ 'Left' => ['description' => 'The x-coordinate of the upper-left corner of the detection bounding box.', 'type' => 'integer', 'format' => 'int64', 'example' => '60', 'title' => ''],
],
+ 'title' => '',
+ 'example' => '',
],
- 'MessageTips' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'blurred, occluded or large angle face, please check.',
- ],
+ 'Suggestion' => ['description' => 'The recommended action to execute. Valid values:'."\n"
+ ."\n"
+ .'- pass: The live object in the image is from a direct capture. No further action is required.'."\n"
+ .'- review: The live object in the image may be an attack sample. Confirm before proceeding.'."\n"
+ .'- block: The live object in the image is very likely an attack sample. Execute what to do next.'."\n"
+ ."\n"
+ .'If no face is detected, Suggestion returns block.', 'type' => 'string', 'example' => 'review', 'title' => ''],
+ 'MessageTips' => ['description' => 'The prompt message in plain text.'."\n"
+ ."\n"
+ .'- `blurred, occluded or large angle face, please check.`: The input face is blurry, occluded, or at a large angle.'."\n"
+ .'- `no face detected, try again please.`: No face is detected.', 'type' => 'string', 'example' => 'blurred, occluded or large angle face, please check.', 'title' => ''],
],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
- ],
- 'FaceNumber' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1',
+ 'title' => '',
+ 'example' => '',
],
],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable.'],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"68DF6EC7-3B1D-11EE-9FA7-1122F1AE92DD\\",\\n \\"Data\\": {\\n \\"Elements\\": [\\n {\\n \\"FaceNumber\\": 1,\\n \\"ImageURL\\": \\"http://viapi-demo.oss-cn-shanghai.aliyuncs.com/viapi-demo/images/SegmentCommonImage/segmentimage-src-hu.jpeg\\",\\n \\"Results\\": [\\n {\\n \\"Label\\": \\"liveness\\",\\n \\"Rate\\": 83.3848,\\n \\"Rect\\": {\\n \\"Height\\": 20,\\n \\"Width\\": 30,\\n \\"Top\\": 50,\\n \\"Left\\": 60\\n },\\n \\"Suggestion\\": \\"review\\",\\n \\"MessageTips\\": \\"blurred, occluded or large angle face, please check.\\"\\n }\\n ]\\n }\\n ]\\n }\\n}","type":"json"}]',
+ 'title' => 'Infrared face liveness detection',
+ 'description' => '## Feature description'."\n"
+ .'The infrared face liveness detection feature detects whether a face in an infrared image is a live face captured at close range by an authentication device. This feature is widely used in real-time face capture scenarios with infrared devices to meet the authenticity and security requirements of infrared face registration and authentication. The prerequisite is that a face exists in the infrared image.'."\n"
+ .'In terms of capability scope:'."\n"
+ .'1. An authentication device refers to a hardware device equipped with an infrared camera that captures close-range, unprocessed live frontal faces for authentication, access control, and similar service scenarios. Common authentication devices include access control machines, attendance machines, PCs, and other smart terminal authentication devices.'."\n"
+ .'2. An unprocessed live frontal face refers to a raw infrared photo of a real person\'s frontal face (non-blurry, unoccluded, and not at a large angle) that has not undergone heavy post-processing such as Photoshop editing, stylization, or artificial synthesis. Common non-live examples include paper-printed faces and 3D model faces.'."\n"
+ ."\n"
+ .'The following images illustrate this feature:'."\n"
+ .'- Live person'."\n"
+ .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20230202/dsjz/DetectInfraredLivingFacezhenren.png" width="400)'."\n"
+ .'- Paper-printed face'."\n"
+ .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20230202/gfgt/DetectInfraredLivingFacezhizhang.png" width="400)'."\n"
+ ."\n"
+ .'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) to get online assistance.'."\n"
+ .'- You can try this feature for free on the Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=DetectInfraredLivingFace) to experience this feature or purchase it online.'."\n"
+ .'- To connect to the Alibaba Cloud Vision Intelligence Open Platform, use visual AI APIs, or consult about issues, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Common scenarios'."\n"
+ .'- **System face login anti-attack**: Detects whether an uploaded infrared image is a real person\'s photo rather than an attack or post-processed photo such as a Photoshop-edited image, preventing attackers from logging in to the system and causing security risks.'."\n"
+ .'- **Access control and gate face recognition**: Provides real-time infrared liveness detection at the device end during face registration and authentication, enabling real-person verification during registration and authentication to prevent unauthorized individuals from stealing or forging identities for access.'."\n"
+ .'- **Smart hotel self-service check-in**: In hotel front desk self-service check-in scenarios, infrared liveness detection technology efficiently intercepts non-live attacks (paper-printed faces and electronic screen faces) in unattended scenarios.'."\n"
+ ."\n"
+ .'## Key advantages'."\n"
+ .'- **High-precision anti-spoofing**: Determines whether the target is a live person based on high-dimensional features of the human target in the image (stylization, moiré patterns, imaging distortion, and more), effectively preventing screen recapture and other spoofing attacks. Supports single-image or multi-image detection logic.'."\n"
+ .'- **High-sensitivity interception**: Supports real-time liveness detection with infrared camera devices, effectively preventing recapture, head model, and printed image attacks.'."\n"
+ .'- **Wide applicability**: Provides better applicability for scenarios such as door locks where visible light conditions are not ideal.'."\n"
+ .'- **Simple and easy to use**: Provides directly callable API operations that are simple, easy to integrate, and highly compatible.'."\n"
+ ."\n"
+ .'## Integration guide'."\n"
+ .'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete account registration.'."\n"
+ .'2. Activate the feature: Make sure that you have activated the [Face and Body service](https://vision.aliyun.com/facebody). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open).'."\n"
+ .'><notice>'."\n"
+ .'This feature is available only to users who have completed verify your identity - Enterprise account. For more information about real-name verification, see [Real-name verification](https://help.aliyun.com/knowledge_list/37170.html).'."\n"
+ .'></notice>'."\n"
+ ."\n"
+ .'3. Create an AccessKey pair: Make sure that you have [created an AccessKey pair](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/facebody/2019-12-30/DetectInfraredLivingFace?lang=JAVA) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development and integration steps:'."\n"
+ .'- Select the SDK language you want to use in [SDK overview](~~145033~~).'."\n"
+ .'- Find the SDK package for the AI category Face and Body (facebody) in the corresponding SDK documentation and install it.'."\n"
+ .'- Modify the sample code provided in the references as needed and invoke the operation.'."\n"
+ ."\n"
+ .'6. Sample code: For sample code in commonly used languages, see [Infrared face liveness detection sample code](~~601305~~).'."\n"
+ ."\n"
+ .'7. Direct client calls: Common client call methods for this feature include the following.'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from mini programs](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Input limits'."\n"
+ .'- Image format: PNG, JPG, JPEG, BMP, GIF, and WEBP.'."\n"
+ .'- Image size: up to 10 MB.'."\n"
+ .'- Image resolution: We recommend a resolution greater than 256 × 256 pixels. A low resolution may affect recognition accuracy.'."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ .'> If the image resolution exceeds the maximum limit, resize the image first. For more information, see [Image resizing](~~44688~~).'."\n"
+ ."\n"
+ .'## Detection notes'."\n"
+ .'- The maximum detection time is 5 seconds. If the detection is not completed within this time, the system returns a timeout error code.'."\n"
+ .'- The image download time limit is 3 seconds. If the download time exceeds 3 seconds, the system returns a download timeout error.'."\n"
+ .'- The response time of the image detection operation depends on the image download time. Make sure that the storage service hosting the image is stable and reliable. We recommend that you use Alibaba Cloud OSS or CDN caching.'."\n"
+ .'- A maximum of 10 images can be detected at a time.'."\n"
+ .'- The liveness detection provided by the platform is passive liveness detection, which is image-based. Action-based liveness detection such as head shaking, mouth opening, or eye blinking is not supported.'."\n"
+ ."\n"
+ .'## Billing description'."\n"
+ .'For the billable methods and pricing of infrared face liveness detection, see [Billing overview](~~184049~~).'."\n"
+ .'> The debugging operation below is a paid operation. To try it for free, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=DetectInfraredLivingFace).',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'For the infrared face liveness detection feature under the Alibaba Cloud Vision AI Face and Body category, we recommend using the SDK. Multiple programming languages are supported. When calling the operation, select the SDK package for the AI category Face and Body (facebody). File parameters can be passed as local files or any URL through the SDK. For more information, see [SDK overview](~~145033~~).'."\n"
+ ."\n"
+ .'## Sample code'."\n"
+ .'For sample code in commonly used languages, see [Infrared face liveness detection sample code](~~601305~~).',
+ 'extraInfo' => '## Liveness threshold reference'."\n"
+ .'For the liveness detection threshold selection, refer to the following table:'."\n"
+ .'| Label | Rate threshold | Attack interception rate | Live pass rate | '."\n"
+ .'| ---- | ------------ | ---- | ------------ |'."\n"
+ .'|liveness |0.39 |98.18% |90.21% |'."\n"
+ .'|liveness |0.55 |98.54% |89.29% |'."\n"
+ .'|liveness |0.7 |98.94% |88.36% |'."\n"
+ .'|normal (recommended) |0.8 (recommended) |99.11% |87.00% |'."\n"
+ .'|normal |0.95 |99.60% |80.03% |'."\n"
+ ."\n"
+ .'When Label is normal, it indicates a live person. Rate represents the liveness confidence, with a value range of \\[80,100].'."\n"
+ .'When Label is liveness, it indicates a non-live object. Rate represents the non-liveness confidence, with a value range of \\[20,100].'."\n"
+ .'Definitions of the values above:'."\n"
+ .'- Attack interception rate: For example, 98% means that out of 100 spoofing attacks, 98 are identified and rejected by the API.'."\n"
+ .'- Live pass rate: For example, 98% means that out of 100 real-person requests, 98 pass the liveness verification.'."\n"
+ ."\n"
+ .'> These are internal experimental data calculations and are for reference only.'."\n"
+ ."\n"
+ .'## Error codes'."\n"
+ .'For error codes of infrared face liveness detection, see [Common error codes](~~146756~~).'."\n"
+ ."\n"
+ .'## Open-source Playground'."\n"
+ .'For more open-source free model experiences and downloads, visit ModelScope: [Face liveness detection model - RGB](https://modelscope.cn/models/damo/cv_manual_face-liveness_flrgb/summary), [Face liveness detection model - IR](https://modelscope.cn/models/damo/cv_manual_face-liveness_flir/summary), and [Passive face liveness detection model - Colorful](https://modelscope.cn/models/damo/cv_manual_face-liveness_flxc/summary).'."\n"
+ ."\n"
+ .'## Security statement'."\n"
+ .'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the experience debugging feature are valid for 1 hour and are automatically deleted by the system after 24 hours.'."\n"
+ .'- The platform does not store original face images or file information involved in the use of the service.',
+ 'changeSet' => [],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:DetectInfraredLivingFace',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"2EEA0396-BD84-5729-B8BD-D60776FCEF2B\\",\\n \\"Data\\": {\\n \\"Elements\\": [\\n {\\n \\"ImageURL\\": \\"http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/DetectLivingFace/DetectLivingFace4.jpg\\",\\n \\"TaskId\\": \\"img1owc8WGskNm78OEAPJTZal-1****\\",\\n \\"Results\\": [\\n {\\n \\"Suggestion\\": \\"review\\",\\n \\"Frames\\": [\\n {\\n \\"Url\\": \\"http://aligreen-shanghai.oss-cn-shanghai.aliyuncs.com/prod/hammal/26210da42/28118541_TB1urBOQFXXXXbMXFXXXXXXXXXX-1442-257.png?Expires=1582703593&OSSAccessKeyId=H4sp5QfNbuDg****&Signature=%2B8iUkb5YjomYR8ujV2c8wMAavs****&x-oss-process=image%2Fcrop%2Cx_0%2Cw_288%2Fauto-orient%2C0\\",\\n \\"Rate\\": 84.83\\n }\\n ],\\n \\"Label\\": \\"liveness\\",\\n \\"Rate\\": 76.22,\\n \\"Rect\\": {\\n \\"Left\\": 20,\\n \\"Top\\": 30,\\n \\"Width\\": 50,\\n \\"Height\\": 60\\n },\\n \\"MessageTips\\": \\"blurred, occluded or large angle face, please check.\\"\\n }\\n ],\\n \\"FaceNumber\\": 1\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<DetectLivingFaceResponse>\\n <RequestId>2EEA0396-BD84-5729-B8BD-D60776FCEF2B</RequestId>\\n <Data>\\n <Elements>\\n <ImageURL>http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/DetectLivingFace/DetectLivingFace4.jpg</ImageURL>\\n <TaskId>img1owc8WGskNm78OEAPJTZal-1****</TaskId>\\n <Results>\\n <Suggestion>review</Suggestion>\\n <Frames>\\n <Url>http://aligreen-shanghai.oss-cn-shanghai.aliyuncs.com/prod/hammal/26210da42/28118541_TB1urBOQFXXXXbMXFXXXXXXXXXX-1442-257.png?Expires=1582703593&amp;OSSAccessKeyId=H4sp5QfNbuDg****&amp;Signature=%2B8iUkb5YjomYR8ujV2c8wMAavs****&amp;x-oss-process=image%2Fcrop%2Cx_0%2Cw_288%2Fauto-orient%2C0</Url>\\n <Rate>84.83</Rate>\\n </Frames>\\n <Label>liveness</Label>\\n <Rate>76.22</Rate>\\n <Rect>\\n <Left>20</Left>\\n <Top>30</Top>\\n <Width>50</Width>\\n <Height>60</Height>\\n </Rect>\\n <MessageTips>blurred, occluded or large angle face, please check.</MessageTips>\\n </Results>\\n <FaceNumber>1</FaceNumber>\\n </Elements>\\n </Data>\\n</DetectLivingFaceResponse>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
],
- 'FaceBeauty' => [
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'DetectLivingFace' => [
+ 'summary' => 'This document describes the syntax and examples of the face liveness detection API DetectLivingFace.',
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -2594,112 +3049,257 @@
'systemTags' => [],
'parameters' => [
[
- 'name' => 'ImageURL',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/FaceBeauty/FaceBeauty4.png',
- 'isFileTransferUrl' => true,
- ],
- ],
- [
- 'name' => 'Sharp',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'required' => true,
- 'example' => '1',
- ],
- ],
- [
- 'name' => 'Smooth',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'required' => true,
- 'example' => '0.1',
- ],
- ],
- [
- 'name' => 'White',
+ 'name' => 'Tasks',
'in' => 'formData',
+ 'style' => 'repeatList',
'schema' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
+ 'description' => 'The input face data.',
+ 'type' => 'array',
+ 'items' => [
+ 'type' => 'object',
+ 'properties' => [
+ 'ImageURL' => ['description' => 'The URL of the image to be detected. Each element in the JSON array is an image detection task structure (image table). A maximum of 10 elements are supported, meaning up to 10 images can be detected simultaneously. We recommend using OSS links in the Shanghai region. For files stored locally or with OSS links in non-Shanghai regions, see [File URL Processing](~~155645~~).'."\n"
+ ."\n"
+ .'> For this API, the system automatically converts OSS link addresses to internal network addresses before downloading files, so calling this API does not incur OSS traffic charges.', 'type' => 'string', 'isFileTransferUrl' => true, 'required' => false, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/DetectLivingFace/DetectLivingFace4.jpg', 'title' => ''],
+ 'ImageData' => ['description' => 'The Base64-encoded string of the image. When both URL and Base64 methods are provided, the URL method takes priority.'."\n"
+ .'For Base64 encoding operations, see [File Base64 Processing](~~468191~~).', 'type' => 'string', 'required' => false, 'example' => '/9j/4AAQSkZJRgABAQAAAQABAAD/2****', 'title' => ''],
+ ],
+ 'required' => false,
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
+ ],
'required' => true,
- 'example' => '0.3',
+ 'maxItems' => 10,
+ 'title' => '',
+ 'example' => '',
],
],
],
'responses' => [
200 => [
'schema' => [
+ 'description' => '1',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '35C284E1-C5F5-4E5E-B7AD-97BBF485CDC8',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '2EEA0396-BD84-5729-B8BD-D60776FCEF2B', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned result data.',
'type' => 'object',
'properties' => [
- 'ImageURL' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'http://algo-app-taobao-mm-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/pixelai-portrait-beauty/2020_03_24/2bbbdb7907901412_facebeauty.jpg?Expires=1585277923&OSSAccessKeyId=LTAI4FoLmvQ9urWXgSRp****&Signature=myOPfNQcRyijgrWBU%2BZ4dPuV5Q****',
+ 'Elements' => [
+ 'description' => 'The returned elements.',
+ 'type' => 'array',
+ 'items' => [
+ 'type' => 'object',
+ 'properties' => [
+ 'ImageURL' => ['description' => 'The image URL corresponding to the request.', 'type' => 'string', 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/DetectLivingFace/DetectLivingFace4.jpg', 'title' => ''],
+ 'TaskId' => ['description' => 'The ID of this detection task.', 'type' => 'string', 'example' => 'img1owc8WGskNm78OEAPJTZal-1****', 'title' => ''],
+ 'Results' => [
+ 'description' => 'The returned results. When the call is successful, the results contain one or more elements.',
+ 'type' => 'array',
+ 'items' => [
+ 'type' => 'object',
+ 'properties' => [
+ 'Suggestion' => ['description' => 'The recommended action to take. Valid values:'."\n"
+ .'- pass: The living object in the image is from a direct capture. No further action is required.'."\n"
+ .'- review: The living object in the image may be from a recaptured photo. We recommend that you verify before proceeding.'."\n"
+ .'- block: The living object in the image is very likely from a recaptured photo. We recommend that you take further action.'."\n"
+ .'If no face is detected, Suggestion returns block.'."\n", 'type' => 'string', 'example' => 'review', 'title' => ''],
+ 'Frames' => [
+ 'description' => '**(This field is deprecated.)** When the input image is a long image (aspect ratio greater than 3:1), the original image is cropped into several images of normal proportions. Frames stores the cropped screenshots from the image that are identified as recaptured.',
+ 'type' => 'array',
+ 'items' => [
+ 'type' => 'object',
+ 'properties' => [
+ 'Url' => ['description' => 'The matched screenshot.', 'type' => 'string', 'example' => 'http://aligreen-shanghai.oss-cn-shanghai.aliyuncs.com/prod/hammal/26210da42/28118541_TB1urBOQFXXXXbMXFXXXXXXXXXX-1442-257.png?Expires=1582703593&OSSAccessKeyId=H4sp5QfNbuDg****&Signature=%2B8iUkb5YjomYR8ujV2c8wMAavs****&x-oss-process=image%2Fcrop%2Cx_0%2Cw_288%2Fauto-orient%2C0', 'title' => ''],
+ 'Rate' => ['description' => 'The probability of the result belonging to this category. Value range: \\[0.00, 100.00]. A higher value indicates a higher probability of belonging to this category.'."\n"
+ .'If no face is detected, Rate returns 100.', 'type' => 'number', 'format' => 'float', 'example' => '84.83', 'title' => ''],
+ ],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'Label' => ['description' => 'The category of the detection result. Valid values:'."\n"
+ .'- normal: Live photo'."\n"
+ .'- liveness: Recaptured photo'."\n"
+ ."\n"
+ .'If no face is detected, Label returns liveness.', 'type' => 'string', 'example' => 'liveness', 'title' => ''],
+ 'Rate' => ['description' => 'The probability of the result belonging to this category. Value range: \\[0.00, 100.00]. A higher value indicates a higher probability of belonging to this category.', 'type' => 'number', 'format' => 'float', 'example' => '76.22', 'title' => ''],
+ 'Rect' => [
+ 'description' => 'The face detection box information.',
+ 'type' => 'object',
+ 'properties' => [
+ 'Left' => ['description' => 'The x-coordinate of the upper-left corner of the detection box.', 'type' => 'integer', 'format' => 'int64', 'example' => '20', 'title' => ''],
+ 'Top' => ['description' => 'The y-coordinate of the upper-left corner of the detection box.', 'type' => 'integer', 'format' => 'int64', 'example' => '30', 'title' => ''],
+ 'Width' => ['description' => 'The width of the detection box.', 'type' => 'integer', 'format' => 'int64', 'example' => '50', 'title' => ''],
+ 'Height' => ['description' => 'The height of the detection box.', 'type' => 'integer', 'format' => 'int64', 'example' => '60', 'title' => ''],
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'MessageTips' => ['description' => 'The prompt message.'."\n"
+ .'- If the input face is blurred, occluded, or at a large angle, the following prompt message is returned: `blurred, occluded or large angle face, please check.` '."\n"
+ .'- If no face is detected, the following prompt message is returned: `no face detected, try again please.`', 'type' => 'string', 'example' => 'blurred, occluded or large angle face, please check.', 'title' => ''],
+ ],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'FaceNumber' => ['description' => 'The number of faces detected in a single image.'."\n"
+ .'If no face is detected, FaceNumber returns 0.', 'type' => 'integer', 'format' => 'int64', 'example' => '1', 'title' => ''],
+ ],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'title' => '',
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable.'],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"2EEA0396-BD84-5729-B8BD-D60776FCEF2B\\",\\n \\"Data\\": {\\n \\"Elements\\": [\\n {\\n \\"ImageURL\\": \\"http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/DetectLivingFace/DetectLivingFace4.jpg\\",\\n \\"TaskId\\": \\"img1owc8WGskNm78OEAPJTZal-1****\\",\\n \\"Results\\": [\\n {\\n \\"Suggestion\\": \\"review\\",\\n \\"Frames\\": [\\n {\\n \\"Url\\": \\"http://aligreen-shanghai.oss-cn-shanghai.aliyuncs.com/prod/hammal/26210da42/28118541_TB1urBOQFXXXXbMXFXXXXXXXXXX-1442-257.png?Expires=1582703593&OSSAccessKeyId=H4sp5QfNbuDg****&Signature=%2B8iUkb5YjomYR8ujV2c8wMAavs****&x-oss-process=image%2Fcrop%2Cx_0%2Cw_288%2Fauto-orient%2C0\\",\\n \\"Rate\\": 84.83\\n }\\n ],\\n \\"Label\\": \\"liveness\\",\\n \\"Rate\\": 76.22,\\n \\"Rect\\": {\\n \\"Left\\": 20,\\n \\"Top\\": 30,\\n \\"Width\\": 50,\\n \\"Height\\": 60\\n },\\n \\"MessageTips\\": \\"blurred, occluded or large angle face, please check.\\"\\n }\\n ],\\n \\"FaceNumber\\": 1\\n }\\n ]\\n }\\n}","type":"json"}]',
+ 'title' => 'Face Liveness Detection',
+ 'description' => '## Feature Description'."\n"
+ .'The Face Liveness Detection feature can detect whether a face in an image is a live face object directly captured from an authentication device at close range. It can be widely used in real-time face capture scenarios to meet the authenticity and security requirements of face registration and authentication. A prerequisite for liveness detection is the presence of a face in the image.'."\n"
+ .'In terms of capability scope:'."\n"
+ .'1. An authentication device refers to a hardware device with an RGB camera that uses close-range, directly captured live frontal face images for authentication, access control, and other service scenarios. Common authentication devices include smartphones, access control machines, attendance machines, PCs, and other smart terminal authentication devices.'."\n"
+ .'2. A directly captured live frontal face refers to a photo of a real person\'s frontal face (non-blurred, non-occluded, non-large-angle frontal face) that has not undergone heavy post-processing such as Photoshop editing, stylization, or artificial synthesis. Common non-real-person examples include paper face photos and electronic screen face photos. Common heavily post-processed photos include posed street scene photos, posed portrait landscape photos, and posed ID photos. Other post-processed and generated photos include anime faces, painted faces, etc.'."\n"
+ ."\n"
+ .'> - When detecting multiple Tasks simultaneously, billing is accumulated based on the number of Tasks.'."\n"
+ .'- You can access [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for online assistance.'."\n"
+ .'- This feature is available for a complete free trial on the Visual Intelligence Open Platform. You can click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=DetectLivingFace) for a more intuitive trial and online purchase.'."\n"
+ .'- For API integration, interface usage, or consultation regarding Alibaba Cloud Visual Intelligence Open Platform visual AI capabilities, please contact us through DingTalk group (23109592) by joining the Alibaba Cloud Visual Intelligence Open Platform consultation group.'."\n"
+ ."\n"
+ .'## Use Cases'."\n"
+ .'- System face login anti-attack: By detecting whether the uploaded image is a real person\'s live capture rather than an attack or post-processed photo, it prevents attackers from logging into the system and causing security risks.'."\n"
+ .'- Access control and gate face scanning: Provides real-time liveness detection at the device end during face registration and authentication, enabling real-person verification during registration and authentication processes and preventing unauthorized individuals from using stolen or forged identities for check-in and access.'."\n"
+ .'- Smart hotel self-service check-in: In the self-service check-in scenario at hotel front desks, liveness detection technology enables efficient interception of non-live attacks (paper face photos, electronic screen face photos) in unattended scenarios.'."\n"
+ .'- Financial remote identity authentication: For liveness detection requirements in financial services such as investment and wealth management, fund trading, and insurance claims, it efficiently intercepts attacks from recaptured photos, Photoshop-edited images, printed photos, and high-fidelity models to ensure user identity authenticity.'."\n"
+ ."\n"
+ .'## Key Advantages'."\n"
+ .'- Based on high-dimensional features (stylization, moire patterns, imaging distortion, etc.) of the face target in the image, it determines whether the target object is a live face, effectively preventing screen recapture and other spoofing attacks, and supports single or multiple image judgment logic.'."\n"
+ .'- Flexibly supports real-time liveness detection for RGB camera devices, effectively preventing recaptured photos, head models, printed photos, and other sample attacks.'."\n"
+ .'- Easy to use: Directly callable API interface, simple and easy to use, easy to integrate, and highly compatible.'."\n"
+ ."\n"
+ .'## Integration Guide'."\n"
+ .'1. Register an Alibaba Cloud account: Open the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete account registration.'."\n"
+ .'2. Activate the feature: Please ensure that you have activated the [Face and Body service](https://vision.aliyun.com/facebody). If you have not activated the service, please [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open).'."\n"
+ .'> This feature supports activation by enterprise or individually verified users. For more information about real-name verification, see [Real-Name Verification](https://help.aliyun.com/knowledge_list/37170.html).'."\n"
+ .'3. Create an AccessKey: Please ensure that you have [created an AccessKey](~~175144~~). If you are using a RAM user AccessKey, you need to grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM Authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/facebody/2019-12-30/DetectLivingFace?lang=JAVA&sdkStyle=dara&params=%7B%22Tasks%22%3A%5B%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Ffacebody%2FDetectLivingFace%2FDetectLivingFace1.jpg%22%7D%5D%7D&tab=DEMO) to debug the feature online, view complete call sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development integration steps:'."\n"
+ .'- Select the SDK language you want to use in [SDK Overview](~~145033~~).'."\n"
+ .'- Find the SDK package with the AI category set to Face and Body (facebody) in the corresponding language SDK documentation and install it.'."\n"
+ .'- Refer to the sample code provided in the documentation, make appropriate modifications, and call the API.'."\n"
+ ."\n"
+ .'6. Sample code: For sample code in commonly used languages for this feature, see [Face Liveness Detection Sample Code](~~465556~~).'."\n"
+ ."\n"
+ .'7. Client-side direct calling: Common client-side calling methods for this feature include the following.'."\n"
+ .'- [Web Frontend Direct Calling](~~467779~~)'."\n"
+ .'- [Mini Program Direct Calling](~~467780~~)'."\n"
+ .'- [Android Direct Calling](~~467781~~)'."\n"
+ .'- [iOS Direct Calling](~~467782~~)'."\n"
+ ."\n"
+ .'## Input Limits'."\n"
+ .'- Image format: PNG, JPG, JPEG, BMP, GIF, WEBP.'."\n"
+ .'- Image size: No more than 10 MB.'."\n"
+ .'- Image resolution: Recommended to be greater than 256 x 256 pixels. Low resolution may affect recognition results.'."\n"
+ .'- The URL must not contain Chinese characters.'."\n"
+ ."\n"
+ .'> When the image resolution exceeds the maximum limit, please scale the image first. For details, see [Image Scaling](~~44688~~).'."\n"
+ ."\n"
+ .'## Detection Notes'."\n"
+ ."\n"
+ .'- The maximum detection time is 5 seconds. If the detection is not completed within this time, the system will return a timeout error code.'."\n"
+ .'- The image download time limit is 3 seconds. If the download time exceeds 3 seconds, the system will return a download timeout.'."\n"
+ .'- The response time of the image detection API depends on the image download time. Please ensure that the storage service hosting the detected images is stable and reliable. We recommend using Alibaba Cloud OSS storage or CDN caching.'."\n"
+ .'- A maximum of 10 images can be detected.'."\n"
+ .'- The liveness detection currently provided by the platform is silent liveness detection, which is based on image analysis. It does not currently support action-based liveness detection such as head shaking, mouth opening, or eye blinking.'."\n"
+ ."\n"
+ .'## Billing Description'."\n"
+ .'For billing methods and pricing of Face Liveness Detection, see [Billing Overview](~~184049~~).'."\n"
+ ."\n"
+ .'> The debugging API below is a paid API. For a free trial, please go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=DetectLivingFace).',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK Reference'."\n"
+ .'For the Face Liveness Detection feature under the Alibaba Cloud Visual AI Face and Body category, we recommend using the SDK. Multiple programming languages are supported. When calling the API, select and install the SDK package with the AI category set to Face and Body (facebody). For file parameters, the SDK supports both local files and arbitrary URLs. For details, see [SDK Overview](~~145033~~).'."\n"
+ ."\n"
+ .'## Sample Code'."\n"
+ .'For sample code in commonly used languages for this feature, see [Face Liveness Detection Sample Code](~~465556~~).',
+ 'extraInfo' => '## Liveness Threshold Reference'."\n"
+ .'| Label | Rate Threshold | Attack Interception Rate | Liveness Pass Rate | '."\n"
+ .'| ---- | ------------ | ---- | ------------ |'."\n"
+ .'|liveness |50 |98.7% |97.85% |'."\n"
+ .'|liveness |30 |99.03% |96.96% |'."\n"
+ .'|normal (Recommended) |80 (Recommended) |99.17% |96.39% |'."\n"
+ .'|normal |85 |99.27% |95.55% |'."\n"
+ .'|normal |95 |99.53% |92.24% |'."\n"
+ ."\n"
+ .'When the Label is normal, it indicates a live face. Rate represents the liveness confidence, with a value range of \\[80,100].'."\n"
+ .'When the Label is liveness, it indicates a non-live face. Rate represents the non-liveness confidence, with a value range of \\[20,100].'."\n"
+ .'Definitions of the above metrics:'."\n"
+ .'- Attack Interception Rate: For example, 98% means that out of 100 spoofing attacks with fake objects, 98 will be detected and rejected by the API.'."\n"
+ .'- Liveness Pass Rate: For example, 98% means that out of 100 real person requests, 98 will successfully pass the liveness verification.'."\n"
+ ."\n"
+ .'> Based on internal experimental data. For reference only.'."\n"
+ ."\n"
+ .'## Error Codes'."\n"
+ .'For error codes related to Face Liveness Detection, see [Common Error Codes](~~146756~~).'."\n"
+ ."\n"
+ .'## Open Source Model Experience'."\n"
+ .'For more open-source free model trials and downloads, see ModelScope: [Face Liveness Detection Model - RGB](https://modelscope.cn/models/damo/cv_manual_face-liveness_flrgb/summary), [Face Liveness Detection Model - IR](https://modelscope.cn/models/damo/cv_manual_face-liveness_flir/summary), [Silent Face Liveness Detection Model - Colorful](https://modelscope.cn/models/damo/cv_manual_face-liveness_flxc/summary).'."\n"
+ ."\n"
+ .'## Security Statement'."\n"
+ .'- Please ensure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the trial and debugging feature are valid for 1 hour and will be automatically cleaned up and deleted by the system after 24 hours.'."\n"
+ .'- The platform does not store original face images or file information involved during the user\'s use of the service.',
+ 'changeSet' => [],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:DetectLivingFace',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"35C284E1-C5F5-4E5E-B7AD-97BBF485CDC8\\",\\n \\"Data\\": {\\n \\"ImageURL\\": \\"http://algo-app-taobao-mm-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/pixelai-portrait-beauty/2020_03_24/2bbbdb7907901412_facebeauty.jpg?Expires=1585277923&OSSAccessKeyId=LTAI****************&Signature=myOPfNQcRyijgrWBU%2BZ4dPuV5Q****\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<FaceBeautyResponse>\\n <RequestId>35C284E1-C5F5-4E5E-B7AD-97BBF485CDC8</RequestId>\\n <Data>\\n <ImageURL>http://algo-app-taobao-mm-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/pixelai-portrait-beauty/2020_03_24/2bbbdb7907901412_facebeauty.jpg?Expires=1585277923&amp;OSSAccessKeyId=LTAI****************&amp;Signature=myOPfNQcRyijgrWBU%2BZ4dPuV5Q****</ImageURL>\\n </Data>\\n</FaceBeautyResponse>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
],
- 'EnhanceFace' => [
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'DetectPedestrian' => [
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -2712,77 +3312,175 @@
[
'name' => 'ImageURL',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/EnhanceFace/EnhanceFace1.png',
- 'isFileTransferUrl' => true,
- ],
+ 'schema' => ['description' => 'The URL of the image. We recommend that you use an Object Storage Service (OSS) URL in the Shanghai region. If the file is stored locally or the OSS URL is in a region other than Shanghai, see [File URL processing](~~155645~~).'."\n"
+ .'Input limits:'."\n"
+ ."\n"
+ .'- Image format: JPEG, JPG, PNG, or BMP.'."\n"
+ .'- Image size: Up to 4 MB.'."\n"
+ .'- Image resolution: Greater than 32 × 32 pixels and less than 2000 × 2000 pixels. The longest side must be less than 2000 pixels. The face must occupy at least 64 × 64 pixels.'."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ .'> If the image resolution exceeds the maximum limit, resize the image first. For more information, see [Resize images](~~44688~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/DetectPedestrian/DetectPedestrian8.jpg', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
+ 'description' => '1',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '8B031473-6773-4A4C-AF33-A233758E6E98',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '45DBA494-6250-42C4-80D1-7CF19BDD2CB1', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned data.',
'type' => 'object',
'properties' => [
- 'ImageURL' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'http://vibktprfx-prod-prod-aic-vd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/face-enhancement/2021-11-30/8e34b61c-abcf-4708-9d9d-6501968ee806/20211130_080644126523_47ct9w3pgh.jpg?Expires=1638261404&OSSAccessKeyId=LTAI4FoLmvQ9urWXgSRp****&Signature=2wPdcuCmr%2F86WpBL3HQJw5uCFl****',
+ 'Elements' => [
+ 'description' => 'The collection of detected body bounding boxes.',
+ 'type' => 'array',
+ 'items' => [
+ 'type' => 'object',
+ 'properties' => [
+ 'Type' => ['description' => 'The detection result type corresponding to the bounding box. Only the value `person` is returned.', 'type' => 'string', 'example' => 'person', 'title' => ''],
+ 'Boxes' => [
+ 'description' => '1',
+ 'type' => 'array',
+ 'items' => ['description' => 'The bounding box coordinates in the format `[left, top, right, bottom]`. `left` is the x-coordinate of the upper-left corner, `top` is the y-coordinate of the upper-left corner, `right` is the x-coordinate of the lower-right corner, and `bottom` is the y-coordinate of the lower-right corner of the bounding box.', 'type' => 'integer', 'format' => 'int32', 'example' => '[326, 293, 500, 546 ]', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'Score' => ['description' => 'The confidence score of the bounding box. Valid values: 0 to 1. A score closer to 1 indicates a higher probability that the bounding box accurately contains a human body.', 'type' => 'number', 'format' => 'float', 'example' => '0.999', 'title' => ''],
+ ],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'title' => '',
+ 'example' => '',
],
+ 'Width' => ['description' => 'The width of the input image, in pixels.', 'type' => 'integer', 'format' => 'int32', 'example' => '899', 'title' => ''],
+ 'Height' => ['description' => 'The height of the input image, in pixels.', 'type' => 'integer', 'format' => 'int32', 'example' => '599', 'title' => ''],
],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'title' => '',
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable.'],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"45DBA494-6250-42C4-80D1-7CF19BDD2CB1\\",\\n \\"Data\\": {\\n \\"Elements\\": [\\n {\\n \\"Type\\": \\"person\\",\\n \\"Boxes\\": [\\n 0\\n ],\\n \\"Score\\": 0.999\\n }\\n ],\\n \\"Width\\": 899,\\n \\"Height\\": 599\\n }\\n}","type":"json"}]',
+ 'title' => 'Pedestrian detection',
+ 'summary' => 'This topic describes the syntax and provides examples of the DetectPedestrian operation.',
+ 'description' => '## Description'."\n"
+ .'The pedestrian detection feature detects all human bodies in an image. It is primarily designed for surveillance scenarios. We recommend that the human body occupies less than half of the image. The following features are supported:'."\n"
+ ."\n"
+ .'- Body detection: Returns the bounding box positions of human bodies in the image and outputs the coordinate positions of each detected body.'."\n"
+ .'- Body information: Outputs the confidence score for each detected person. Multiple human bodies in a single image can be detected simultaneously.'."\n"
+ ."\n"
+ .'The following figures show examples of this operation:'."\n"
+ .'- Input image'."\n"
+ .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20221111/unpw/DetectPedestrian.png" width="500)'."\n"
+ .'- Output result'."\n"
+ .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20221111/xqtw/DetectPedestrianresult.png" width="500)'."\n"
+ ."\n"
+ .'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) to get online assistance.'."\n"
+ .'- You can try this feature for free on the Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=DetectPedestrian) to experience this feature or purchase it online.'."\n"
+ .'- To integrate Vision AI APIs, learn about API usage, or consult on issues, join the Alibaba Cloud Vision Intelligence Open Platform consultation group on DingTalk (group ID: 23109592).'."\n"
+ ."\n"
+ .'## Common scenarios'."\n"
+ ."\n"
+ .'- Recording videos with people: In surveillance footage, pedestrian detection can filter out segments without people and retain only segments where people appear, reducing video storage requirements.'."\n"
+ .'- Foot traffic counting: By combining multi-frame pedestrian detection results with line-crossing analysis, foot traffic can be counted in shopping malls, scenic areas, and transportation hubs.'."\n"
+ .'- On-duty detection: Detects whether personnel are present at designated workstations.'."\n"
+ .'- Smart office: Detects whether people are present in an office to intelligently control lighting and air conditioning, conserving energy and promoting sustainability.'."\n"
+ ."\n"
+ .'## Advantages'."\n"
+ ."\n"
+ .'- Multi-angle detection: Accurately detects human bodies in images captured from various angles, including front-facing, side-facing, and high-angle perspectives.'."\n"
+ .'- Strong occlusion resistance: Accurately detects human bodies even when they are partially occluded.'."\n"
+ ."\n"
+ .'## Getting started'."\n"
+ .'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **China Site Account** in the upper-right corner, and follow the instructions to complete registration.'."\n"
+ .'2. Activate the service: Make sure you have activated the [Face and Body service](https://vision.aliyun.com/facebody). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open).'."\n"
+ ."\n"
+ .'> This feature is available to enterprise users or users who have completed verify your identity - Individual account. For more information about identity verification, see [Identity verification](https://help.aliyun.com/knowledge_list/37170.html).'."\n"
+ ."\n"
+ .'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/facebody/2019-12-30/DetectPedestrian?lang=JAVA&sdkStyle=old&params=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Ffacebody%2FDetectPedestrian%2FDetectPedestrian1.jpg%22%7D&tab=DEMO) to debug this operation online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development and integration steps:'."\n"
+ .' - Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
+ .' - Find the SDK package for the Face and Body (facebody) AI category in the corresponding SDK documentation and install it.'."\n"
+ .' - Modify the sample code provided in the References as needed and invoke the operation.'."\n"
+ ."\n"
+ .'6. Sample code: For sample code in commonly used languages, see [Pedestrian detection sample code](~~601107~~).'."\n"
+ ."\n"
+ .'7. Direct client calls: The following common client-side call methods are available for this feature.'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from mini programs](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Input limits'."\n"
+ ."\n"
+ .'- Image format: JPEG, JPG, PNG, or BMP.'."\n"
+ ."\n"
+ .'- Image size: Up to 3 MB.'."\n"
+ ."\n"
+ .'- Image resolution: Greater than 32 × 32 pixels and less than 2000 × 2000 pixels. The longest side must be less than 2000 pixels. The face must occupy at least 64 × 64 pixels.'."\n"
+ ."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ ."\n"
+ .'> If the image resolution exceeds the maximum limit, resize the image first. For more information, see [Resize images](~~44688~~).'."\n"
+ ."\n"
+ .'## Billing'."\n"
+ .'For information about the billable methods and pricing of pedestrian detection, see [Billing overview](~~184049~~).'."\n"
+ .'> The following debugging operation is a paid operation. To try it for free, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=DetectPedestrian).',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'We recommend that you use an SDK to call the pedestrian detection feature under the Vision AI Face and Body category. SDKs are available in multiple programming languages. Select the SDK package for the Face and Body (facebody) AI category. File parameters support both local files and URLs when called through the SDK. For more information, see [SDK overview](~~145033~~).'."\n"
+ ."\n"
+ .'## Sample code'."\n"
+ .'For sample code in commonly used languages, see [Pedestrian detection sample code](~~601107~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of pedestrian detection, see [Common error codes](~~146756~~).'."\n"
+ ."\n"
+ .'## Open source Playground'."\n"
+ .'For more open source models to try and download, visit ModelScope: [Human Detection - General - Base](https://modelscope.cn/models/damo/cv_resnet18_human-detection/summary) and [Real-time Human Detection - General](https://modelscope.cn/models/damo/cv_tinynas_human-detection_damoyolo/summary).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Ensure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.',
+ 'changeSet' => [],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:DetectPedestrian',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"8B031473-6773-4A4C-AF33-A233758E6E98\\",\\n \\"Data\\": {\\n \\"ImageURL\\": \\"http://vibktprfx-prod-prod-aic-vd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/face-enhancement/2021-11-30/8e34b61c-abcf-4708-9d9d-6501968ee806/20211130_080644126523_47ct9w3pgh.jpg?Expires=1638261404&OSSAccessKeyId=LTAI****************&Signature=2wPdcuCmr%2F86WpBL3HQJw5uCFl****\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<EnhanceFaceResponse>\\n <RequestId>8B031473-6773-4A4C-AF33-A233758E6E98</RequestId>\\n <Data>\\n <ImageURL>http://vibktprfx-prod-prod-aic-vd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/face-enhancement/2021-11-30/8e34b61c-abcf-4708-9d9d-6501968ee806/20211130_080644126523_47ct9w3pgh.jpg?Expires=1638261404&amp;OSSAccessKeyId=LTAI****************&amp;Signature=2wPdcuCmr%2F86WpBL3HQJw5uCFl****</ImageURL>\\n </Data>\\n</EnhanceFaceResponse>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
],
- 'RecognizeFace' => [
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'DetectVideoLivingFace' => [
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -2793,400 +3491,139 @@
'systemTags' => [],
'parameters' => [
[
- 'name' => 'ImageURL',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/RecognizeFace/RecognizeFace1.png',
- 'isFileTransferUrl' => true,
- ],
- ],
- [
- 'name' => 'Age',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'boolean',
- 'required' => false,
- 'example' => 'false',
- ],
- ],
- [
- 'name' => 'Gender',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'boolean',
- 'required' => false,
- 'example' => 'false',
- ],
- ],
- [
- 'name' => 'Hat',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'boolean',
- 'required' => false,
- 'example' => 'false',
- ],
- ],
- [
- 'name' => 'Glass',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'boolean',
- 'required' => false,
- 'example' => 'false',
- ],
- ],
- [
- 'name' => 'Beauty',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'boolean',
- 'required' => false,
- 'example' => 'false',
- ],
- ],
- [
- 'name' => 'Expression',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'boolean',
- 'required' => false,
- 'example' => 'false',
- ],
- ],
- [
- 'name' => 'Mask',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'boolean',
- 'required' => false,
- 'example' => 'false',
- ],
- ],
- [
- 'name' => 'Quality',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'boolean',
- 'required' => false,
- 'example' => 'false',
- ],
- ],
- [
- 'name' => 'MaxFaceNumber',
+ 'name' => 'VideoUrl',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int64',
- 'required' => false,
- 'example' => '1',
- ],
+ 'schema' => ['description' => 'The URL of the input video that contains the face to be detected. We recommend that you use an Object Storage Service (OSS) URL in the China (Shanghai) region. If the file is stored locally or in an OSS bucket in a region other than China (Shanghai), see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/DetectVideoLivingFace/DetectVideoLivingFace1.mp4', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
- 'description' => '1',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '8251C88E-8273-4DBF-94FB-A6BCB268CEA2',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '8E92F28B-F889-48CB-9FCC-3207CFA2215E', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned result data.',
'type' => 'object',
'properties' => [
- 'Pupils' => [
- 'description' => '1',
- 'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '',
- ],
- ],
- 'GenderList' => [
- 'description' => '1',
- 'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '1',
- ],
- ],
- 'Expressions' => [
- 'description' => '1',
- 'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '0',
- ],
- ],
- 'DenseFeatures' => [
- 'description' => '1',
- 'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '',
- ],
- ],
- 'FaceCount' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '1',
- ],
- 'Landmarks' => [
- 'description' => '1',
+ 'Elements' => [
+ 'description' => 'The detection result data.',
'type' => 'array',
'items' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '',
- ],
- ],
- 'LandmarkCount' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '105',
- ],
- 'Qualities' => [
- 'description' => '',
- 'type' => 'object',
- 'properties' => [
- 'ScoreList' => [
- 'description' => '1',
- 'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '',
- ],
- ],
- 'BlurList' => [
- 'description' => '1',
- 'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '',
- ],
- ],
- 'FnfList' => [
- 'description' => '1',
- 'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '100',
- ],
- ],
- 'GlassList' => [
- 'description' => '1',
- 'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '',
- ],
- ],
- 'IlluList' => [
- 'description' => '1',
- 'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '',
- ],
- ],
- 'MaskList' => [
- 'description' => '1',
- 'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '',
- ],
- ],
- 'NoiseList' => [
- 'description' => '1',
- 'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '',
- ],
- ],
- 'PoseList' => [
- 'description' => '1',
- 'type' => 'array',
- 'items' => [
+ 'type' => 'object',
+ 'properties' => [
+ 'Rect' => [
+ 'type' => 'array',
+ 'items' => ['description' => 'The detected face position.', 'type' => 'integer', 'format' => 'int32', 'example' => '[374, 6, 493,106 ]', 'title' => ''],
'description' => '',
- 'type' => 'number',
- 'format' => 'float',
+ 'title' => '',
'example' => '',
],
+ 'LiveConfidence' => ['description' => 'The liveness confidence score. Valid values: 0 to 1.', 'type' => 'number', 'format' => 'float', 'example' => '0.72464925050735474', 'title' => ''],
+ 'FaceConfidence' => ['description' => 'The face confidence score. Valid values: 0 to 1.', 'type' => 'number', 'format' => 'float', 'example' => '0.84644949436187744', 'title' => ''],
],
- ],
- ],
- 'BeautyList' => [
- 'description' => '1',
- 'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '',
- ],
- ],
- 'HatList' => [
- 'description' => '1',
- 'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '0',
- ],
- ],
- 'FaceProbabilityList' => [
- 'description' => '1',
- 'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '',
- ],
- ],
- 'Glasses' => [
- 'description' => '1',
- 'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '1',
- ],
- ],
- 'FaceRectangles' => [
- 'description' => '1',
- 'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '',
- ],
- ],
- 'PoseList' => [
- 'description' => '1',
- 'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '',
- ],
- ],
- 'AgeList' => [
- 'description' => '1',
- 'type' => 'array',
- 'items' => [
'description' => '',
- 'type' => 'integer',
- 'format' => 'int32',
+ 'title' => '',
'example' => '',
],
- ],
- 'DenseFeatureLength' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '1024',
- ],
- 'Masks' => [
- 'description' => '1',
- 'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '0',
- ],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable.'],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"8E92F28B-F889-48CB-9FCC-3207CFA2215E\\",\\n \\"Data\\": {\\n \\"Elements\\": [\\n {\\n \\"Rect\\": [\\n 0\\n ],\\n \\"LiveConfidence\\": 0.7246492505073547,\\n \\"FaceConfidence\\": 0.8464494943618774\\n }\\n ]\\n }\\n}","type":"json"}]',
+ 'title' => 'Video liveness detection',
+ 'summary' => 'This topic describes the syntax and examples of the video liveness detection operation DetectVideoLivingFace.',
+ 'description' => '## Feature description'."\n"
+ .'The video liveness detection feature detects whether a face in an input video is from a live capture or a screen replay. When multiple faces appear in the video, the largest face in the frame is evaluated. Ensure that the facial features of the face to be detected are clearly visible.'."\n"
+ ."\n"
+ .'> - You can go to [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for online assistance.'."\n"
+ .'- You can try this feature for free on the Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=DetectVideoLivingFace) to experience this feature or purchase it online.'."\n"
+ .'- For questions about API integration or usage of Alibaba Cloud Vision Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Integration guide'."\n"
+ .'1. Create an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to create an account.'."\n"
+ .'2. Activate the feature: Make sure you have activated the [Face and Body service](https://vision.aliyun.com/facebody). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open).'."\n"
+ .'> This feature is available to enterprise or individual verified users. For more information about identity verification, see [verify your identity - Individual account](https://help.aliyun.com/knowledge_list/37170.html).'."\n"
+ ."\n"
+ .'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using an AccessKey pair of a RAM user, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/facebody/2019-12-30/DetectVideoLivingFace?lang=JAVA&sdkStyle=dara&params=%7B%22Type%22%3A0%2C%22VideoUrl%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Ffacebody%2FDetectVideoLivingFace%2FDetectVideoLivingFace1.mp4%22%7D&tab=DEMO) to debug this operation online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development integration steps:'."\n"
+ .'- Select the SDK language you want to use from [SDK overview](~~145033~~).'."\n"
+ .'- Find the SDK package for the Face and Body category (facebody) in the corresponding SDK documentation and install it.'."\n"
+ .'- Modify the sample code provided in the References as needed and invoke the operation.'."\n"
+ ."\n"
+ .'6. Direct client calls: Common client call methods for this feature include the following.'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from mini programs](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Input limits'."\n"
+ .'- Video format: MP4 or AVI.'."\n"
+ .'- Video size: up to 30 MB.'."\n"
+ .'- Video resolution: greater than 64 × 64 pixels. The video length must be greater than 3 seconds. The face size should be greater than 64 × 64 pixels.'."\n"
+ .'- The input video frame rate should be at least 15 frames per second.'."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ ."\n"
+ .'## Billing description'."\n"
+ .'For the billable methods and pricing of video liveness detection, see [Billing overview](~~184049~~).'."\n"
+ ."\n"
+ .'> The debugging operation below is a paid operation. For a free trial, go to [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=DetectVideoLivingFace).',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'For the video liveness detection feature under the Face and Body category of Alibaba Cloud Vision AI, we recommend that you use the SDK. The SDK supports multiple programming languages. When calling this operation, select the SDK package for the Face and Body category (facebody). The SDK supports both local files and URLs for file parameters. For more information, see [SDK overview](~~145033~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of video liveness detection, see [Common error codes](~~146756~~).'."\n"
+ ."\n"
+ .'## Open source Playground'."\n"
+ .'For more open source free models to try and download, visit ModelScope: [Face Liveness Detection Model - RGB](https://modelscope.cn/models/damo/cv_manual_face-liveness_flrgb/summary), [Face Liveness Detection Model - IR](https://modelscope.cn/models/damo/cv_manual_face-liveness_flir/summary), [Passive Face Liveness Detection Model - Colorful](https://modelscope.cn/models/damo/cv_manual_face-liveness_flxc/summary).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Ensure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging feature are valid for 1 hour and are automatically deleted by the system after 24 hours.'."\n"
+ .'- The platform does not store original face images or file information involved in the use of the service.',
+ 'changeSet' => [],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:DetectVideoLivingFace',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"8251C88E-8273-4DBF-94FB-A6BCB268CEA2\\",\\n \\"Data\\": {\\n \\"Pupils\\": [\\n 0\\n ],\\n \\"GenderList\\": [\\n 1\\n ],\\n \\"Expressions\\": [\\n 0\\n ],\\n \\"DenseFeatures\\": [\\n \\"[-0.04283177852630615, 0.01496131718158722, 0.08304227143526077, -0.006072732154279947, -0.012721054255962372, -0.024241730570793152, -0.03138406202197075, 0.006191537249833345, 0.017898650839924812, -0.03185232728719711, -0.02717948891222477, 0.028409384191036224, -0.03557640686631203, -0.02255111373960972, -0.030578967183828354, 0.011586467735469341, -0.005520580802112818, -0.0061850580386817455, -0.023915085941553116, 0.014204374514520168]\\"\\n ],\\n \\"FaceCount\\": 1,\\n \\"Landmarks\\": [\\n 0\\n ],\\n \\"LandmarkCount\\": 105,\\n \\"Qualities\\": {\\n \\"ScoreList\\": [\\n 87.47\\n ],\\n \\"BlurList\\": [\\n 99.99\\n ],\\n \\"FnfList\\": [\\n 100\\n ],\\n \\"GlassList\\": [\\n 97.59\\n ],\\n \\"IlluList\\": [\\n 99.97\\n ],\\n \\"MaskList\\": [\\n 93.33\\n ],\\n \\"NoiseList\\": [\\n 99.73\\n ],\\n \\"PoseList\\": [\\n 11.57\\n ]\\n },\\n \\"BeautyList\\": [\\n 48\\n ],\\n \\"HatList\\": [\\n 0\\n ],\\n \\"FaceProbabilityList\\": [\\n 0.95\\n ],\\n \\"Glasses\\": [\\n 1\\n ],\\n \\"FaceRectangles\\": [\\n 0\\n ],\\n \\"PoseList\\": [\\n 0\\n ],\\n \\"AgeList\\": [\\n 57\\n ],\\n \\"DenseFeatureLength\\": 1024,\\n \\"Masks\\": [\\n 0\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<RecognizeFaceResponse>\\n <RequestId>8251C88E-8273-4DBF-94FB-A6BCB268CEA2</RequestId>\\n <Data>\\n <Pupils>397.06</Pupils>\\n <Pupils>183.99</Pupils>\\n <Pupils>7.87</Pupils>\\n <Pupils>487.49</Pupils>\\n <Pupils>173.85</Pupils>\\n <Pupils>7.87</Pupils>\\n <GenderList>1</GenderList>\\n <Expressions>0</Expressions>\\n <DenseFeatures>[-0.04283177852630615, 0.01496131718158722, 0.08304227143526077, -0.006072732154279947, -0.012721054255962372, -0.024241730570793152, -0.03138406202197075, 0.006191537249833345, 0.017898650839924812, -0.03185232728719711, -0.02717948891222477, 0.028409384191036224, -0.03557640686631203, -0.02255111373960972, -0.030578967183828354, 0.011586467735469341, -0.005520580802112818, -0.0061850580386817455, -0.023915085941553116, 0.014204374514520168]</DenseFeatures>\\n <FaceCount>1</FaceCount>\\n <Landmarks>371.31</Landmarks>\\n <Landmarks>170.54</Landmarks>\\n <Landmarks>421.14</Landmarks>\\n <Landmarks>162.72</Landmarks>\\n <Landmarks>395.33</Landmarks>\\n <Landmarks>156.36</Landmarks>\\n <Landmarks>396.06</Landmarks>\\n <Landmarks>167.71</Landmarks>\\n <Landmarks>377.92</Landmarks>\\n <Landmarks>164.47</Landmarks>\\n <Landmarks>386.19</Landmarks>\\n <Landmarks>158.26</Landmarks>\\n <Landmarks>404.89</Landmarks>\\n <Landmarks>156.61</Landmarks>\\n <Landmarks>413.89</Landmarks>\\n <Landmarks>157.87</Landmarks>\\n <Landmarks>378.82</Landmarks>\\n <Landmarks>171</Landmarks>\\n <Landmarks>387.24</Landmarks>\\n <Landmarks>168.73</Landmarks>\\n <Landmarks>404.84</Landmarks>\\n <Landmarks>167.34</Landmarks>\\n <Landmarks>413.57</Landmarks>\\n <Landmarks>167.26</Landmarks>\\n <Landmarks>458.27</Landmarks>\\n <Landmarks>159.5</Landmarks>\\n <Landmarks>521.24</Landmarks>\\n <Landmarks>165.59</Landmarks>\\n <Landmarks>490.58</Landmarks>\\n <Landmarks>150.77</Landmarks>\\n <Landmarks>490.23</Landmarks>\\n <Landmarks>162.28</Landmarks>\\n <Landmarks>467.51</Landmarks>\\n <Landmarks>153.1</Landmarks>\\n <Landmarks>479.01</Landmarks>\\n <Landmarks>151.32</Landmarks>\\n <Landmarks>502.02</Landmarks>\\n <Landmarks>153.2</Landmarks>\\n <Landmarks>513.06</Landmarks>\\n <Landmarks>159.78</Landmarks>\\n <Landmarks>468</Landmarks>\\n <Landmarks>163.52</Landmarks>\\n <Landmarks>478.98</Landmarks>\\n <Landmarks>162.32</Landmarks>\\n <Landmarks>501.41</Landmarks>\\n <Landmarks>163.93</Landmarks>\\n <Landmarks>512.07</Landmarks>\\n <Landmarks>166.6</Landmarks>\\n <Landmarks>381.98</Landmarks>\\n <Landmarks>187.97</Landmarks>\\n <Landmarks>419.4</Landmarks>\\n <Landmarks>184.68</Landmarks>\\n <Landmarks>386.29</Landmarks>\\n <Landmarks>184.05</Landmarks>\\n <Landmarks>389.33</Landmarks>\\n <Landmarks>180.31</Landmarks>\\n <Landmarks>394.56</Landmarks>\\n <Landmarks>178.97</Landmarks>\\n <Landmarks>398.93</Landmarks>\\n <Landmarks>176.7</Landmarks>\\n <Landmarks>404.67</Landmarks>\\n <Landmarks>178.01</Landmarks>\\n <Landmarks>410.16</Landmarks>\\n <Landmarks>178.29</Landmarks>\\n <Landmarks>414.64</Landmarks>\\n <Landmarks>181.61</Landmarks>\\n <Landmarks>386.62</Landmarks>\\n <Landmarks>188.63</Landmarks>\\n <Landmarks>390.22</Landmarks>\\n <Landmarks>189.61</Landmarks>\\n <Landmarks>395.06</Landmarks>\\n <Landmarks>189.65</Landmarks>\\n <Landmarks>399.35</Landmarks>\\n <Landmarks>189.78</Landmarks>\\n <Landmarks>404.47</Landmarks>\\n <Landmarks>188.86</Landmarks>\\n <Landmarks>409.6</Landmarks>\\n <Landmarks>187.94</Landmarks>\\n <Landmarks>414.35</Landmarks>\\n <Landmarks>186.47</Landmarks>\\n <Landmarks>467.88</Landmarks>\\n <Landmarks>180.89</Landmarks>\\n <Landmarks>509.45</Landmarks>\\n <Landmarks>179.81</Landmarks>\\n <Landmarks>472.7</Landmarks>\\n <Landmarks>177.13</Landmarks>\\n <Landmarks>476.94</Landmarks>\\n <Landmarks>173.17</Landmarks>\\n <Landmarks>483.16</Landmarks>\\n <Landmarks>172.02</Landmarks>\\n <Landmarks>488.5</Landmarks>\\n <Landmarks>170.41</Landmarks>\\n <Landmarks>494.14</Landmarks>\\n <Landmarks>172.17</Landmarks>\\n <Landmarks>499.85</Landmarks>\\n <Landmarks>173.15</Landmarks>\\n <Landmarks>504.05</Landmarks>\\n <Landmarks>176.58</Landmarks>\\n <Landmarks>473.23</Landmarks>\\n <Landmarks>182.31</Landmarks>\\n <Landmarks>478.06</Landmarks>\\n <Landmarks>183.11</Landmarks>\\n <Landmarks>483.77</Landmarks>\\n <Landmarks>183.5</Landmarks>\\n <Landmarks>488.64</Landmarks>\\n <Landmarks>183.77</Landmarks>\\n <Landmarks>493.94</Landmarks>\\n <Landmarks>183.26</Landmarks>\\n <Landmarks>499.41</Landmarks>\\n <Landmarks>182.57</Landmarks>\\n <Landmarks>503.69</Landmarks>\\n <Landmarks>181.14</Landmarks>\\n <Landmarks>437.26</Landmarks>\\n <Landmarks>181.67</Landmarks>\\n <Landmarks>430.77</Landmarks>\\n <Landmarks>225.48</Landmarks>\\n <Landmarks>434.38</Landmarks>\\n <Landmarks>203.34</Landmarks>\\n <Landmarks>435.09</Landmarks>\\n <Landmarks>245.37</Landmarks>\\n <Landmarks>414.99</Landmarks>\\n <Landmarks>243.56</Landmarks>\\n <Landmarks>463.03</Landmarks>\\n <Landmarks>241.47</Landmarks>\\n <Landmarks>402.97</Landmarks>\\n <Landmarks>282.43</Landmarks>\\n <Landmarks>487.32</Landmarks>\\n <Landmarks>279.44</Landmarks>\\n <Landmarks>404.76</Landmarks>\\n <Landmarks>282.21</Landmarks>\\n <Landmarks>484.51</Landmarks>\\n <Landmarks>279.63</Landmarks>\\n <Landmarks>436.81</Landmarks>\\n <Landmarks>269.19</Landmarks>\\n <Landmarks>428.83</Landmarks>\\n <Landmarks>269.46</Landmarks>\\n <Landmarks>444.9</Landmarks>\\n <Landmarks>269.87</Landmarks>\\n <Landmarks>414.07</Landmarks>\\n <Landmarks>273.42</Landmarks>\\n <Landmarks>466.73</Landmarks>\\n <Landmarks>272.4</Landmarks>\\n <Landmarks>407.94</Landmarks>\\n <Landmarks>277.81</Landmarks>\\n <Landmarks>421.38</Landmarks>\\n <Landmarks>271.38</Landmarks>\\n <Landmarks>455.7</Landmarks>\\n <Landmarks>271</Landmarks>\\n <Landmarks>477.47</Landmarks>\\n <Landmarks>276.08</Landmarks>\\n <Landmarks>437.71</Landmarks>\\n <Landmarks>290.09</Landmarks>\\n <Landmarks>417.1</Landmarks>\\n <Landmarks>288.03</Landmarks>\\n <Landmarks>464.19</Landmarks>\\n <Landmarks>286.36</Landmarks>\\n <Landmarks>409.84</Landmarks>\\n <Landmarks>284.75</Landmarks>\\n <Landmarks>427.92</Landmarks>\\n <Landmarks>288.61</Landmarks>\\n <Landmarks>450.74</Landmarks>\\n <Landmarks>287.81</Landmarks>\\n <Landmarks>475.9</Landmarks>\\n <Landmarks>282.68</Landmarks>\\n <Landmarks>437.36</Landmarks>\\n <Landmarks>278.04</Landmarks>\\n <Landmarks>437.64</Landmarks>\\n <Landmarks>277.63</Landmarks>\\n <Landmarks>420.34</Landmarks>\\n <Landmarks>278.65</Landmarks>\\n <Landmarks>420.04</Landmarks>\\n <Landmarks>278.69</Landmarks>\\n <Landmarks>460.92</Landmarks>\\n <Landmarks>277.64</Landmarks>\\n <Landmarks>461.01</Landmarks>\\n <Landmarks>277.22</Landmarks>\\n <Landmarks>412.68</Landmarks>\\n <Landmarks>280.41</Landmarks>\\n <Landmarks>412.5</Landmarks>\\n <Landmarks>279.99</Landmarks>\\n <Landmarks>429.06</Landmarks>\\n <Landmarks>278.19</Landmarks>\\n <Landmarks>429.05</Landmarks>\\n <Landmarks>277.65</Landmarks>\\n <Landmarks>448.83</Landmarks>\\n <Landmarks>277.82</Landmarks>\\n <Landmarks>449.13</Landmarks>\\n <Landmarks>276.93</Landmarks>\\n <Landmarks>472.58</Landmarks>\\n <Landmarks>278.55</Landmarks>\\n <Landmarks>472.59</Landmarks>\\n <Landmarks>278.16</Landmarks>\\n <Landmarks>365.8</Landmarks>\\n <Landmarks>192</Landmarks>\\n <Landmarks>566.18</Landmarks>\\n <Landmarks>185.68</Landmarks>\\n <Landmarks>440.54</Landmarks>\\n <Landmarks>352.94</Landmarks>\\n <Landmarks>372.84</Landmarks>\\n <Landmarks>289.96</Landmarks>\\n <Landmarks>548.44</Landmarks>\\n <Landmarks>300.96</Landmarks>\\n <Landmarks>364.88</Landmarks>\\n <Landmarks>240.03</Landmarks>\\n <Landmarks>565.1</Landmarks>\\n <Landmarks>243.91</Landmarks>\\n <Landmarks>397.45</Landmarks>\\n <Landmarks>334.16</Landmarks>\\n <Landmarks>501.07</Landmarks>\\n <Landmarks>340.61</Landmarks>\\n <LandmarkCount>105</LandmarkCount>\\n <Qualities>\\n <ScoreList>87.47</ScoreList>\\n <BlurList>99.99</BlurList>\\n <FnfList>100</FnfList>\\n <GlassList>97.59</GlassList>\\n <IlluList>99.97</IlluList>\\n <MaskList>93.33</MaskList>\\n <NoiseList>99.73</NoiseList>\\n <PoseList>11.57</PoseList>\\n </Qualities>\\n <BeautyList>48</BeautyList>\\n <HatList>0</HatList>\\n <FaceProbabilityList>0.95</FaceProbabilityList>\\n <Glasses>1</Glasses>\\n <FaceRectangles>356</FaceRectangles>\\n <FaceRectangles>84</FaceRectangles>\\n <FaceRectangles>211</FaceRectangles>\\n <FaceRectangles>278</FaceRectangles>\\n <PoseList>-12.7</PoseList>\\n <PoseList>7.48</PoseList>\\n <PoseList>0.12</PoseList>\\n <AgeList>57</AgeList>\\n <DenseFeatureLength>1024</DenseFeatureLength>\\n <Masks>0</Masks>\\n </Data>\\n</RecognizeFaceResponse>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
],
- 'RecognizePublicFace' => [
- 'summary' => '公众人脸识别(RecognizePublicFace)',
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'EnhanceFace' => [
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -3197,358 +3634,452 @@
'systemTags' => [],
'parameters' => [
[
- 'name' => 'Task',
+ 'name' => 'ImageURL',
'in' => 'formData',
- 'style' => 'repeatList',
- 'schema' => [
- 'description' => '1',
- 'type' => 'array',
- 'items' => [
- 'description' => '1',
- 'type' => 'object',
- 'properties' => [
- 'ImageURL' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => false,
- 'example' => 'https://viapi-oss.oss-cn-shanghai.aliyuncs.com/doc/facebody/xxx.jpg',
- 'isFileTransferUrl' => true,
- ],
- 'ImageData' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => false,
- 'example' => '',
- ],
- ],
- 'required' => false,
- ],
- 'required' => false,
- 'maxItems' => 10,
- 'minItems' => 1,
- ],
+ 'schema' => ['description' => 'The URL of the image. We recommend that you use an OSS URL in the China (Shanghai) region. If the file is stored locally or in an OSS bucket outside the China (Shanghai) region, see [File URL processing](~~155645~~).'."\n"
+ .'Input limits:'."\n"
+ ."\n"
+ .'- Image format: JPEG, JPG, BMP, or PNG.'."\n"
+ .'- Image size: up to 3 MB.'."\n"
+ .'- Image resolution: greater than 32 × 32 pixels and less than 2048 × 2048 pixels (the longest side must be less than or equal to 2047 pixels). The face area must be at least 64 × 64 pixels.'."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ .'- The input image must contain faces.'."\n"
+ .'- The input image should contain no more than 10 faces. Otherwise, only the 10 largest faces are processed.'."\n"
+ .'- The faces in the input image should not have scratches or damage. The algorithm does not support this type of restoration.'."\n"
+ .'- The faces in the input image should not be too clear or have excessively high resolution. Otherwise, reverse quality degradation may occur.'."\n"
+ ."\n"
+ .'> If the image resolution exceeds the maximum limit, resize the image first. For more information, see [Image resizing](~~44688~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/EnhanceFace/EnhanceFace1.png', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
- 'description' => '1',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'AC4D107C-29E3-4873-A719-0D2217EA28A8',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '8B031473-6773-4A4C-AF33-A233758E6E98', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned data.',
'type' => 'object',
'properties' => [
- 'Elements' => [
- 'description' => '',
- 'type' => 'array',
- 'items' => [
- 'description' => '1',
- 'type' => 'object',
- 'properties' => [
- 'ImageURL' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'https://viapi-oss.oss-cn-shanghai.aliyuncs.com/doc/facebody/xxx.jpg',
- ],
- 'TaskId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'img3dhYqt1e4wO77Wnf2y@t@E-1tYAEt',
- ],
- 'Results' => [
- 'description' => '',
- 'type' => 'array',
- 'items' => [
- 'description' => '1',
- 'type' => 'object',
- 'properties' => [
- 'Suggestion' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'review',
- ],
- 'Label' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'sface',
- ],
- 'SubResults' => [
- 'description' => '',
- 'type' => 'array',
- 'items' => [
- 'description' => '1',
- 'type' => 'object',
- 'properties' => [
- 'W' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '132',
- ],
- 'Faces' => [
- 'description' => '',
- 'type' => 'array',
- 'items' => [
- 'description' => '1',
- 'type' => 'object',
- 'properties' => [
- 'Name' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '',
- ],
- 'Id' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'AliFace_0006272',
- ],
- 'Rate' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '98.35',
- ],
- ],
- ],
- ],
- 'H' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '153',
- ],
- 'Y' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '153',
- ],
- 'X' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '182',
- ],
- ],
- ],
- ],
- 'Rate' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '98.35',
- ],
- ],
- ],
- ],
- ],
- ],
- ],
+ 'ImageURL' => ['description' => 'The URL of the result image after face restoration and enhancement.'."\n"
+ .'> This URL is a temporary URL that is valid for 30 minutes. After it expires, the URL can no longer be accessed. To save the file for a longer period or permanently, access the URL within 30 minutes, download the file, and store it in your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://vibktprfx-prod-prod-aic-vd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/face-enhancement/2021-11-30/8e34b61c-abcf-4708-9d9d-6501968ee806/20211130_080644126523_47ct9w3pgh.jpg?Expires=1638261404&OSSAccessKeyId=LTAI****************&Signature=2wPdcuCmr%2F86WpBL3HQJw5uCFl****', 'title' => ''],
],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable.'],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"8B031473-6773-4A4C-AF33-A233758E6E98\\",\\n \\"Data\\": {\\n \\"ImageURL\\": \\"http://vibktprfx-prod-prod-aic-vd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/face-enhancement/2021-11-30/8e34b61c-abcf-4708-9d9d-6501968ee806/20211130_080644126523_47ct9w3pgh.jpg?Expires=1638261404&OSSAccessKeyId=LTAI****************&Signature=2wPdcuCmr%2F86WpBL3HQJw5uCFl****\\"\\n }\\n}","type":"json"}]',
+ 'title' => 'Face restoration and enhancement',
+ 'summary' => 'This topic describes the syntax and provides examples of the face restoration and enhancement feature (EnhanceFace).',
+ 'description' => '## Feature description'."\n"
+ .'The face restoration and enhancement feature crops, aligns, and enhances the details of faces in an input image, and then merges the enhanced faces back into the original image.'."\n"
+ .'The following figures show examples of this feature:'."\n"
+ .'- Input image:'."\n"
+ .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20221108/gsfa/EnhanceFace.jpg" width="300)'."\n"
+ .'- Enhanced output image:'."\n"
+ .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20221108/nbbg/EnhanceFacezengqiang.png" width="300)'."\n"
+ ."\n"
+ .'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) to get online assistance.'."\n"
+ .'- You can try this feature for free on the Visual Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=EnhanceFace) to experience this feature or purchase it online.'."\n"
+ .'- To learn more about accessing the Visual Intelligence Open Platform, using APIs, or consulting on issues, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Common scenarios'."\n"
+ ."\n"
+ .'- Photo enhancement: For photos that are underexposed, out of focus, or blurred due to camera shake, the face restoration and enhancement feature can compensate for these deficiencies and restore the photos.'."\n"
+ .'- Old photo restoration: For portrait photos taken in the early days with low resolution or poor clarity, the feature can enhance and restore them while preserving the texture of the old photos and improving portrait clarity.'."\n"
+ ."\n"
+ .'## Advantages'."\n"
+ ."\n"
+ .'- Detail enhancement: Enhances the details of the original image. Even when the original photo quality is insufficient, the feature can recover partial details and improve photo quality.'."\n"
+ .'- Portrait consistency: While enhancing details, the feature preserves consistency and realism with the original portrait.'."\n"
+ ."\n"
+ .'## Getting started'."\n"
+ .'1. Create an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Sign Up** in the upper-right corner, and follow the instructions to create an account.'."\n"
+ .'2. Activate the service: Make sure that you have activated the [Face and Body service](https://vision.aliyun.com/facebody). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open).'."\n"
+ .'> This feature is available to enterprise users or users who have completed verify your identity - Individual account. For more information about identity verification, see [Identity Verification](https://help.aliyun.com/knowledge_list/37170.html).'."\n"
+ .'3. Create an AccessKey pair: Make sure that you have [created an AccessKey pair](~~175144~~). If you are using an AccessKey pair of a RAM user, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/facebody/2019-12-30/EnhanceFace?lang=JAVA&sdkStyle=dara&params=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Ffacebody%2FEnhanceFace%2FEnhanceFace1.png%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development and integration steps:'."\n"
+ .'- Select the SDK language that you want to use from the [SDK overview](~~145033~~).'."\n"
+ .'- Find the SDK package for the Face and Body category (facebody) in the corresponding SDK documentation and install it.'."\n"
+ .'- Modify the sample code provided in the References as needed and invoke the API operation.'."\n"
+ ."\n"
+ .'6. Direct client calls: The following common methods are available for calling this feature from a client.'."\n"
+ .'- [Direct call from a web frontend](~~467779~~)'."\n"
+ .'- [Direct call from a mini program](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Input limits'."\n"
+ ."\n"
+ .'- Image format: JPEG, JPG, BMP, or PNG.'."\n"
+ .'- Image size: up to 3 MB.'."\n"
+ .'- Image resolution: greater than 32 × 32 pixels and less than 2048 × 2048 pixels (the longest side must be less than or equal to 2047 pixels). The face area must be at least 64 × 64 pixels.'."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ .'- The input image must contain faces.'."\n"
+ .'- The input image should contain no more than 10 faces. Otherwise, only the 10 largest faces are processed.'."\n"
+ .'- The faces in the input image should not have scratches or damage. The algorithm does not support this type of restoration.'."\n"
+ .'- The faces in the input image should not be too clear or have excessively high resolution. Otherwise, reverse quality degradation may occur.'."\n"
+ ."\n"
+ .'> If the image resolution exceeds the maximum limit, resize the image first. For more information, see [Image resizing](~~44688~~).'."\n"
+ ."\n"
+ .'## Billing description'."\n"
+ .'For information about the billable methods and pricing of the face restoration and enhancement feature, see [Billing overview](~~184049~~).'."\n"
+ ."\n"
+ .'> The following debugging API operation is a paid operation. To try it for free, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=EnhanceFace).',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'We recommend that you use an SDK to call the face restoration and enhancement feature under the Face and Body category of Alibaba Cloud Visual AI. Multiple programming languages are supported. When calling this feature, select the SDK package for the Face and Body category (facebody). File parameters can be passed as local files or arbitrary URLs through the SDK. For more information, see [SDK overview](~~145033~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For information about the error codes of the face restoration and enhancement feature, see [Common error codes](~~146756~~).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.',
+ 'changeSet' => [],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:EnhanceFace',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"AC4D107C-29E3-4873-A719-0D2217EA28A8\\",\\n \\"Data\\": {\\n \\"Elements\\": [\\n {\\n \\"ImageURL\\": \\"https://viapi-oss.oss-cn-shanghai.aliyuncs.com/doc/facebody/xxx.jpg\\",\\n \\"TaskId\\": \\"img3dhYqt1e4wO77Wnf2y@t@E-1tYAEt\\",\\n \\"Results\\": [\\n {\\n \\"Suggestion\\": \\"review\\",\\n \\"Label\\": \\"sface\\",\\n \\"SubResults\\": [\\n {\\n \\"W\\": 132,\\n \\"Faces\\": [\\n {\\n \\"Name\\": \\"张三\\",\\n \\"Id\\": \\"AliFace_0006272\\",\\n \\"Rate\\": 98.35\\n }\\n ],\\n \\"H\\": 153,\\n \\"Y\\": 153,\\n \\"X\\": 182\\n }\\n ],\\n \\"Rate\\": 98.35\\n }\\n ]\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<RecognizePublicFaceResponse>\\n <RequestId>AC4D107C-29E3-4873-A719-0D2217EA28A8</RequestId>\\n <Data>\\n <Elements>\\n <ImageURL>https://viapi-oss.oss-cn-shanghai.aliyuncs.com/doc/facebody/xxx.jpg</ImageURL>\\n <TaskId>img3dhYqt1e4wO77Wnf2y@t@E-1tYAEt</TaskId>\\n <Results>\\n <Suggestion>review</Suggestion>\\n <Label>sface</Label>\\n <SubResults>\\n <W>132</W>\\n <Faces>\\n <Name>张三</Name>\\n <Id>AliFace_0006272</Id>\\n <Rate>98.35</Rate>\\n </Faces>\\n <H>153</H>\\n <Y>153</Y>\\n <X>182</X>\\n </SubResults>\\n <Rate>98.35</Rate>\\n </Results>\\n </Elements>\\n </Data>\\n</RecognizePublicFaceResponse>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
],
- 'MergeImageFace' => [
- 'summary' => '图像人脸融合',
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'ExtractFingerPrint' => [
+ 'summary' => 'This topic describes the syntax and provides examples of the ExtractFingerPrint operation.',
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'none',
- ],
+ 'systemTags' => [],
'parameters' => [
[
- 'name' => 'TemplateId',
+ 'name' => 'ImageURL',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => '6cd509ea-54fa-4730-8e9d-c94cadcda048',
- ],
+ 'schema' => ['description' => 'The URL of the image. We recommend that you use an Object Storage Service (OSS) link in the Shanghai region. If the file is stored locally or in an OSS bucket outside the Shanghai region, refer to [File URL processing](~~155645~~).'."\n"
+ ."\n"
+ .'> Specify either **ImageURL** or **ImageData**. If both are specified, **ImageURL** takes precedence. For information about Base64 encoding of files, refer to [File Base64 processing](~~468191~~).', 'type' => 'string', 'isFileTransferUrl' => true, 'required' => false, 'example' => 'https://viapi-test.oss-cn-shanghai.aliyuncs.com/test-team/xuhan/ExtractFingerPrint.png', 'title' => ''],
],
[
- 'name' => 'ImageURL',
+ 'name' => 'ImageData',
'in' => 'formData',
+ 'schema' => ['description' => 'The Base64-encoded string of the image. For information about Base64 encoding of files, refer to [File Base64 processing](~~468191~~).'."\n"
+ ."\n"
+ .'> Specify either **ImageURL** or **ImageData**. If both are specified, **ImageURL** takes precedence.', 'type' => 'string', 'required' => false, 'example' => 'iVBORw0KGgoAAAANSUhEUgAAASUAA****', 'title' => ''],
+ ],
+ ],
+ 'responses' => [
+ 200 => [
'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => false,
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/MergeImageFace/MergeImageFace-1.png',
- 'isFileTransferUrl' => true,
+ 'title' => '',
+ 'description' => 'Schema of Response',
+ 'type' => 'object',
+ 'properties' => [
+ 'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => 'D21978CC-C1E7-4A7A-A1B2-D5896BDC7ADF'],
+ 'Data' => [
+ 'description' => 'The returned data.',
+ 'type' => 'object',
+ 'properties' => [
+ 'FingerPrint' => ['description' => 'The Base64-encoded string of the fingerprint extraction result image.', 'type' => 'string', 'example' => '/9j/4AAQSkZJRgABAQAAAQABAAD****', 'title' => ''],
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ ],
+ 'example' => '',
],
],
+ ],
+ 'errorCodes' => [
+ 400 => [
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
+ ],
+ 403 => [
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
+ ],
+ 408 => [
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
+ ],
+ 503 => [
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable.'],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"D21978CC-C1E7-4A7A-A1B2-D5896BDC7ADF\\",\\n \\"Data\\": {\\n \\"FingerPrint\\": \\"/9j/4AAQSkZJRgABAQAAAQABAAD****\\"\\n }\\n}","type":"json"}]',
+ 'title' => 'Fingerprint extraction',
+ 'description' => '## Feature description'."\n"
+ .'The fingerprint extraction feature automatically locates the finger region in an input photo of a finger and generates a binarized black-and-white pressed fingerprint image.'."\n"
+ ."\n"
+ .'> - You can join [online consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) to get help from online support.'."\n"
+ .'- You can try this feature for free on the China Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=ExtractFingerPrint) to experience this feature or purchase it online.'."\n"
+ .'- To consult about API integration, usage, or issues related to the Alibaba Cloud China Vision Intelligence Open Platform, contact us by joining the DingTalk group (23109592).'."\n"
+ ."\n"
+ .'## Common scenarios'."\n"
+ .'Online information collection: During cloud-based case handling, a party uploads a photo of their thumb taken with a mobile phone. The fingerprint extraction feature generates a pressed fingerprint image that can be used as the party\'s identity record, making remote case handling possible.'."\n"
+ ."\n"
+ .'## Benefits'."\n"
+ ."\n"
+ .'- Intelligent positioning: Uses deep learning algorithms to intelligently locate the finger region, reducing the difficulty of mobile phone-based fingerprint collection.'."\n"
+ .'- Multi-angle shooting support: Supports processing finger images taken from any angle, reducing the difficulty of fingerprint collection.'."\n"
+ .'- Accurate restoration: Accurately restores finger fingerprints with texture visual effects identical to real pressed fingerprints.'."\n"
+ ."\n"
+ .'## Getting started'."\n"
+ .'1. Create an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to create an account.'."\n"
+ .'2. Activate the feature: Make sure you have activated the [Face and Body service](https://vision.aliyun.com/facebody). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open). After activating the service, [commit an application](https://vision.console.aliyun.com/cn-shanghai/applyopen/facebody/ExtractFingerPrint). After the application is approved, [purchase QPS](https://common-buy.aliyun.com/?commodityCode=viapi_facebodyqps_public_cn#/buy) to use the feature.'."\n"
+ ."\n"
+ .'><notice>'."\n"
+ .'This feature is available only to users who verify your identity - Enterprise account. For more information about real-name verification, refer to [Real-name verification](https://help.aliyun.com/knowledge_list/37170.html).'."\n"
+ .'></notice>'."\n"
+ ."\n"
+ .'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, refer to [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/facebody/2019-12-30/ExtractFingerPrint?lang=JAVA&sdkStyle=old) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development integration steps:'."\n"
+ .'- Select the SDK language you want to use from [SDK overview](~~145033~~).'."\n"
+ .'- Find and install the SDK package for the Face and Body (facebody) category in the corresponding SDK documentation.'."\n"
+ .'- Modify the sample code provided in the References as needed and invoke it.'."\n"
+ ."\n"
+ .'6. Direct client invocation: Common client invocation methods for this feature include the following.'."\n"
+ .'- [Direct invocation from web frontend](~~467779~~)'."\n"
+ .'- [Direct invocation from mini programs](~~467780~~)'."\n"
+ .'- [Direct invocation from Android](~~467781~~)'."\n"
+ .'- [Direct invocation from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Input limits'."\n"
+ ."\n"
+ .'- Image format: JPG, JPEG, or PNG.'."\n"
+ ."\n"
+ .'- Image size: Up to 10 MB.'."\n"
+ ."\n"
+ .'- Image resolution: Greater than 640 × 360 pixels and less than 2560 × 1440 pixels.'."\n"
+ ."\n"
+ .'- Position the camera lens as close to the finger as possible and shoot at a diagonal angle.'."\n"
+ ."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ ."\n"
+ .'## Billing description'."\n"
+ .'For information about the billable methods and pricing of fingerprint fetch, refer to [Billing overview](~~184049~~).',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'We recommend that you use an SDK to call the fingerprint extraction feature under the Face and Body category of Alibaba Cloud Vision AI. The SDK supports multiple programming languages. When making calls, select the SDK package for the Face and Body (facebody) category. File parameters support local files and arbitrary URLs through SDK calls. For more information, refer to [SDK overview](~~145033~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of fingerprint extraction, refer to [Common error codes](~~146756~~).'."\n"
+ .'## Security notice'."\n"
+ ."\n"
+ .'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.',
+ 'changeSet' => [],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:ExtractFingerPrint',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'FaceBeauty' => [
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
+ 'security' => [
[
- 'name' => 'ModelVersion',
+ 'AK' => [],
+ ],
+ ],
+ 'operationType' => 'read',
+ 'deprecated' => false,
+ 'systemTags' => [],
+ 'parameters' => [
+ [
+ 'name' => 'ImageURL',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => false,
- 'example' => 'v1',
- ],
+ 'schema' => ['description' => 'The URL of the image. We recommend that you use an OSS URL in the Shanghai region. If the file is stored locally or in an OSS bucket outside the Shanghai region, see [File URL processing](~~155645~~).'."\n"
+ .'Input limits:'."\n"
+ ."\n"
+ .'- Image format: JPEG, JPG, PNG, or BMP.'."\n"
+ .'- Image size: up to 4 MB.'."\n"
+ .'- Image resolution: greater than 10 × 10 pixels and less than 2000 × 2000 pixels. The longest side must be less than 2000 pixels.'."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ .'- Image quality recommendation: suitable for portrait images with most skin types. The results may be less effective for images with severe blemishes, acne, or low exposure.', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/FaceBeauty/FaceBeauty4.png', 'title' => ''],
],
[
- 'name' => 'AddWatermark',
+ 'name' => 'Sharp',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'boolean',
- 'required' => false,
- 'example' => 'False',
- 'default' => 'false',
- ],
+ 'schema' => ['description' => 'The sharpening (clarity) level. Valid values: 0 to 1. A value closer to 1 indicates a higher sharpening level.', 'type' => 'number', 'format' => 'float', 'required' => true, 'example' => '1', 'title' => ''],
],
[
- 'name' => 'WatermarkType',
+ 'name' => 'Smooth',
'in' => 'formData',
- 'schema' => [
- 'type' => 'string',
- 'default' => 'EN',
- ],
+ 'schema' => ['description' => 'The smoothness level. Valid values: 0 to 1. A value closer to 1 indicates a higher smoothness level.', 'type' => 'number', 'format' => 'float', 'required' => true, 'example' => '0.1', 'title' => ''],
],
[
- 'name' => 'MergeInfos',
+ 'name' => 'White',
'in' => 'formData',
- 'style' => 'repeatList',
- 'schema' => [
- 'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'object',
- 'properties' => [
- 'TemplateFaceID' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => false,
- 'example' => '6cd509ea-54fa-4730-8e9d-c94cadcda048_0',
- ],
- 'ImageURL' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => false,
- 'example' => 'http://invi-label.oss-cn-shanghai.aliyuncs.com/label/temp/faceswap/ref/ref.jpg',
- ],
- ],
- 'required' => false,
- ],
- 'required' => false,
- 'maxItems' => 1000,
- 'minItems' => 0,
- ],
+ 'schema' => ['description' => 'The whitening level. Valid values: 0 to 1. A value closer to 1 indicates a higher whitening level.', 'type' => 'number', 'format' => 'float', 'required' => true, 'example' => '0.3', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
- 'title' => 'Schema of Response',
- 'description' => 'Schema of Response',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'title' => 'Id of the request',
- 'description' => '',
- 'type' => 'string',
- 'example' => '8473A5E5-488E-4612-800E-F95B42381570',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '35C284E1-C5F5-4E5E-B7AD-97BBF485CDC8', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned data.',
'type' => 'object',
'properties' => [
- 'ImageURL' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'http://vibktprfx-prod-prod-aic-gd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/image-face-fusion/09dedc78-c355-442a-9312-7ab074d6de49_54dc_20210129-025407.jpg?Expires=1611890647&OSSAccessKeyId=LTAI4FoLmvQ9urWXgSRp****&Signature=2mk2OgIrwMqrvA%2FvDdp0MNaoVU****',
- ],
+ 'ImageURL' => ['description' => 'The URL of the beautified image.'."\n"
+ .'> This URL is a temporary URL that is valid for 30 minutes. After it expires, the URL is no longer accessible. To save the file for a longer period or permanently, access the URL within 30 minutes, download the file, and store it in your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://algo-app-taobao-mm-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/pixelai-portrait-beauty/2020_03_24/2bbbdb7907901412_facebeauty.jpg?Expires=1585277923&OSSAccessKeyId=LTAI****************&Signature=myOPfNQcRyijgrWBU%2BZ4dPuV5Q****', 'title' => ''],
],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable.'],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"35C284E1-C5F5-4E5E-B7AD-97BBF485CDC8\\",\\n \\"Data\\": {\\n \\"ImageURL\\": \\"http://algo-app-taobao-mm-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/pixelai-portrait-beauty/2020_03_24/2bbbdb7907901412_facebeauty.jpg?Expires=1585277923&OSSAccessKeyId=LTAI****************&Signature=myOPfNQcRyijgrWBU%2BZ4dPuV5Q****\\"\\n }\\n}","type":"json"}]',
+ 'title' => 'Face beautification',
+ 'summary' => 'This topic describes the syntax and provides examples of the face beautification feature (FaceBeauty).',
+ 'description' => '## Feature description'."\n"
+ .'The face beautification feature enhances faces in images. The following capabilities are supported:'."\n"
+ .'- Face beautification: skin smoothing, whitening, sharpening (clarity), and smoothness adjustment.'."\n"
+ .'- Parameter adjustment: custom parameter adjustment to improve personal appearance.'."\n"
+ ."\n"
+ .'The following images show examples of this feature:'."\n"
+ .'- Input image'."\n"
+ .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20230202/pklu/FaceBeauty.png" width="300)'."\n"
+ ."\n"
+ .'- Whitening'."\n"
+ .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20221101/lmdw/FaceBeautymeibai.jpg" width="300)'."\n"
+ ."\n"
+ .'- Skin smoothing'."\n"
+ .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20221101/isyv/FaceBeautymopi.jpg" width="300)'."\n"
+ ."\n"
+ .'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) to get online assistance.'."\n"
+ .'- You can try this feature for free on the Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=FaceBeauty) to experience this feature or purchase it online.'."\n"
+ .'- For questions about API access, usage, or consultation regarding Alibaba Cloud Vision Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Common scenarios'."\n"
+ ."\n"
+ .'- Beauty camera: Photos taken with a beauty camera automatically include beautification effects.'."\n"
+ .'- Photography post-production: Deep learning-based face beautification technology enhances the artistic quality of portrait photography.'."\n"
+ ."\n"
+ .'## Benefits'."\n"
+ ."\n"
+ .'- Face beautification: Applies skin smoothing, dark circle and nasolabial fold removal, whitening, and other effects to photos.'."\n"
+ .'- Clarity preservation: Maintains the original clarity of the image.'."\n"
+ ."\n"
+ .'## Getting started'."\n"
+ .'1. Create an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Sign Up** in the upper-right corner, and follow the instructions to complete account registration.'."\n"
+ .'2. Activate the service: Make sure you have activated the [Face and Body service](https://vision.aliyun.com/facebody). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open).'."\n"
+ .'> This feature is available to enterprise users or users who verify your identity - Individual account. For more information about identity verification, see [Identity Verification](https://help.aliyun.com/knowledge_list/37170.html).'."\n"
+ .'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/facebody/2019-12-30/FaceBeauty?lang=JAVA&sdkStyle=dara&params={%22ImageURL%22:%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Ffacebody%2FFaceBeauty%2FFaceBeauty1.png%22,%22Sharp%22:0.3,%22Smooth%22:0.3,%22White%22:0.3}&tab=DEBUG) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development and integration steps:'."\n"
+ .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
+ .'- Find the SDK package for the Face and Body (facebody) category in the corresponding SDK documentation and install it.'."\n"
+ .'- Modify the sample code provided in the References as needed and invoke the API operation.'."\n"
+ ."\n"
+ .'6. Direct client calls: Common client call methods for this feature include the following:'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from mini programs](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Input limits'."\n"
+ ."\n"
+ .'- Image format: JPEG, JPG, PNG, or BMP.'."\n"
+ .'- Image size: up to 3 MB.'."\n"
+ .'- Image resolution: greater than 10 × 10 pixels and less than 2000 × 2000 pixels. The longest side must be less than 2000 pixels.'."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ .'- Image quality recommendation: suitable for portrait images with most skin types. The results may be less effective for images with severe blemishes, acne, or low exposure.'."\n"
+ ."\n"
+ .'> If the image resolution exceeds the maximum limit, resize the image first. For more information, see [Image resizing](~~44688~~).'."\n"
+ ."\n"
+ .'## Billable methods'."\n"
+ .'For information about the billable methods and pricing of face beautification, see [Billing overview](~~184049~~).'."\n"
+ ."\n"
+ .'> The debug operation below is a paid operation. To try it for free, go to the [Playground](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=FaceBeauty).',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'For the face beautification feature under the Alibaba Cloud Vision AI Face and Body category, we recommend that you use the SDK. Multiple programming languages are supported. When calling the SDK, select the SDK package for the Face and Body (facebody) category. The SDK supports both local files and URLs for file parameters. For more information, see [SDK overview](~~145033~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of face beautification, see [Common faults](~~146756~~).'."\n"
+ ."\n"
+ .'## Playground'."\n"
+ .'For more open source models to try and download, visit ModelScope: [106-point face keypoint detection - general domain - 2D](https://www.modelscope.cn/models/damo/cv_mobilenet_face-2d-keypoints_alignment/summary).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Ensure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debug interface are valid for 1 hour and are automatically deleted by the system after 24 hours.',
+ 'changeSet' => [],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:FaceBeauty',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"8473A5E5-488E-4612-800E-F95B42381570\\",\\n \\"Data\\": {\\n \\"ImageURL\\": \\"http://vibktprfx-prod-prod-aic-gd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/image-face-fusion/09dedc78-c355-442a-9312-7ab074d6de49_54dc_20210129-025407.jpg?Expires=1611890647&OSSAccessKeyId=LTAI****************&Signature=2mk2OgIrwMqrvA%2FvDdp0MNaoVU****\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<MergeImageFaceResponse>\\n <RequestId>8473A5E5-488E-4612-800E-F95B42381570</RequestId>\\n <Data>\\n <ImageURL>http://vibktprfx-prod-prod-aic-gd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/image-face-fusion/09dedc78-c355-442a-9312-7ab074d6de49_54dc_20210129-025407.jpg?Expires=1611890647&amp;OSSAccessKeyId=LTAI****************&amp;Signature=2mk2OgIrwMqrvA%2FvDdp0MNaoVU****</ImageURL>\\n </Data>\\n</MergeImageFaceResponse>","errorExample":""}]',
],
- 'BodyPosture' => [
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'GenRealPersonVerificationToken' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -3559,154 +4090,161 @@
'systemTags' => [],
'parameters' => [
[
- 'name' => 'ImageURL',
+ 'name' => 'CertificateName',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/BodyPosture/BodyPosture4.jpg',
- 'isFileTransferUrl' => true,
- ],
+ 'schema' => ['description' => 'The name on the ID card to be verified.', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => false, 'example' => '张三', 'title' => ''],
+ ],
+ [
+ 'name' => 'CertificateNumber',
+ 'in' => 'formData',
+ 'schema' => ['description' => 'The ID card number.', 'type' => 'string', 'required' => true, 'example' => '33010219001123123X', 'title' => ''],
+ ],
+ [
+ 'name' => 'MetaInfo',
+ 'in' => 'formData',
+ 'schema' => ['description' => 'The metainfo environment parameter, which must be obtained through the client SDK. For Android SDK, use getMetaInfos. For iOS SDK, use getMetaInfo.', 'type' => 'string', 'required' => true, 'example' => '{"dwe":"ew4e"...}', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
+ 'description' => 'The response struct.',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'B854094B-9231-4A54-89AB-C377CB0D237D',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => 'A31006F2-22E7-4538-93BB-DE6B563643EE', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned result data.',
'type' => 'object',
'properties' => [
- 'Outputs' => [
- 'description' => '',
- 'type' => 'array',
- 'items' => [
- 'type' => 'object',
- 'properties' => [
- 'HumanCount' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '1',
- ],
- 'Results' => [
- 'description' => '',
- 'type' => 'array',
- 'items' => [
- 'type' => 'object',
- 'properties' => [
- 'Bodies' => [
- 'description' => '',
- 'type' => 'array',
- 'items' => [
- 'type' => 'object',
- 'properties' => [
- 'Positions' => [
- 'description' => '',
- 'type' => 'array',
- 'items' => [
- 'type' => 'object',
- 'properties' => [
- 'Points' => [
- 'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '[0.46296295523643494, 0.1304347813129425]',
- ],
- ],
- ],
- ],
- ],
- 'Confident' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '0.91309475898742676',
- ],
- 'Label' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'nose',
- ],
- ],
- ],
- ],
- ],
- ],
- ],
- ],
- ],
- ],
- 'MetaObject' => [
- 'description' => '',
- 'type' => 'object',
- 'properties' => [
- 'Width' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '500',
- ],
- 'Height' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '500',
- ],
- ],
- ],
+ 'VerificationToken' => ['description' => 'The unique identifier for the trusted real-person verification.'."\n"
+ ."\n"
+ .'> - If you do not perform a real-person verification mobile query after the mobile request, no liveness or risk control results are generated, which poses a certain risk to the overall verification. After the mobile request is complete, perform a [real-person verification mobile query](~~198724~~) to complete the full verification process.'."\n"
+ .'- The verificationToken returned by the real-person verification mobile request operation is valid for 30 minutes from the time it is generated. If face verification is performed after the token expires, an error is returned. Complete the verification within the validity period.', 'type' => 'string', 'example' => '9fca3791c158a479ead9f2ba65ab3XXX', 'title' => ''],
],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'title' => '',
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable.'],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"A31006F2-22E7-4538-93BB-DE6B563643EE\\",\\n \\"Data\\": {\\n \\"VerificationToken\\": \\"9fca3791c158a479ead9f2ba65ab3XXX\\"\\n }\\n}","type":"json"}]',
+ 'title' => 'Generate real-person verification session token',
+ 'summary' => 'Initiates a real-person identity verification request.',
+ 'description' => '## Description'."\n"
+ .'The real-person identity verification mobile request capability allows you to request user image information for identity verification on mobile devices based on the name and ID card number of the person to be verified.'."\n"
+ ."\n"
+ .'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for online assistance.'."\n"
+ .'- To learn more about Alibaba Cloud Vision AI capabilities, including API integration, usage, or consultation, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Common scenarios'."\n"
+ .'- **Online account opening for financial institutions**: During mobile app registration and account opening in the financial industry, real-identity verification validates the true identity of users, reducing operational costs and improving risk control.'."\n"
+ .'- **Online government service registration**: During the pandemic, governments launched online mask reservation features in apps. Real-identity verification effectively prevents the same person from claiming masks multiple times in a day, ensuring fair distribution.'."\n"
+ .'- **Password or phone number changes**: When changing passwords or binding phone numbers in mobile apps, real-identity verification confirms the true identity of the user.'."\n"
+ .'- **Ride-hailing driver verification**: Confirms the identity of active ride-hailing drivers to prevent identity fraud when operating vehicles.'."\n"
+ .'- **Financial risk control**: Verifies user identity across various stages such as payment, loss reporting, account unfreezing, transfers, withdrawals, lending, and wealth management to ensure financial risk management.'."\n"
+ ."\n"
+ .'## Advantages'."\n"
+ ."\n"
+ .'- **Financial-grade metrics**: False acceptance rate lower than 1/100,000, with accuracy higher than 99%.'."\n"
+ .'- **Proven industry applications**: Serves over 200 million Internet finance users and secures over 2 billion transactions.'."\n"
+ .'- **Second-level liveness detection**: No complex interactive gestures required. Liveness detection completes within seconds for higher efficiency, greater privacy, and enhanced security.'."\n"
+ .'- **Financial-grade anti-attack testing**: Defends against various real-world spoofing attacks with authoritative data source verification.'."\n"
+ .'- **Low-cost deployment**: A pure software solution that supports standard cameras at minimal cost, suitable for both indoor and outdoor environments.'."\n"
+ .'- **Domestic and international certifications**: Certified by the Ministry of Public Security, ISO 27001 Information Security Management System, ISO 30107-3 Face Liveness Anti-Spoofing (iBeta PAD Level 1), and ISO/TC68.'."\n"
+ ."\n"
+ .'## Getting started'."\n"
+ .'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete registration.'."\n"
+ .'2. Make sure you have activated the [Face and Body service](https://vision.aliyun.com/facebody). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open).'."\n"
+ ."\n"
+ .'><notice>'."\n"
+ .'This capability is available to enterprise or individual verified users. For more information about how to verify your identity - Individual account, see [Identity Verification](https://help.aliyun.com/knowledge_list/37170.html).'."\n"
+ .'></notice>'."\n"
+ ."\n"
+ .'3. Create an AccessKey: Make sure you have [created an AccessKey](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/facebody/2019-12-30/GenRealPersonVerificationToken?lang=JAVA) to debug this capability online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development and integration steps:'."\n"
+ .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
+ .'- Find and install the SDK package for the Face and Body (facebody) AI category in the corresponding SDK documentation.'."\n"
+ .'- Modify the sample code provided in the References as needed and invoke the API operation.'."\n"
+ ."\n"
+ .'6. Direct client-side calls: Common client-side call methods for this capability include the following.'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from mini programs](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Billing'."\n"
+ .'For billing methods and pricing of real-person identity verification shift requests, see [Billing overview](~~184049~~).'."\n"
+ ."\n"
+ .'> The debug API operation below is a paid operation.',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'Alibaba Cloud Vision AI capabilities support SDK-based calls. For more information, see:'."\n"
+ .'- [Server-side integration tutorial](~~201625~~)'."\n"
+ .'- [iOS integration tutorial](~~201379~~)'."\n"
+ .'- [Android integration tutorial](~~201380~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'The following table describes the error codes for real-person identity verification mobile requests.'."\n"
+ .'| Status code | Error code | Description |'."\n"
+ .'| ------ | ---------------------------- | ------------------------------------------------------------ |'."\n"
+ .'| 200 | No error code | Face verification passed. |'."\n"
+ .'| 400 | INVALID_PARAMETER | Invalid parameters passed during the query. Contact the API provider\'s technical team for troubleshooting. For example, the ID card format is incorrect. (Z8105) |'."\n"
+ .'| 400 | NOT_SAME_PERSON | Face verification failed. The result indicates the person is not the ID card holder. Confirm the identity and try again. Sorry, we could not recognize you. (Z1146) |'."\n"
+ .'| 500 | PROCESSING | Face verification is not complete. Try again. If the issue persists, contact the API provider\'s technical team for troubleshooting. |'."\n"
+ .'| 500 | PROCESSING | The image security check failed. Confirm that the image is a normally captured photo. (Z1146) |'."\n"
+ .'| 500 | PROCESSING | A system error occurred. Try again later. If the error persists after multiple retries, record the RequestId and contact Alibaba Cloud technical support. (Z5137) |'."\n"
+ .'| 500 | INVALID_PARAM | A system error occurred. Try again later. If the error persists after multiple retries, record the RequestId and contact Alibaba Cloud technical support. (Z5136) |'."\n"
+ .'| 400 | UNABLE_GET_IMAGE | The comparison source is unavailable. No reference photo exists in the remote public security network for comparison. Record the RequestId and contact Alibaba Cloud technical support. (Z1104) |'."\n"
+ .'| 400 | HIGH_RISK | Face verification frequency is too high or too many failures occurred. Try again after 24 hours. (Z1114) |'."\n"
+ .'| 400 | EXTRACT_FACE_FAIL | No facial features can be extracted from the image. Confirm that the image contains face information. (Z1156) |'."\n"
+ .'| 400 | INITIALIZE_INVALID_CERT_NAME | The name is invalid. Enter a valid name. (Z8109) |'."\n"
+ .'| 400 | INITIALIZE_INVALID_CERT_AGE | Users under 14 years of age cannot use this service. Manual review is recommended. (Z8110) |'."\n"
+ .'| 400 | INITIALIZE_INVALID_CERT_NO | The ID card number is invalid. Enter a valid ID card number. (Z8111) |'."\n"
+ .'| 400 | QUERY_INVALID_CERTIFYID | The identity verification record does not exist. No identity verification submission record corresponds to this CertifyId. (Z8304) |'."\n"
+ .'| 400 | QUERY_IMG_IS_NONE | The photo cannot be found or is unavailable, possibly due to issues with the public security database. (Z8305) |'."\n"
+ .'| 400 | QUERY_CERTINFO_IS_NONE | The identity information cannot be found, possibly because the user has migrated their household registration, is military personnel, or has another special status. (Z8306) |'."\n"
+ .'| 400 | QUERY_CERTINFO_ISNOT_MATCH | The name and ID card number do not match. The user\'s information may be incorrect or fraudulent. Have the user confirm the information and try again. (Z8307) |'."\n"
+ .'| 400 | QUERY_OCR_ISNOT_MATCH | When using the OCR solution, the face does not match the face on the ID card. The person and ID card may not match, or the face photo quality may be low. Handle this based on your business requirements. If the person is the same, try again. (Z8308) |'."\n"
+ .'| 500 | SYSTEM_ERROR | A system error occurred during the query. Try again. If the error persists, record the RequestId and contact Alibaba Cloud technical support. (Z5139) |.'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Ensure that uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging console are valid for 1 hour and are automatically deleted by the system after 24 hours.'."\n"
+ .'- The platform does not store original face images or file information involved in the use of the service.',
+ 'changeSet' => [],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:GenRealPersonVerificationToken',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"B854094B-9231-4A54-89AB-C377CB0D237D\\",\\n \\"Data\\": {\\n \\"Outputs\\": [\\n {\\n \\"HumanCount\\": 1,\\n \\"Results\\": [\\n {\\n \\"Bodies\\": [\\n {\\n \\"Positions\\": [\\n {\\n \\"Points\\": [\\n 0\\n ]\\n }\\n ],\\n \\"Confident\\": 0.9130947589874268,\\n \\"Label\\": \\"nose\\"\\n }\\n ]\\n }\\n ]\\n }\\n ],\\n \\"MetaObject\\": {\\n \\"Width\\": 500,\\n \\"Height\\": 500\\n }\\n }\\n}","errorExample":""},{"type":"xml","example":"<BodyPostureResponse>\\n <RequestId>B854094B-9231-4A54-89AB-C377CB0D237D</RequestId>\\n <Data>\\n <MetaObject>\\n <Height>500</Height>\\n <Width>500</Width>\\n </MetaObject>\\n <Outputs>\\n <Results>\\n <Bodies>\\n <Confident>0.91309475898742676</Confident>\\n <Label>nose</Label>\\n <Positions>\\n <Points>0.46296295523643494</Points>\\n <Points>0.1304347813129425</Points>\\n </Positions>\\n </Bodies>\\n <Bodies>\\n <Confident>0.7284882664680481</Confident>\\n <Label>neck</Label>\\n <Positions>\\n <Points>0.47685185074806213</Points>\\n <Points>0.22282609343528748</Points>\\n </Positions>\\n </Bodies>\\n <Bodies>\\n <Confident>0.78919297456741333</Confident>\\n <Label>right_shoulder</Label>\\n <Positions>\\n <Points>0.3888888955116272</Points>\\n <Points>0.239130437374115</Points>\\n </Positions>\\n </Bodies>\\n </Results>\\n <HumanCount>1</HumanCount>\\n </Outputs>\\n </Data>\\n</BodyPostureResponse>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
],
- 'DetectBodyCount' => [
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'GenerateHumanAnimeStyle' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -3718,200 +4256,338 @@
'parameters' => [
[
'name' => 'ImageURL',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/DetectBodyCount/DetectBodyCount3.jpg',
- 'isFileTransferUrl' => true,
- ],
+ 'in' => 'query',
+ 'schema' => ['description' => 'The URL of the image. We recommend that you use an OSS URL in the Shanghai region. If the file is stored locally or in an OSS bucket outside the Shanghai region, see [File URL processing](~~155645~~).'."\n"
+ .'Image format requirements:'."\n"
+ ."\n"
+ .'- Image format: JPG, JPEG, or PNG.'."\n"
+ .'- Image size: No larger than 3 MB.'."\n"
+ .'- Image resolution: Greater than 32 × 32 pixels and smaller than 2000 × 2000 pixels. The longest side must be no greater than 1999 pixels, and the face area must be at least 60 × 60 pixels.'."\n"
+ .'- Clear frontal face photos with one or more persons are supported. The maximum number of faces is 5, and the face orientation must be within 45 degrees in any direction.'."\n"
+ .'- The URL must not contain Chinese characters.'."\n"
+ .'> Image content: If the image resolution exceeds the maximum limit, resize the image first. For more information, see [Image resizing](~~44688~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/GenerateHumanAnimeStyle/GenerateHumanAnimeStyle8.png', 'title' => ''],
+ ],
+ [
+ 'name' => 'AlgoType',
+ 'in' => 'query',
+ 'schema' => ['description' => 'The cartoon effect configuration parameter. Valid values:'."\n"
+ ."\n"
+ .'- anime: Japanese anime style'."\n"
+ .'- 3d: 3D effects'."\n"
+ .'- handdrawn: hand-drawn style'."\n"
+ .'- sketch: pencil sketch'."\n"
+ .'- artstyle: art effects'."\n"
+ .'- claborate: Chinese painting style'."\n"
+ .'- hongkong: Hong Kong comics style'."\n"
+ .'- comic: comic style'."\n"
+ .'- animation3d: 3D animation.', 'type' => 'string', 'default' => 'anime', 'required' => false, 'example' => 'anime', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
+ 'description' => '1',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '1C709078-8886-4C91-AEDE-4E04EED0A689',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '59697D68-2A6E-4553-89BD-0FADD07881E8', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned result data.',
'type' => 'object',
'properties' => [
- 'PersonNumber' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '6',
- ],
+ 'ImageURL' => ['description' => 'The URL of the cartoonized result image.'."\n"
+ .'> This URL is a temporary address that is valid for 30 minutes. After it expires, the URL becomes inaccessible. To save the file for a longer period or permanently, access the URL within 30 minutes and download the file to your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'https://dashscope-result-sh.oss-cn-shanghai.aliyuncs.com/viapi-video/person_image_cartoonizer/2023-10-25/55798d04-0957-4ab1-accc-0e4d2d01a039/20231025092636774205_styleanime_n2vedxruht.jpg?Expires=1698283596&OSSAccessKeyId=LTAI****************&Signature=ut2kn46Lz%2FRwqJ9jWJ0RBDut12****', 'title' => ''],
],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'title' => '',
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable.'],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"59697D68-2A6E-4553-89BD-0FADD07881E8\\",\\n \\"Data\\": {\\n \\"ImageURL\\": \\"https://dashscope-result-sh.oss-cn-shanghai.aliyuncs.com/viapi-video/person_image_cartoonizer/2023-10-25/55798d04-0957-4ab1-accc-0e4d2d01a039/20231025092636774205_styleanime_n2vedxruht.jpg?Expires=1698283596&OSSAccessKeyId=LTAI****************&Signature=ut2kn46Lz%2FRwqJ9jWJ0RBDut12****\\"\\n }\\n}","type":"json"}]',
+ 'title' => 'Human anime stylization',
+ 'summary' => 'This topic describes the syntax and provides examples of the GenerateHumanAnimeStyle operation for human anime stylization.',
+ 'description' => '## Feature description'."\n"
+ .'The human anime stylization feature converts a portrait image into a cartoon-style image and returns the stylized result.'."\n"
+ .'- Supported styles: Chinese painting (NEW), Hong Kong comics (NEW), comic style (NEW), 3D animation (NEW), Japanese anime, 3D, hand-drawn, pencil sketch, and art effects. A total of 9 styles are available.'."\n"
+ .'- Group photos: Group photos can be converted, with up to 5 faces processed in a single image.'."\n"
+ ."\n"
+ .'The following figure shows examples of this feature:'."\n"
+ .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20231121/ctcn/GenerateHumanAnimeStyle.png" width="600)'."\n"
+ ."\n"
+ .'- Comic style (NEW): The comic style simulates character images in a retro comic style and is suitable for various types of portrait photos.'."\n"
+ .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20231121/qtpu/GenerateHumanAnimeStylemanhua1.png" width="500)'."\n"
+ .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20231121/nump/GenerateHumanAnimeStylemanhua2.png" width="500)'."\n"
+ ."\n"
+ .'- 3D animation style (NEW): The 3D animation style simulates 3D animated character images and textures and is suitable for various types of portrait photos.'."\n"
+ .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20231121/xogr/GenerateHumanAnimeStyledonghua1.png" width="500)'."\n"
+ .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20231121/jjgc/GenerateHumanAnimeStyledonghua2.png" width="500)'."\n"
+ ."\n"
+ .'- Hong Kong comics style (NEW): The Hong Kong comics style is versatile and suitable for various types of photos.'."\n"
+ .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20231025/gxbu/GenerateHumanAnimeStylegangman1.png" width="500)'."\n"
+ .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20231025/bbbi/GenerateHumanAnimeStylegangman2.png" width="500)'."\n"
+ ."\n"
+ .'- Chinese painting style (NEW): The Chinese painting style is suitable for photos in traditional costumes, such as Hanfu and Tang-style clothing. Full-body and half-body photos with simple backgrounds are recommended.'."\n"
+ .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20231025/gsxw/GenerateHumanAnimeStyleguofeng1.png" width="500)'."\n"
+ .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20231025/wmut/GenerateHumanAnimeStyleguofeng2.png" width="500)'."\n"
+ ."\n"
+ .'- Hand-drawn style: The hand-drawn style is suitable for various types of portrait photos.'."\n"
+ .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20231025/smel/GenerateHumanAnimeStyleshouhui1.png" width="500)'."\n"
+ .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20231025/adxx/GenerateHumanAnimeStyleshouhui2.png" width="500)'."\n"
+ ."\n"
+ .'- Art effects: Art effects are suitable for photos with vivid colors, such as portraits with colorful or heavy makeup.'."\n"
+ .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20231025/dilz/GenerateHumanAnimeStyleyishu1.png" width="500)'."\n"
+ .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20231025/gloq/GenerateHumanAnimeStyleyishu2.png" width="500)'."\n"
+ ."\n"
+ .'- 3D effects: The 3D effects style is versatile and suitable for various types of portrait photos.'."\n"
+ .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20231025/wfbj/GenerateHumanAnimeStyle3d1.png" width="500)'."\n"
+ .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20231025/rnkc/GenerateHumanAnimeStyle3d2.png" width="500)'."\n"
+ ."\n"
+ .'- Japanese anime style: The Japanese anime style is versatile and suitable for various types of portrait photos, especially cosplay photos.'."\n"
+ .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20231025/toby/GenerateHumanAnimeStyleriman1.png" width="500)'."\n"
+ .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20231025/laxr/GenerateHumanAnimeStyleriman2.png" width="500)'."\n"
+ ."\n"
+ .'- Pencil sketch: The pencil sketch style is versatile and suitable for various types of portrait photos.'."\n"
+ .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20231025/yqdb/GenerateHumanAnimeStyleqianbi1.png" width="500)'."\n"
+ .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20231025/nakc/GenerateHumanAnimeStyleqianbi2.png" width="500)'."\n"
+ ."\n"
+ .'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for online assistance.'."\n"
+ .'- You can try this feature for free on the Visual Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=GenerateHumanAnimeStyle) to experience this feature and make online purchases.'."\n"
+ .'- For questions about API integration, usage, or consultation regarding Alibaba Cloud Visual Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Common scenarios'."\n"
+ .'- Privacy protection: To protect the privacy of individuals in images, convert portraits to cartoon style to prevent identification of the original person while maintaining social engagement without excessive trivialization.'."\n"
+ .'- Social entertainment: Convert your photos into cartoon characters to create a cute atmosphere and share them with friends along with text.'."\n"
+ .'- Special effects applications: Use this feature for personalized avatars and interactive events.'."\n"
+ ."\n"
+ .'## Benefits'."\n"
+ .'- Facial expression replication: Based on deep learning algorithms, the feature recognizes gender, facial expressions, and other characteristics and reproduces them on the cartoon avatar.'."\n"
+ .'- Full-body cartoonization: Compared with face-only cartoonization, this avoids awkward scenarios such as mismatched expressions.'."\n"
+ .'- Multi-person mode: Supports couple photos, family photos, and group photos.'."\n"
+ ."\n"
+ .'## Integration guide'."\n"
+ .'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Sign Up** in the upper-right corner, and follow the instructions to complete account registration.'."\n"
+ .'2. Activate the feature: Make sure you have activated the [Face and Body service](https://vision.aliyun.com/facebody). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open).'."\n"
+ .'> This feature is available to enterprise users or users who have completed verify your identity - Individual account. For more information about identity verification, see [Identity Verification](https://help.aliyun.com/knowledge_list/37170.html).'."\n"
+ .'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/facebody/2019-12-30/GenerateHumanAnimeStyle?&lang=JAVA&sdkStyle=dara&params=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Ffacebody%2FGenerateHumanAnimeStyle%2FGenerateHumanAnimeStyle1.png%22%2C%22AlgoType%22%3A%22anime%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development and integration steps:'."\n"
+ .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
+ .'- Find the SDK package for the Face and Body (facebody) AI category in the corresponding SDK documentation and install it.'."\n"
+ .'- Modify the sample code provided in the References as needed and invoke the operation.'."\n"
+ ."\n"
+ .'6. Sample code: For sample code in commonly used languages, see [Human anime stylization sample code](~~477407~~).'."\n"
+ ."\n"
+ .'7. Direct client calls: Common client-side calling methods for this feature include the following.'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from mini programs](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Input limits'."\n"
+ ."\n"
+ .'- Image format: JPG, JPEG, or PNG.'."\n"
+ .'- Image size: No larger than 3 MB.'."\n"
+ .'- Image resolution: Greater than 32 × 32 pixels and smaller than 2000 × 2000 pixels. The longest side must be no greater than 1999 pixels, and the face area must be at least 60 × 60 pixels.'."\n"
+ .'- Clear frontal face photos with one or more persons are supported. The maximum number of faces is 5, and the face orientation must be within 45 degrees in any direction.'."\n"
+ .'- The URL must not contain Chinese characters.'."\n"
+ ."\n"
+ .'> If the image resolution exceeds the maximum limit, resize the image first. For more information, see [Image resizing](~~44688~~).'."\n"
+ ."\n"
+ .'## Billing description'."\n"
+ .'For information about the billable methods and pricing of human anime stylization, see [Billing overview](~~184049~~).',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'For the human anime stylization feature under the Alibaba Cloud Visual AI Face and Body category, we recommend using the SDK. Multiple programming languages are supported. When making calls, select the SDK package for the Face and Body (facebody) AI category. File parameters support both local files and arbitrary URLs through the SDK. For more information, see [SDK overview](~~145033~~).'."\n"
+ .'## Sample code'."\n"
+ .'For sample code in commonly used languages, see [Human anime stylization sample code](~~477407~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of human anime stylization, see [Common error codes](~~146756~~).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.',
+ 'changeSet' => [],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:GenerateHumanAnimeStyle',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"1C709078-8886-4C91-AEDE-4E04EED0A689\\",\\n \\"Data\\": {\\n \\"PersonNumber\\": 6\\n }\\n}","errorExample":""},{"type":"xml","example":"<DetectBodyCountResponse>\\n <RequestId>1C709078-8886-4C91-AEDE-4E04EED0A689</RequestId>\\n <Data>\\n <PersonNumber>6</PersonNumber>\\n </Data>\\n</DetectBodyCountResponse>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
],
- 'DetectPedestrian' => [
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'GenerateHumanSketchStyle' => [
+ 'summary' => 'Adds portrait sketch stylization.',
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
- 'operationType' => 'read',
+ 'operationType' => 'readAndWrite',
'deprecated' => false,
'systemTags' => [],
'parameters' => [
[
'name' => 'ImageURL',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/DetectPedestrian/DetectPedestrian8.jpg',
- 'isFileTransferUrl' => true,
- ],
+ 'schema' => ['title' => '', 'description' => 'The URL of the image. We recommend that you use an Object Storage Service (OSS) link in the Shanghai region. If the file is stored locally or in an OSS bucket outside the Shanghai region, see [File URL processing](~~155645~~).'."\n"
+ .'Image requirements:'."\n"
+ ."\n"
+ .'- Image format: JPG, JPEG, or PNG.'."\n"
+ .'- Image size: Less than 10 MB.'."\n"
+ .'- Image resolution: Greater than 100 × 100 pixels and less than 2000 × 2000 pixels. The longest side must be less than or equal to 1999 pixels. The face must occupy at least 60 × 60 pixels.'."\n"
+ .'- Image quality: A clear frontal photo with a single face is supported. The face orientation must be within 45 degrees in any direction.'."\n"
+ .'- The URL must not contain Chinese characters.'."\n"
+ .'> Image content: If the image resolution exceeds the maximum limit, resize the image first. For more information, see [Image resizing](~~44688~~).', 'type' => 'string', 'required' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/GenerateHumanSketchStyle/GenerateHumanSketchStyle7.png', 'isFileTransferUrl' => true],
+ ],
+ [
+ 'name' => 'ReturnType',
+ 'in' => 'formData',
+ 'schema' => ['description' => 'The image return type. Valid values:'."\n"
+ ."\n"
+ .'- head: close-up headshot (default)'."\n"
+ .'- full: full-body photo'."\n"
+ ."\n"
+ .'We recommend using the close-up headshot for better results.', 'type' => 'string', 'required' => false, 'example' => 'head', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
- 'description' => '1',
+ 'title' => '',
+ 'description' => 'Schema of Response',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '45DBA494-6250-42C4-80D1-7CF19BDD2CB1',
- ],
+ 'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => 'E499788C-22DA-4F0E-B9C0-0E9D30A25716'],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned result data.',
'type' => 'object',
'properties' => [
- 'Elements' => [
- 'description' => '',
- 'type' => 'array',
- 'items' => [
- 'type' => 'object',
- 'properties' => [
- 'Type' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'person',
- ],
- 'Boxes' => [
- 'description' => '1',
- 'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '[326, 293, 500, 546 ]',
- ],
- ],
- 'Score' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '0.999',
- ],
- ],
- ],
- ],
- 'Width' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '899',
- ],
- 'Height' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '599',
- ],
+ 'ImageURL' => ['title' => '', 'description' => 'The URL of the returned image.'."\n"
+ .'> This URL is a temporary address that is valid for 30 minutes. After it expires, the URL is no longer accessible.', 'type' => 'string', 'example' => 'http://vibktprfx-prod-prod-aic-gd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/person-image-pencil/fd49dd0a-9e24-4bb5-b303-0745cdb453e0_7aa6_20210128-073045.jpg?Expires=1611820849&OSSAccessKeyId=LTAI****************&Signature=1oLYG%2FPe%2BNRIK7XcsUQYaKF%2B1C****'],
],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable.'],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E499788C-22DA-4F0E-B9C0-0E9D30A25716\\",\\n \\"Data\\": {\\n \\"ImageURL\\": \\"http://vibktprfx-prod-prod-aic-gd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/person-image-pencil/fd49dd0a-9e24-4bb5-b303-0745cdb453e0_7aa6_20210128-073045.jpg?Expires=1611820849&OSSAccessKeyId=LTAI****************&Signature=1oLYG%2FPe%2BNRIK7XcsUQYaKF%2B1C****\\"\\n }\\n}","type":"json"}]',
+ 'title' => 'Portrait sketch stylization',
+ 'description' => '## Feature description'."\n"
+ .'The portrait sketch stylization feature automatically identifies the head region in a portrait image and generates a sketch effect for a close-up headshot. The output resolution is fixed at 512 × 512 pixels.'."\n"
+ ."\n"
+ .'The following shows examples of this feature:'."\n"
+ .'- Input image'."\n"
+ .'![Input image](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20221108/qflk/GenerateHumanSketchStyle.png" width="300)'."\n"
+ .'- Output image'."\n"
+ .'![Output image](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20221108/nsbr/GenerateHumanSketchStylesumiao.png" width="300)'."\n"
+ ."\n"
+ .'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for online assistance.'."\n"
+ .'- You can try this feature for free on the Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=GenerateHumanSketchStyle) to experience this feature or purchase it online.'."\n"
+ .'- For questions about Alibaba Cloud Vision Intelligence Open Platform visual AI API integration or usage, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Common scenarios'."\n"
+ .'Social entertainment: Input a personal photo, and the portrait sketch stylization algorithm generates a unique sketch portrait. You can share it with friends or use it as a profile picture.'."\n"
+ ."\n"
+ .'## Advantages'."\n"
+ .'Precise rendering: Through deep learning algorithms, facial features are accurately reproduced, including fine details such as individual strands of hair.'."\n"
+ ."\n"
+ .'## Integration guide'."\n"
+ .'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete registration.'."\n"
+ .'2. Activate the feature: Make sure you have activated the [Face and Body service](https://vision.aliyun.com/facebody). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open).'."\n"
+ .'> This feature is available to enterprise users or users who have completed verify your identity - Individual account. For more information about real-name verification, see [Real-name verification](https://help.aliyun.com/knowledge_list/37170.html).'."\n"
+ .'3. Create an AccessKey: Make sure you have [created an AccessKey](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/facebody/2019-12-30/GenerateHumanSketchStyle?lang=JAVA&sdkStyle=dara&params=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Ffacebody%2FGenerateHumanSketchStyle%2FGenerateHumanSketchStyle1.png%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development integration steps:'."\n"
+ .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
+ .'- Find and install the SDK package for the Face and Body (facebody) AI category in the corresponding SDK documentation.'."\n"
+ .'- Modify the sample code provided in the References as needed and invoke the API operation.'."\n"
+ ."\n"
+ .'6. Direct client calls: Common client call methods for this feature include the following.'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from mini programs](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Input limits'."\n"
+ ."\n"
+ .'- Image format: JPG, JPEG, or PNG.'."\n"
+ .'- Image size: Less than 10 MB.'."\n"
+ .'- Image resolution: Greater than 100 × 100 pixels and less than 2000 × 2000 pixels. The longest side must be less than or equal to 1999 pixels. The face must occupy at least 60 × 60 pixels.'."\n"
+ .'- Image quality: A clear frontal photo with a single face is supported. The face orientation must be within 45 degrees in any direction.'."\n"
+ .'- The URL must not contain Chinese characters.'."\n"
+ ."\n"
+ .'> If the image resolution exceeds the maximum limit, resize the image first. For more information, see [Image resizing](~~44688~~).'."\n"
+ ."\n"
+ .'## Billing description'."\n"
+ .'For information about the billable methods and pricing of portrait sketch stylization, see [Billing overview](~~184049~~).',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'We recommend that you use an SDK to call the portrait sketch stylization feature under the Face and Body category of Alibaba Cloud Vision AI. Multiple programming languages are supported. When making calls, select the SDK package for the Face and Body (facebody) AI category. File parameters support local files and arbitrary URLs through SDK calls. For more information, see [SDK overview](~~145033~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of portrait sketch stylization, see [Common error codes](~~146756~~).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.',
+ 'changeSet' => [],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:GenerateHumanSketchStyle',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"45DBA494-6250-42C4-80D1-7CF19BDD2CB1\\",\\n \\"Data\\": {\\n \\"Elements\\": [\\n {\\n \\"Type\\": \\"person\\",\\n \\"Boxes\\": [\\n 0\\n ],\\n \\"Score\\": 0.999\\n }\\n ],\\n \\"Width\\": 899,\\n \\"Height\\": 599\\n }\\n}","errorExample":""},{"type":"xml","example":"<RequestId>45DBA494-6250-42C4-80D1-7CF19BDD2CB1</RequestId>\\n<Data>\\n <Height>599</Height>\\n <Elements>\\n <Score>0.999</Score>\\n <Type>person</Type>\\n <Boxes>326</Boxes>\\n <Boxes>293</Boxes>\\n <Boxes>500</Boxes>\\n <Boxes>546</Boxes>\\n </Elements>\\n <Elements>\\n <Score>0.998</Score>\\n <Type>person</Type>\\n <Boxes>181</Boxes>\\n <Boxes>156</Boxes>\\n <Boxes>425</Boxes>\\n <Boxes>534</Boxes>\\n </Elements>\\n <Elements>\\n <Score>0.993</Score>\\n <Type>person</Type>\\n <Boxes>515</Boxes>\\n <Boxes>300</Boxes>\\n <Boxes>705</Boxes>\\n <Boxes>549</Boxes>\\n </Elements>\\n <Elements>\\n <Score>0.986</Score>\\n <Type>person</Type>\\n <Boxes>661</Boxes>\\n <Boxes>129</Boxes>\\n <Boxes>797</Boxes>\\n <Boxes>506</Boxes>\\n </Elements>\\n <Elements>\\n <Score>0.959</Score>\\n <Type>person</Type>\\n <Boxes>511</Boxes>\\n <Boxes>271</Boxes>\\n <Boxes>572</Boxes>\\n <Boxes>451</Boxes>\\n </Elements>\\n <Width>899</Width>\\n</Data>","errorExample":""}]',
],
- 'PedestrianDetectAttribute' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'GetFaceEntity' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -3919,349 +4595,136 @@
],
'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [],
+ 'systemTags' => ['operationType' => 'get'],
'parameters' => [
[
- 'name' => 'ImageURL',
+ 'name' => 'DbName',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/PedestrianDetectAttribute/PedestrianDetectAttribute1.jpg',
- 'isFileTransferUrl' => true,
- ],
+ 'schema' => ['description' => 'The name of the database.', 'type' => 'string', 'required' => true, 'example' => 'default', 'title' => ''],
+ ],
+ [
+ 'name' => 'EntityId',
+ 'in' => 'formData',
+ 'schema' => ['description' => 'The entity ID. The value can contain digits, letters, and underscores.', 'type' => 'string', 'required' => true, 'example' => '66', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
- 'description' => '1',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '4F609A30-F645-481E-A513-CADAA14DFB0A',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => 'DA7CAFEB-0A37-4496-9CDF-E3DBB6309CB2', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned data.',
'type' => 'object',
'properties' => [
- 'Attributes' => [
- 'description' => '',
- 'type' => 'array',
- 'items' => [
- 'type' => 'object',
- 'properties' => [
- 'Gender' => [
- 'description' => '',
- 'type' => 'object',
- 'properties' => [
- 'Score' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '0.97989875078201294',
- ],
- 'Name' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'female',
- ],
- ],
- ],
- 'Orient' => [
- 'description' => '',
- 'type' => 'object',
- 'properties' => [
- 'Score' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '0.97838658094406128',
- ],
- 'Name' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'Front',
- ],
- ],
- ],
- 'Age' => [
- 'description' => '',
- 'type' => 'object',
- 'properties' => [
- 'Score' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '0.99590516090393066',
- ],
- 'Name' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'Age18-60',
- ],
- ],
- ],
- 'UpperWear' => [
- 'description' => '',
- 'type' => 'object',
- 'properties' => [
- 'Score' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '0.89291918277740479',
- ],
- 'Name' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'ShortSleeve',
- ],
- ],
- ],
- 'Glasses' => [
- 'description' => '',
- 'type' => 'object',
- 'properties' => [
- 'Score' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '0.87284471094608307',
- ],
- 'Name' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'No',
- ],
- ],
- ],
- 'LowerWear' => [
- 'description' => '',
- 'type' => 'object',
- 'properties' => [
- 'Score' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '0.6424860954284668',
- ],
- 'Name' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'Trousers',
- ],
- ],
- ],
- 'LowerColor' => [
- 'description' => '',
- 'type' => 'object',
- 'properties' => [
- 'Score' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '0.69961744546890259',
- ],
- 'Name' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '',
- ],
- ],
- ],
- 'Hat' => [
- 'description' => '',
- 'type' => 'object',
- 'properties' => [
- 'Score' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '0.98272394016385078',
- ],
- 'Name' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'No',
- ],
- ],
- ],
- 'Handbag' => [
- 'description' => '',
- 'type' => 'object',
- 'properties' => [
- 'Score' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '0.55011671781539917',
- ],
- 'Name' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'Yes',
- ],
- ],
- ],
- 'Backpack' => [
- 'description' => '',
- 'type' => 'object',
- 'properties' => [
- 'Score' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '0.96486538648605347',
- ],
- 'Name' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'No',
- ],
- ],
- ],
- 'UpperColor' => [
- 'description' => '',
- 'type' => 'object',
- 'properties' => [
- 'Score' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '0.97796273231506348',
- ],
- 'Name' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '',
- ],
- ],
- ],
- 'ShoulderBag' => [
- 'description' => '',
- 'type' => 'object',
- 'properties' => [
- 'Score' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '0.91198787838220596',
- ],
- 'Name' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'No',
- ],
- ],
- ],
- ],
- ],
- ],
- 'Boxes' => [
- 'description' => '',
+ 'DbName' => ['description' => 'The name of the database.', 'type' => 'string', 'example' => 'default', 'title' => ''],
+ 'EntityId' => ['description' => 'The entity ID.', 'type' => 'string', 'example' => '66', 'title' => ''],
+ 'Labels' => ['description' => 'The face labels returned by the query.', 'type' => 'string', 'example' => '工厂', 'title' => ''],
+ 'Faces' => [
+ 'description' => 'The face data returned by the query.',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
- 'BottomRightX' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '584',
- ],
- 'TopLeftY' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '27',
- ],
- 'Score' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '0.88381063938140869',
- ],
- 'TopLeftX' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '36',
- ],
- 'BottomRightY' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '218',
- ],
+ 'FaceId' => ['description' => 'The face data ID.', 'type' => 'string', 'example' => '3', 'title' => ''],
],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
- ],
- 'PersonNumber' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '1',
- ],
- 'Width' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '264',
- ],
- 'Height' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '584',
+ 'title' => '',
+ 'example' => '',
],
],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable.'],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"DA7CAFEB-0A37-4496-9CDF-E3DBB6309CB2\\",\\n \\"Data\\": {\\n \\"DbName\\": \\"default\\",\\n \\"EntityId\\": \\"66\\",\\n \\"Labels\\": \\"工厂\\",\\n \\"Faces\\": [\\n {\\n \\"FaceId\\": \\"3\\"\\n }\\n ]\\n }\\n}","type":"json"}]',
+ 'title' => 'Query face sample',
+ 'summary' => 'This topic describes the syntax and examples of the GetFaceEntity operation.',
+ 'description' => '## Description'."\n"
+ .'The GetFaceEntity operation queries face sample data from a face database.'."\n"
+ ."\n"
+ .'> - You can access [online consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for human assistance.'."\n"
+ .'- To get help with API integration, usage, or other issues related to Alibaba Cloud Vision AI Platform, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Getting started'."\n"
+ .'1. Create an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to create an account.'."\n"
+ .'2. Activate the service: Make sure you have activated the [Face and Body service](https://vision.aliyun.com/facebody). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open).'."\n"
+ ."\n"
+ .'><notice>'."\n"
+ .'This feature is available to users who have completed verify your identity - Enterprise account or verify your identity - Individual account. For more information about identity verification, see [Real-name verification](https://www.alibabacloud.com/help/en/account/user-guide/real-name-authentication/).'."\n"
+ .'></notice>'."\n"
+ ."\n"
+ .'3. Create an AccessKey: Make sure you have [created an AccessKey](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/facebody/2019-12-30/GetFaceEntity?lang=JAVA) to debug the operation online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development integration steps:'."\n"
+ .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
+ .'- Find and install the SDK package for the Face and Body (facebody) category in the corresponding SDK documentation.'."\n"
+ .'- Modify the sample code provided in the References as needed and invoke the operation.'."\n"
+ ."\n"
+ .'6. Direct client invocation: Common client invocation methods for this feature include the following.'."\n"
+ .'- [Direct invocation from web frontend](~~467779~~)'."\n"
+ .'- [Direct invocation from mini programs](~~467780~~)'."\n"
+ .'- [Direct invocation from Android](~~467781~~)'."\n"
+ .'- [Direct invocation from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Limits'."\n"
+ .'The default concurrency for submitting tasks through the GetFaceEntity operation is 2 QPS.'."\n"
+ ."\n"
+ .'## Billing'."\n"
+ .'The GetFaceEntity operation is free of charge.',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'We recommend that you use an SDK to call the GetFaceEntity operation under the Face and Body category of Alibaba Cloud Vision AI. The SDK supports multiple programming languages. When making the call, select the SDK package for the Face and Body (facebody) category. File parameters support local files and arbitrary URLs through SDK calls. For more information, see [SDK overview](~~145033~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of the GetFaceEntity operation, see [Common faults](~~146756~~).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging console are valid for 1 hour and are automatically deleted by the system after 24 hours.'."\n"
+ .'- The platform does not store original face images or file information involved in the use of the service.'."\n"
+ .'- The platform freezes face feature vector data for users who have not invoked any API operation for 6 months or more to ensure the information security of inactive users. To unfreeze the data, contact us through the DingTalk group (23109592).',
+ 'changeSet' => [],
+ 'ramActions' => [
+ [
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:GetFaceEntity',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"4F609A30-F645-481E-A513-CADAA14DFB0A\\",\\n \\"Data\\": {\\n \\"Attributes\\": [\\n {\\n \\"Gender\\": {\\n \\"Score\\": 0.9798987507820129,\\n \\"Name\\": \\"female\\"\\n },\\n \\"Orient\\": {\\n \\"Score\\": 0.9783865809440613,\\n \\"Name\\": \\"Front\\"\\n },\\n \\"Age\\": {\\n \\"Score\\": 0.9959051609039307,\\n \\"Name\\": \\"Age18-60\\"\\n },\\n \\"UpperWear\\": {\\n \\"Score\\": 0.8929191827774048,\\n \\"Name\\": \\"ShortSleeve\\"\\n },\\n \\"Glasses\\": {\\n \\"Score\\": 0.8728447109460831,\\n \\"Name\\": \\"No\\"\\n },\\n \\"LowerWear\\": {\\n \\"Score\\": 0.6424860954284668,\\n \\"Name\\": \\"Trousers\\"\\n },\\n \\"LowerColor\\": {\\n \\"Score\\": 0.6996174454689026,\\n \\"Name\\": \\"黑\\"\\n },\\n \\"Hat\\": {\\n \\"Score\\": 0.9827239401638508,\\n \\"Name\\": \\"No\\"\\n },\\n \\"Handbag\\": {\\n \\"Score\\": 0.5501167178153992,\\n \\"Name\\": \\"Yes\\"\\n },\\n \\"Backpack\\": {\\n \\"Score\\": 0.9648653864860535,\\n \\"Name\\": \\"No\\"\\n },\\n \\"UpperColor\\": {\\n \\"Score\\": 0.9779627323150635,\\n \\"Name\\": \\"黄\\"\\n },\\n \\"ShoulderBag\\": {\\n \\"Score\\": 0.911987878382206,\\n \\"Name\\": \\"No\\"\\n }\\n }\\n ],\\n \\"Boxes\\": [\\n {\\n \\"BottomRightX\\": 584,\\n \\"TopLeftY\\": 27,\\n \\"Score\\": 0.8838106393814087,\\n \\"TopLeftX\\": 36,\\n \\"BottomRightY\\": 218\\n }\\n ],\\n \\"PersonNumber\\": 1,\\n \\"Width\\": 264,\\n \\"Height\\": 584\\n }\\n}","errorExample":""},{"type":"xml","example":"<RequestId>4F609A30-F645-481E-A513-CADAA14DFB0A</RequestId>\\n<Data>\\n <PersonNumber>1</PersonNumber>\\n <Attributes>\\n <Backpack>\\n <Score>0.96486538648605347</Score>\\n <Name>No</Name>\\n </Backpack>\\n <LowerWear>\\n <Score>0.6424860954284668</Score>\\n <Name>Trousers</Name>\\n </LowerWear>\\n <Orient>\\n <Score>0.97838658094406128</Score>\\n <Name>Front</Name>\\n </Orient>\\n <ShoulderBag>\\n <Score>0.91198787838220596</Score>\\n <Name>No</Name>\\n </ShoulderBag>\\n <LowerColor>\\n <Score>0.69961744546890259</Score>\\n <Name>黑</Name>\\n </LowerColor>\\n <Glasses>\\n <Score>0.87284471094608307</Score>\\n <Name>No</Name>\\n </Glasses>\\n <UpperColor>\\n <Score>0.97796273231506348</Score>\\n <Name>黄</Name>\\n </UpperColor>\\n <Handbag>\\n <Score>0.55011671781539917</Score>\\n <Name>Yes</Name>\\n </Handbag>\\n <Hat>\\n <Score>0.98272394016385078</Score>\\n <Name>No</Name>\\n </Hat>\\n <Gender>\\n <Score>0.97989875078201294</Score>\\n <Name>female</Name>\\n </Gender>\\n <Age>\\n <Score>0.99590516090393066</Score>\\n <Name>Age18-60</Name>\\n </Age>\\n <UpperWear>\\n <Score>0.89291918277740479</Score>\\n <Name>ShortSleeve</Name>\\n </UpperWear>\\n </Attributes>\\n <Boxes>\\n <BottomRightX>584</BottomRightX>\\n <Score>0.88381063938140869</Score>\\n <BottomRightY>218</BottomRightY>\\n <TopLeftY>27</TopLeftY>\\n <TopLeftX>36</TopLeftX>\\n </Boxes>\\n</Data>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
],
'GetRealPersonVerificationResult' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -4269,189 +4732,293 @@
],
'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'get',
- ],
+ 'systemTags' => ['operationType' => 'get'],
'parameters' => [
[
'name' => 'VerificationToken',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'cwek23dw24geor89230hf2rw',
- 'isFileTransferUrl' => false,
- ],
+ 'schema' => ['description' => 'The unique identifier of the trusted real-person verification.'."\n"
+ ."\n"
+ .'> A VerificationToken that has already been verified cannot be queried again. Otherwise, an error is returned.', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => false, 'example' => 'cwek23dw24geor89230hf2rw', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
- 'description' => '',
+ 'description' => 'The response struct.',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '10FC953D-7C0C-4915-8949-34E3246E5B79',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '10FC953D-7C0C-4915-8949-34E3246E5B79', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned result data.',
'type' => 'object',
'properties' => [
- 'Passed' => [
- 'description' => '',
- 'type' => 'boolean',
- 'example' => 'true',
- ],
+ 'Passed' => ['description' => 'Indicates whether the verification is passed. Valid values:'."\n"
+ ."\n"
+ .'- true: Passed.'."\n"
+ .'- false: Not passed.', 'type' => 'boolean', 'example' => 'true', 'title' => ''],
],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'title' => '',
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable.'],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"10FC953D-7C0C-4915-8949-34E3246E5B79\\",\\n \\"Data\\": {\\n \\"Passed\\": true\\n }\\n}","type":"json"}]',
+ 'title' => 'Query real-person verification results',
+ 'summary' => 'This topic describes the syntax and examples of the GetRealPersonVerificationResult operation for querying real-person verification results on mobile devices.',
+ 'description' => '## Feature description'."\n"
+ .'The mobile real-person verification query capability returns user image information for identity verification after confirming that the identity document is valid and the name matches.'."\n"
+ ."\n"
+ .'> - You can go to [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for online assistance.'."\n"
+ .'- To access Alibaba Cloud Vision AI capabilities, use APIs, or consult on issues, join the Alibaba Cloud Vision Intelligence Platform consultation group on DingTalk (group ID: 23109592).'."\n"
+ ."\n"
+ .'## Getting started'."\n"
+ .'1. Create an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete account registration.'."\n"
+ .'2. Activate the service:'."\n"
+ .'- Make sure you have activated the [Face and Body service](https://vision.aliyun.com/facebody). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open).'."\n"
+ .'- Complete client-side data collection by following the [App verification integration tutorials](~~201625~~).'."\n"
+ ."\n"
+ .'><notice>'."\n"
+ .'This capability is available to enterprise or individual verified users. For more information about identity verification, see [verify your identity - Individual account](https://help.aliyun.com/knowledge_list/37170.html).'."\n"
+ .'></notice>'."\n"
+ ."\n"
+ .'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/facebody/2019-12-30/GetRealPersonVerificationResult?lang=JAVA) to debug this operation online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development integration steps:'."\n"
+ .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
+ .'- Find and install the SDK package for the Face and Body (facebody) AI category in the corresponding SDK documentation.'."\n"
+ .'- Modify the sample code provided in the references as needed and invoke the operation.'."\n"
+ ."\n"
+ .'6. Direct client-side calls: Common client-side call methods for this capability include the following:'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from mini programs](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Billing description'."\n"
+ .'For real-person verification via App, only the request initiation operation (GenRealPersonVerificationToken) is billed. The result query operation (GetRealPersonVerificationResult) is free of charge.',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'Alibaba Cloud Vision AI capabilities support SDK-based calls. For more information, see:'."\n"
+ .'- [Server-side integration tutorial](~~201625~~)'."\n"
+ .'- [iOS integration tutorial](~~201379~~)'."\n"
+ .'- [Android integration tutorial](~~201380~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'The following table describes the error codes for the mobile real-person verification query.'."\n"
+ .'| HTTP status code | Error code | Description |'."\n"
+ .'| ------ | ---------------------------- | ------------------------------------------------------------ |'."\n"
+ .'| 200 | No error code | Face verification passed. |'."\n"
+ .'| 400 | INVALID_PARAMETER | Invalid parameters passed during the query. Contact the API provider\'s technical team for troubleshooting. For example, the ID card format is incorrect. (Z8105) |'."\n"
+ .'| 400 | NOT_SAME_PERSON | Face verification failed. The result indicates a different person. Confirm whether the person is the account holder and try again. Sorry, we could not recognize you. (Z1146) |'."\n"
+ .'| 500 | PROCESSING | Face verification is not complete. Retry the operation. If the issue persists, contact the API provider\'s technical team for troubleshooting. |'."\n"
+ .'| 500 | PROCESSING | Image security check failed. Confirm whether the image was captured normally. (Z1146) |'."\n"
+ .'| 500 | PROCESSING | A system error occurred. Try again later. If the error persists after multiple retries, record the RequestId and contact Alibaba Cloud technical support. (Z5137) |'."\n"
+ .'| 500 | INVALID_PARAM | Sorry, a system error occurred. Try again later. If the error persists after multiple retries, record the RequestId and contact Alibaba Cloud technical support. (Z5136) |'."\n"
+ .'| 400 | UNABLE_GET_IMAGE | The comparison source is unavailable. No reference photo is available from the remote public security network for comparison. Record the RequestId and contact Alibaba Cloud technical support. (Z1104) |'."\n"
+ .'| 400 | HIGH_RISK | Face verification frequency is too high or too many failures occurred. Try again after 24 hours. (Z1114) |'."\n"
+ .'| 400 | EXTRACT_FACE_FAIL | No facial features could be extracted from the image. Confirm whether the image contains a face. (Z1156) |'."\n"
+ .'| 400 | INITIALIZE_INVALID_CERT_NAME | The name is invalid. Enter a valid name. (Z8109) |'."\n"
+ .'| 400 | INITIALIZE_INVALID_CERT_AGE | Users under 14 years of age cannot use this service. Manual review is recommended. (Z8110) |'."\n"
+ .'| 400 | INITIALIZE_INVALID_CERT_NO | The user\'s ID card number is invalid. Enter a valid ID card number. (Z8111) |'."\n"
+ .'| 400 | QUERY_INVALID_CERTIFYID | The identity verification record does not exist. No identity verification submission record corresponds to this CertifyId. (Z8304) |'."\n"
+ .'| 400 | QUERY_IMG_IS_NONE | The photo cannot be found or is unavailable, possibly due to issues with the public security database. (Z8305) |'."\n"
+ .'| 400 | QUERY_CERTINFO_IS_NONE | The identity information cannot be found, possibly because the user\'s household registration has been transferred or the user has a special status such as military personnel. (Z8306) |'."\n"
+ .'| 400 | QUERY_CERTINFO_ISNOT_MATCH | The name and ID card number do not match. The user\'s information may be incorrect or fraudulent. The user should verify the information and try again. (Z8307) |'."\n"
+ .'| 400 | QUERY_OCR_ISNOT_MATCH | When using the OCR solution, the face does not match the face on the ID card. This may be due to identity mismatch or low-quality facial photos. Handle this based on your business requirements. If the person is the same, try again. (Z8308) |'."\n"
+ .'| 500 | SYSTEM_ERROR | A system error occurred during the query. Retry the operation. If the error persists, record the RequestId and contact Alibaba Cloud technical support. (Z5139) |.'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Ensure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.'."\n"
+ .'- The platform does not store original facial images or file information involved in the use of the service.',
+ 'changeSet' => [],
+ 'ramActions' => [
+ [
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:GetRealPersonVerificationResult',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"10FC953D-7C0C-4915-8949-34E3246E5B79\\",\\n \\"Data\\": {\\n \\"Passed\\": true\\n }\\n}","errorExample":""},{"type":"xml","example":"<GetRealPersonVerificationResultResponse>\\n <RequestId>10FC953D-7C0C-4915-8949-34E3246E5B79</RequestId>\\n <Data>\\n <Passed>true</Passed>\\n </Data>\\n</GetRealPersonVerificationResultResponse>","errorExample":""}]',
],
- 'GenRealPersonVerificationToken' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'LiquifyFace' => [
+ 'summary' => 'This topic describes the syntax and provides examples of the intelligent face slimming feature (LiquifyFace).',
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
- 'operationType' => 'read',
'deprecated' => false,
'systemTags' => [],
'parameters' => [
[
- 'name' => 'CertificateName',
+ 'name' => 'ImageURL',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => '',
- 'isFileTransferUrl' => false,
- ],
+ 'schema' => ['description' => 'The URL of the image. We recommend that you use an OSS URL in the Shanghai region. If the file is stored locally or in an OSS bucket outside the Shanghai region, see [File URL processing](~~155645~~).'."\n"
+ .'Image requirements:'."\n"
+ ."\n"
+ .'- Image format: JPG, JPEG, or PNG.'."\n"
+ .'- Image size: No more than 6 MB.'."\n"
+ .'- Image resolution: At least 128 × 128 pixels and at most 5000 × 5000 pixels. The longest side must not exceed 5000 pixels.'."\n"
+ .'- Image content: The image must contain at least 1 face and no more than 3 faces. Each face must be larger than 64 × 64 pixels.'."\n"
+ .'- The URL must not contain Chinese characters.'."\n"
+ .'> Image content: If the image resolution exceeds the maximum limit, resize the image first. For more information, see [Resize images](~~44688~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/LiquifyFace/LiquifyFace1.png', 'title' => ''],
],
[
- 'name' => 'CertificateNumber',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => '33010219001123123X',
- ],
- ],
- [
- 'name' => 'MetaInfo',
+ 'name' => 'SlimDegree',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => '{"dwe":"ew4e"...}',
- ],
+ 'schema' => ['description' => 'The standard intensity. Valid values: \\[0, 2.0]. Default value: 1.0. A larger value produces a more noticeable face slimming effect.', 'type' => 'number', 'format' => 'float', 'maximum' => '2', 'minimum' => '0', 'default' => '1', 'required' => false, 'example' => '1.0', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
- 'description' => '',
+ 'title' => '',
+ 'description' => 'Schema of Response',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'A31006F2-22E7-4538-93BB-DE6B563643EE',
- ],
+ 'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => 'CA1C8937-B30C-15E6-B804-41C357BA413B'],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned data.',
'type' => 'object',
'properties' => [
- 'VerificationToken' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '9fca3791c158a479ead9f2ba65ab3XXX',
- ],
+ 'ImageURL' => ['description' => 'The URL of the face-slimmed image.'."\n"
+ .'> This URL is a temporary address that is valid for 30 minutes. After it expires, the URL becomes inaccessible. To save the file for a longer period or permanently, access the URL within 30 minutes, download the file, and store it in your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://vibktprfx-prod-prod-aic-gd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/face-liquify/CA1C8937-B30C-15E6-B804-41C357BA413B_5eca_20210923-093411.jpg?Expires=1632391451&OSSAccessKeyId=LTAI****************&Signature=46apJQVNBz%2FFzDLEYn2M1w9MKA****', 'title' => ''],
],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable.'],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"CA1C8937-B30C-15E6-B804-41C357BA413B\\",\\n \\"Data\\": {\\n \\"ImageURL\\": \\"http://vibktprfx-prod-prod-aic-gd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/face-liquify/CA1C8937-B30C-15E6-B804-41C357BA413B_5eca_20210923-093411.jpg?Expires=1632391451&OSSAccessKeyId=LTAI****************&Signature=46apJQVNBz%2FFzDLEYn2M1w9MKA****\\"\\n }\\n}","type":"json"}]',
+ 'title' => 'Intelligent face slimming',
+ 'description' => '## Feature description'."\n"
+ .'The intelligent face slimming feature takes a portrait image as input and outputs an image with adjusted facial features for a slimmer face.'."\n"
+ .'The following images show examples of this feature:'."\n"
+ .'- Input image'."\n"
+ .'![Original image](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20221108/smvg/LiquifyFace.png" width="250)'."\n"
+ ."\n"
+ .'- Output image'."\n"
+ .'![Face slimming result](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20221108/ssiz/LiquifyFaceshoulian.jpg" width="250)'."\n"
+ ."\n"
+ .'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) to get online assistance.'."\n"
+ .'- You can try this feature for free on the Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=LiquifyFace) to experience this feature or purchase it online.'."\n"
+ .'- To learn more about API integration, usage, or consultation for Alibaba Cloud Vision Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Common scenarios'."\n"
+ ."\n"
+ .'- Mobile apps: Input a selfie and use the intelligent face slimming algorithm to generate a more attractive facial appearance.'."\n"
+ .'- Portrait photography: Perform batch intelligent face slimming on a large number of images to support wedding photography studios or live image processing scenarios, reducing costs and improving efficiency.'."\n"
+ ."\n"
+ .'## Benefits'."\n"
+ ."\n"
+ .'- Precise contouring: Uses deep learning algorithms to accurately analyze facial features and achieve natural face reshaping effects.'."\n"
+ .'- Multi-angle support: Intelligently detects and processes faces from various angles, including frontal and side views.'."\n"
+ .'- Multi-face support: Supports precise face reshaping for single or multiple faces.'."\n"
+ ."\n"
+ .'## Integration guide'."\n"
+ .'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete account registration.'."\n"
+ .'2. Activate the feature: Make sure you have activated the [Face and Body service](https://vision.aliyun.com/facebody). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open).'."\n"
+ .'> This feature is available to enterprise users or users who verify your identity - Individual account. For more information about identity verification, see [Identity Verification](https://help.aliyun.com/knowledge_list/37170.html).'."\n"
+ .'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/facebody/2019-12-30/LiquifyFace?lang=JAVA&sdkStyle=dara&params=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Ffacebody%2FLiquifyFace%2FLiquifyFace1.png%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development integration steps:'."\n"
+ .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
+ .'- Find and install the SDK package for the Face and Body (facebody) category in the corresponding SDK documentation.'."\n"
+ .'- Modify the sample code provided in the References as needed and invoke the API operation.'."\n"
+ ."\n"
+ .'6. Sample code: For sample code in commonly used languages, see [LiquifyFace sample code](~~2253469~~).'."\n"
+ ."\n"
+ .'7. Direct client calls: Common client-side calling methods for this feature include the following.'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from mini programs](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Input limits'."\n"
+ .'- Image format: JPG, JPEG, or PNG.'."\n"
+ .'- Image size: No more than 6 MB.'."\n"
+ .'- Image resolution: At least 128 × 128 pixels and at most 5000 × 5000 pixels. The longest side must not exceed 5000 pixels.'."\n"
+ .'- Image content: The image must contain at least 1 face and no more than 3 faces. Each face must be larger than 64 × 64 pixels.'."\n"
+ .'- The URL must not contain Chinese characters.'."\n"
+ ."\n"
+ .'>If the image resolution exceeds the maximum limit, resize the image first. For more information, see [Resize images](~~44688~~).'."\n"
+ ."\n"
+ .'## Billing description'."\n"
+ .'For information about the billable methods and pricing of the intelligent face slimming feature, see [Billing overview](~~184049~~).',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'For the intelligent face slimming feature under the Face and Body category of Alibaba Cloud Vision AI, we recommend that you use the SDK. Multiple programming languages are supported. When making calls, select the SDK package for the Face and Body (facebody) category. The SDK supports both local files and arbitrary URLs as file parameters. For more information, see [SDK overview](~~145033~~).'."\n"
+ ."\n"
+ .'## Sample code'."\n"
+ .'For sample code in commonly used languages, see [LiquifyFace sample code](~~2253469~~).',
+ 'extraInfo' => '## Fault codes'."\n"
+ .'For fault codes of the intelligent face slimming feature, see [Common fault codes](~~146756~~).'."\n"
+ ."\n"
+ .'## Open source Playground'."\n"
+ .'For more open source free model experiences and downloads, visit ModelScope: [106-point face keypoint detection - general domain - 2D](https://www.modelscope.cn/models/damo/cv_mobilenet_face-2d-keypoints_alignment/summary).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.',
+ 'changeSet' => [],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:LiquifyFace',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"A31006F2-22E7-4538-93BB-DE6B563643EE\\",\\n \\"Data\\": {\\n \\"VerificationToken\\": \\"9fca3791c158a479ead9f2ba65ab3XXX\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<RequestId>A31006F2-22E7-4538-93BB-DE6B563643EE</RequestId>\\n<Data>\\n <VerificationToken>9fca3791c158a479ead9f2ba65ab3XXX</VerificationToken>\\n</Data>","errorExample":""}]',
],
- 'DetectCelebrity' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'ListFaceDbs' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -4459,114 +5026,132 @@
],
'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [],
+ 'systemTags' => ['operationType' => 'get'],
'parameters' => [
[
- 'name' => 'ImageURL',
+ 'name' => 'Offset',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'https://viapi-oss.oss-cn-shanghai.aliyuncs.com/doc/facebody/xxx.jpg',
- 'isFileTransferUrl' => true,
- ],
+ 'schema' => ['description' => 'The starting page number. Default value: 0. If you do not specify this parameter, data is returned starting from page 0.', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '1', 'title' => ''],
+ ],
+ [
+ 'name' => 'Limit',
+ 'in' => 'formData',
+ 'schema' => ['description' => 'The maximum number of samples to display per page. Valid values: 1 to 200. Default value: 200.', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '50', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
- 'description' => '1',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '4E92C0D4-BB0F-4F25-AD13-E87D02FAA205',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '2B93C43A-F824-40C8-AF79-844342B0F43A', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned data.',
'type' => 'object',
'properties' => [
- 'FaceRecognizeResults' => [
- 'description' => '',
+ 'DbList' => [
+ 'description' => 'The database list.',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
- 'FaceBoxes' => [
- 'description' => '1',
- 'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '[0.285,0.202,0.534,0.721]',
- ],
- ],
- 'Name' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '',
- ],
+ 'Name' => ['description' => 'The database name.', 'type' => 'string', 'example' => 'default', 'title' => ''],
],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
- ],
- 'Width' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '1000',
- ],
- 'Height' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '1000',
+ 'title' => '',
+ 'example' => '',
],
],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable.'],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"2B93C43A-F824-40C8-AF79-844342B0F43A\\",\\n \\"Data\\": {\\n \\"DbList\\": [\\n {\\n \\"Name\\": \\"default\\"\\n }\\n ]\\n }\\n}","type":"json"}]',
+ 'title' => 'List face databases',
+ 'summary' => 'This topic describes the syntax and examples of the ListFaceDbs operation.',
+ 'description' => '## Operation description'."\n"
+ .'This operation queries the list of face databases. A maximum of 200 records can be returned.'."\n"
+ ."\n"
+ .'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for online assistance.'."\n"
+ .'- To get help with API integration, usage, or consultation for Alibaba Cloud Vision Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Getting started'."\n"
+ .'1. Create an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to create an account.'."\n"
+ .'2. Activate the service: Make sure you have activated the [Face and Body service](https://vision.aliyun.com/facebody). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open).'."\n"
+ .'><notice>'."\n"
+ .'This feature is available to enterprise users or users who have completed verify your identity - Individual account. For more information about identity verification, see [Identity verification](https://help.aliyun.com/knowledge_list/37170.html).'."\n"
+ .'></notice>'."\n"
+ ."\n"
+ .'3. Create an AccessKey: Make sure you have [created an AccessKey](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/facebody/2019-12-30/ListFaceDbs?lang=JAVA) to debug this operation online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development integration steps:'."\n"
+ .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
+ .'- Find the SDK package for the Face and Body category (facebody) in the corresponding SDK documentation and install it.'."\n"
+ .'- Modify the sample code provided in the References as needed and invoke the operation.'."\n"
+ ."\n"
+ .'6. Direct client invocation: Common client invocation methods for this feature include the following:'."\n"
+ .'- [Direct invocation from web frontend](~~467779~~)'."\n"
+ .'- [Direct invocation from mini programs](~~467780~~)'."\n"
+ .'- [Direct invocation from Android](~~467781~~)'."\n"
+ .'- [Direct invocation from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Limits'."\n"
+ .'The default concurrency for submitting tasks through the ListFaceDbs operation is 2 QPS.'."\n"
+ ."\n"
+ .'## Billing description'."\n"
+ .'The ListFaceDbs operation is free of charge.',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'To call the ListFaceDbs operation for the Face and Body category of Alibaba Cloud Vision AI, use the SDK. Multiple programming languages are supported. Select the SDK package for the Face and Body category (facebody). File parameters support local files and arbitrary URLs when called through the SDK. For more information, see [SDK overview](~~145033~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of the ListFaceDbs operation, see [Common faults](~~146756~~).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Ensure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging console are valid for 1 hour and are automatically deleted by the system after 24 hours.'."\n"
+ .'- The platform does not store original face images or file information involved in the use of the service.'."\n"
+ .'- The platform freezes face feature vector data for users who have not made any API invocation for 6 months or more to ensure the information security of inactive users. To unfreeze the database data, contact us through the DingTalk group (23109592).',
+ 'changeSet' => [],
+ 'ramActions' => [
+ [
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:ListFaceDbs',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"4E92C0D4-BB0F-4F25-AD13-E87D02FAA205\\",\\n \\"Data\\": {\\n \\"FaceRecognizeResults\\": [\\n {\\n \\"FaceBoxes\\": [\\n 0\\n ],\\n \\"Name\\": \\"张三\\"\\n }\\n ],\\n \\"Width\\": 1000,\\n \\"Height\\": 1000\\n }\\n}","errorExample":""},{"type":"xml","example":"<DetectCelebrityResponse>\\n <RequestId>4E92C0D4-BB0F-4F25-AD13-E87D02FAA205</RequestId>\\n <Data>\\n <FaceRecognizeResults>\\n <FaceBoxes>0.285</FaceBoxes>\\n <FaceBoxes>0.202</FaceBoxes>\\n <FaceBoxes>0.534</FaceBoxes>\\n <FaceBoxes>0.721</FaceBoxes>\\n <Name>张三</Name>\\n </FaceRecognizeResults>\\n <Height>1000</Height>\\n <Width>1000</Width>\\n </Data>\\n</DetectCelebrityResponse>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
],
- 'DetectVideoLivingFace' => [
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'ListFaceEntities' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -4574,18 +5159,44 @@
],
'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [],
+ 'systemTags' => ['operationType' => 'get'],
'parameters' => [
[
- 'name' => 'VideoUrl',
+ 'name' => 'DbName',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/DetectVideoLivingFace/DetectVideoLivingFace1.mp4',
- 'isFileTransferUrl' => true,
- ],
+ 'schema' => ['description' => 'The name of the database.', 'type' => 'string', 'required' => true, 'example' => 'default', 'title' => ''],
+ ],
+ [
+ 'name' => 'Offset',
+ 'in' => 'formData',
+ 'schema' => ['description' => 'The starting record. Valid values: 0 to 2000.', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '1', 'title' => ''],
+ ],
+ [
+ 'name' => 'Limit',
+ 'in' => 'formData',
+ 'schema' => ['description' => 'The maximum number of samples to display per page. Valid values: 1 to 200.', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '50', 'title' => ''],
+ ],
+ [
+ 'name' => 'Token',
+ 'in' => 'formData',
+ 'schema' => ['description' => 'When the query result exceeds 2,000 records, use the Token returned from the previous request as a parameter to query the next page.', 'type' => 'string', 'required' => false, 'example' => '2', 'title' => ''],
+ ],
+ [
+ 'name' => 'Labels',
+ 'in' => 'formData',
+ 'schema' => ['description' => 'The custom labels. A maximum of 10 labels are supported. Separate multiple labels with commas (,).', 'type' => 'string', 'required' => false, 'example' => '视觉智能', 'title' => ''],
+ ],
+ [
+ 'name' => 'EntityIdPrefix',
+ 'in' => 'formData',
+ 'schema' => ['description' => 'The prefix of the sample ID. The prefix can contain digits, letters, and underscores.', 'type' => 'string', 'required' => false, 'example' => 'U1', 'title' => ''],
+ ],
+ [
+ 'name' => 'Order',
+ 'in' => 'formData',
+ 'schema' => ['description' => 'The sort order. Valid values:'."\n"
+ .'- asc: ascending order'."\n"
+ .'- desc: descending order.', 'type' => 'string', 'required' => false, 'example' => 'asc', 'title' => ''],
],
],
'responses' => [
@@ -4593,283 +5204,537 @@
'schema' => [
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '8E92F28B-F889-48CB-9FCC-3207CFA2215E',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => 'DA7CAFEB-0A37-4496-9CDF-E3DBB6309CB2', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned data.',
'type' => 'object',
'properties' => [
- 'Elements' => [
- 'description' => '',
+ 'Token' => ['description' => 'When the query result exceeds 2,000 records, you can use the Token to query the next page of data.', 'type' => 'string', 'example' => '2', 'title' => ''],
+ 'TotalCount' => ['description' => 'The total number of face samples.', 'type' => 'integer', 'format' => 'int32', 'example' => '200', 'title' => ''],
+ 'Entities' => [
+ 'description' => 'The queried entity data.',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
- 'Rect' => [
- 'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '[374, 6, 493,106 ]',
- ],
- ],
- 'LiveConfidence' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '0.72464925050735474',
- ],
- 'FaceConfidence' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '0.84644949436187744',
- ],
+ 'DbName' => ['description' => 'The name of the database where the face sample is stored.', 'type' => 'string', 'example' => 'default', 'title' => ''],
+ 'EntityId' => ['description' => 'The entity ID, such as an employee ID.', 'type' => 'string', 'example' => '222', 'title' => ''],
+ 'Labels' => ['description' => 'The labels of the queried face data.', 'type' => 'string', 'example' => '视觉智能', 'title' => ''],
+ 'CreatedAt' => ['description' => 'The time when the face sample was created.', 'type' => 'integer', 'format' => 'int64', 'example' => '1589203871832', 'title' => ''],
+ 'FaceCount' => ['description' => 'The number of faces contained in the face sample.', 'type' => 'integer', 'format' => 'int32', 'example' => '3', 'title' => ''],
+ 'UpdatedAt' => ['description' => 'The time when the face sample was last updated.', 'type' => 'integer', 'format' => 'int64', 'example' => '1589203871832', 'title' => ''],
],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable.'],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"DA7CAFEB-0A37-4496-9CDF-E3DBB6309CB2\\",\\n \\"Data\\": {\\n \\"Token\\": \\"2\\",\\n \\"TotalCount\\": 200,\\n \\"Entities\\": [\\n {\\n \\"DbName\\": \\"default\\",\\n \\"EntityId\\": \\"222\\",\\n \\"Labels\\": \\"视觉智能\\",\\n \\"CreatedAt\\": 1589203871832,\\n \\"FaceCount\\": 3,\\n \\"UpdatedAt\\": 1589203871832\\n }\\n ]\\n }\\n}","type":"json"}]',
+ 'title' => 'Query face sample list',
+ 'summary' => 'This topic describes the syntax and examples of the ListFaceEntities operation for querying a list of face samples.',
+ 'description' => '## Description'."\n"
+ .'The ListFaceEntities operation queries the list of face samples in a face database.'."\n"
+ ."\n"
+ .'> - You can join the Chinese-language DingTalk group (ID 23109592) to contact us for technical support regarding the China site (Chinese).'."\n"
+ .'- For Chinese-language help with Alibaba Cloud Vision AI API integration, usage, or consultation, contact us through the Chinese-language DingTalk group (23109592).'."\n"
+ ."\n"
+ .'## Getting started'."\n"
+ .'1. Create an Alibaba Cloud account: Open the [Alibaba Cloud official website](https://www.alibabacloud.com), click **China Site Account Registration** in the upper-right corner, and complete the account registration as prompted.'."\n"
+ .'2. Activate the service: Make sure you have activated [Face and Body Service](https://vision.aliyun.com/facebody). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open).'."\n"
+ .'><notice>'."\n"
+ .'This feature is available to enterprise users or users who have completed verify your identity - Individual account. For more information about identity verification, see [Real-name verification](https://help.aliyun.com/knowledge_list/37170.html).'."\n"
+ .'></notice>'."\n"
+ ."\n"
+ .'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using a RAM user AccessKey pair, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/facebody/2019-12-30/ListFaceEntities?lang=JAVA) to debug this operation online, view complete sample code, and obtain SDK dependency information. You can also download the complete project.'."\n"
+ .'5. Integration steps:'."\n"
+ .'- Select the SDK language you want to use from [SDK overview](~~145033~~).'."\n"
+ .'- Find and install the SDK package for the Face and Body (facebody) category in the corresponding SDK documentation.'."\n"
+ .'- Modify the sample code provided in the References as needed and invoke the operation.'."\n"
+ ."\n"
+ .'6. Direct client calls: Common client call methods for this feature include the following:'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from mini programs](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Limits'."\n"
+ .'The default concurrency for submitting tasks through the ListFaceEntities operation is 2 QPS.'."\n"
+ ."\n"
+ .'## Billing'."\n"
+ .'The ListFaceEntities operation is free of charge.',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'We recommend that you use an SDK to call the ListFaceEntities operation under the Face and Body category of Alibaba Cloud Vision AI. SDKs are available in multiple programming languages. When making the call, select the SDK package for the Face and Body (facebody) category. File parameters support local files and arbitrary URLs through SDK calls. For more information, see [SDK overview](~~145033~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of the ListFaceEntities operation, see [Common error codes](~~146756~~).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging console are valid for 1 hour and are automatically deleted by the system after 24 hours.'."\n"
+ .'- The platform does not store original face images or file information involved in the use of the service.'."\n"
+ .'- The platform freezes face feature vector data for users who have not invoked any API operation for 6 months or more to ensure the information security of inactive users. To unfreeze data, contact us through the DingTalk group (23109592).',
+ 'changeSet' => [],
+ 'ramActions' => [
+ [
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:ListFaceEntities',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"8E92F28B-F889-48CB-9FCC-3207CFA2215E\\",\\n \\"Data\\": {\\n \\"Elements\\": [\\n {\\n \\"Rect\\": [\\n 0\\n ],\\n \\"LiveConfidence\\": 0.7246492505073547,\\n \\"FaceConfidence\\": 0.8464494943618774\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<RequestId>8E92F28B-F889-48CB-9FCC-3207CFA2215E</RequestId>\\n<Data>\\n <Elements>\\n <FaceConfidence>0.84644949436187744</FaceConfidence>\\n <Rect>374</Rect>\\n <Rect>6</Rect>\\n <Rect>493</Rect>\\n <Rect>106</Rect>\\n <LiveConfidence>0.72464925050735474</LiveConfidence>\\n </Elements>\\n</Data>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
],
- 'GenerateHumanAnimeStyle' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'MergeImageFace' => [
+ 'summary' => 'Describes the syntax and provides examples of the MergeImageFace operation for image face fusion.',
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
- 'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [],
+ 'systemTags' => ['operationType' => 'none'],
'parameters' => [
[
+ 'name' => 'TemplateId',
+ 'in' => 'formData',
+ 'schema' => ['description' => 'The template ID of the face template.'."\n"
+ ."\n"
+ .'> Upload a template first. For more information, see [AddFaceImageTemplate](~~203512~~).', 'type' => 'string', 'required' => true, 'example' => '6cd509ea-54fa-4730-8e9d-c94cadcda048', 'title' => ''],
+ ],
+ [
'name' => 'ImageURL',
- 'in' => 'query',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/GenerateHumanAnimeStyle/GenerateHumanAnimeStyle8.png',
- 'isFileTransferUrl' => true,
- ],
+ 'in' => 'formData',
+ 'schema' => ['description' => 'The URL of the face image to be fused. This parameter is used only in single-face template scenarios. We recommend that you use an OSS URL in the China (Shanghai) region. For local files or OSS URLs in other regions, see [File URL processing](~~155645~~).'."\n"
+ .'Input limits:'."\n"
+ .'- Image format: JPG, JPEG, or PNG.'."\n"
+ .'- Image size: up to 20 MB.'."\n"
+ .'- Image resolution: at least 128 × 128 pixels and at most 2000 × 2000 pixels. The longest side must be at most 2000 pixels.'."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ ."\n"
+ .'> - If the image resolution exceeds the maximum limit, resize the image first. For more information, see [Image resizing](~~44688~~).'."\n"
+ .'- Specify either **ImageURL** or **MergeInfos**.', 'type' => 'string', 'required' => false, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/MergeImageFace/MergeImageFace-1.png', 'title' => ''],
],
[
- 'name' => 'AlgoType',
- 'in' => 'query',
+ 'name' => 'ModelVersion',
+ 'in' => 'formData',
+ 'schema' => ['description' => 'The model version. Two model versions are available: v1 (with face shape adaptation) and v2 (without face shape adaptation), which produce different results. Default value: v1 (face shape adaptation version).', 'type' => 'string', 'required' => false, 'example' => 'v1', 'title' => ''],
+ ],
+ [
+ 'name' => 'AddWatermark',
+ 'in' => 'formData',
+ 'schema' => ['description' => 'Specifies whether to add a watermark. Valid values:'."\n"
+ ."\n"
+ .'- False (default): Do not add a watermark.'."\n"
+ .'- True: Add a watermark.', 'type' => 'boolean', 'default' => 'false', 'required' => false, 'example' => 'False', 'title' => ''],
+ ],
+ [
+ 'name' => 'WatermarkType',
+ 'in' => 'formData',
+ 'schema' => ['description' => 'The watermark type. Valid values:'."\n"
+ ."\n"
+ .'- EN (default): English watermark.'."\n"
+ .'- CN: Chinese watermark.', 'type' => 'string', 'default' => 'EN', 'required' => false, 'example' => 'EN', 'title' => ''],
+ ],
+ [
+ 'name' => 'MergeInfos',
+ 'in' => 'formData',
+ 'style' => 'repeatList',
'schema' => [
- 'description' => '',
- 'type' => 'string',
+ 'type' => 'array',
+ 'items' => [
+ 'description' => 'The face fusion information. This parameter is used only in multi-face template scenarios to specify each face in the image and the URL of the image for face replacement.'."\n"
+ ."\n"
+ .'> Specify either **ImageURL** or **MergeInfos**.',
+ 'type' => 'object',
+ 'properties' => [
+ 'TemplateFaceID' => ['description' => 'The sub-ID of a specific face in the multi-face template.', 'type' => 'string', 'required' => false, 'example' => '6cd509ea-54fa-4730-8e9d-c94cadcda048_0', 'title' => ''],
+ 'ImageURL' => ['description' => 'The URL of the image to replace the face.', 'type' => 'string', 'required' => false, 'example' => 'http://invi-label.oss-cn-shanghai.aliyuncs.com/label/temp/faceswap/ref/ref.jpg', 'title' => ''],
+ ],
+ 'required' => false,
+ 'title' => '',
+ 'example' => '',
+ ],
'required' => false,
- 'example' => 'anime',
- 'default' => 'anime',
+ 'maxItems' => 1000,
+ 'minItems' => 0,
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
],
],
'responses' => [
200 => [
'schema' => [
- 'description' => '1',
+ 'title' => '',
+ 'description' => 'Schema of Response',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '59697D68-2A6E-4553-89BD-0FADD07881E8',
- ],
+ 'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '8473A5E5-488E-4612-800E-F95B42381570'],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned data.',
'type' => 'object',
'properties' => [
- 'ImageURL' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'http://vibktprfx-prod-prod-aic-gd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/person-image-cartoonizer/59697D68-2A6E-4553-89BD-0FADD07881E8_7ee5_20201027-070958.jpg?Expires=1603784400&OSSAccessKeyId=LTAI4FoLmvQ9urWXgSR****&Signature=ut2kn46Lz%2FRwqJ9jWJ0RBDut12****',
- ],
+ 'ImageURL' => ['description' => 'The URL of the fused image.'."\n"
+ .'> This URL is a temporary address that is valid for 30 minutes. After it expires, the URL becomes inaccessible. To save the file for a longer period or permanently, access the URL within 30 minutes and download the file to your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://vibktprfx-prod-prod-aic-gd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/image-face-fusion/09dedc78-c355-442a-9312-7ab074d6de49_54dc_20210129-025407.jpg?Expires=1611890647&OSSAccessKeyId=LTAI****************&Signature=2mk2OgIrwMqrvA%2FvDdp0MNaoVU****', 'title' => ''],
],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable.'],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"8473A5E5-488E-4612-800E-F95B42381570\\",\\n \\"Data\\": {\\n \\"ImageURL\\": \\"http://vibktprfx-prod-prod-aic-gd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/image-face-fusion/09dedc78-c355-442a-9312-7ab074d6de49_54dc_20210129-025407.jpg?Expires=1611890647&OSSAccessKeyId=LTAI****************&Signature=2mk2OgIrwMqrvA%2FvDdp0MNaoVU****\\"\\n }\\n}","type":"json"}]',
+ 'title' => 'Merge image face',
+ 'description' => '## Feature description'."\n"
+ .'The image face fusion feature merges a face from a user-provided image into the face position in a template image, generating a new image that contains the facial features of the user-provided image. Note that this feature strictly requires users to obtain authorization for both the user image and the template image in advance. Do not use this feature for illegal purposes or scenarios that violate ethical standards.'."\n"
+ .'The following figure shows an example of this operation:'."\n"
+ .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20221108/mzue/MergeImageFace.png" width="400)'."\n"
+ ."\n"
+ .'> - You can go to [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for online assistance.'."\n"
+ .'- You can try this feature for free on the Visual Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=MergeImageFace) to experience this feature or purchase it online.'."\n"
+ .'- For questions about API integration, usage, or consultation regarding the Alibaba Cloud Visual Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Common scenarios'."\n"
+ .'- Entertainment applications: Users merge their own faces with faces in images for which authorization has been legally obtained.'."\n"
+ .'- Film and television production: Suitable for film and television production companies to improve production efficiency and reduce costs through face fusion during post-production.'."\n"
+ .'- Photography studio customer acquisition: Suitable for photography studios or personal photography workshops to merge customer faces into sample photos, achieving virtual makeup, outfit, and photo preview effects.'."\n"
+ ."\n"
+ .'## Advantages '."\n"
+ .'- High fidelity with natural results: The fused face retains the visual identity features of the replacement face while blending seamlessly into the target face.'."\n"
+ .'- Expression and skin tone consistency: The fused face preserves the facial expression and skin tone consistency of the target face to the greatest extent.'."\n"
+ .'- Complex face angles supported: Template faces tilted at certain angles are supported, producing stable and realistic fusion results.'."\n"
+ .'- Face shape adaptation: Adaptive matching of the user\'s face shape is supported, improving the recognizability of fusion results.'."\n"
+ .'- Multiple faces and specified faces supported: Multiple faces in the template image are supported, and each face can be individually fused with a target face.'."\n"
+ ."\n"
+ .'## Integration guide'."\n"
+ ."\n"
+ .'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Sign Up** in the upper-right corner, and follow the instructions to complete account registration.'."\n"
+ .'2. Activate the service: Make sure you have activated the [Face and Body service](https://vision.aliyun.com/facebody). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open).'."\n"
+ ."\n"
+ .'><notice>Users who activated this feature on or after July 17, 2024 can directly invoke the operation without the need to commit an application.'."\n"
+ .'Users who activated this service before July 17, 2024 and need to invoke the operation can join the DingTalk group (23109592) to contact us and be added to the whitelist.'."\n"
+ .'></notice>'."\n"
+ ."\n"
+ .'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/facebody/2019-12-30/MergeImageFace?lang=JAVA&sdkStyle=old&params=%7B%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Before you begin: Create a TemplateId by invoking the [AddFaceImageTemplate](~~203512~~) (increase face image template) operation.'."\n"
+ .'6. Development and integration steps:'."\n"
+ .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
+ .'- Find and install the SDK package for the Face and Body (facebody) AI category in the corresponding SDK documentation.'."\n"
+ .'- Modify the sample code provided in the References as needed and invoke the operation.'."\n"
+ ."\n"
+ .'7. Sample code: For sample code in commonly used languages, see [Image face fusion sample code](~~467963~~).'."\n"
+ ."\n"
+ .'8. Direct client calls: Common client invocation methods for this platform include the following:'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from mini programs](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Input limits'."\n"
+ .'- Image format: JPG, JPEG, or PNG.'."\n"
+ .'- Image size: up to 20 MB.'."\n"
+ .'- Image resolution: at least 128 × 128 pixels and at most 2000 × 2000 pixels. The longest side must be at most 2000 pixels.'."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ ."\n"
+ .'> If the image resolution exceeds the maximum limit, resize the image first. For more information, see [Image resizing](~~44688~~).'."\n"
+ ."\n"
+ .'## Image quality recommendations'."\n"
+ ."\n"
+ .'- Ensure that faces in the image are clear. The face size should be at least 64 × 64 pixels, and the face area should not exceed 2/3 of the total image area.'."\n"
+ .'- Ensure that the facial features are complete and not significantly occluded. The face fusion algorithm supports faces tilted at certain angles and achieves better results when the tilt angle does not exceed 30 degrees.'."\n"
+ .'- For images with multiple faces, the number of faces should not exceed 5.'."\n"
+ ."\n"
+ .'Recommended image examples:'."\n"
+ .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20221114/jris/MergeImageFacetuijian.png" width="300)'."\n"
+ .'Not recommended image examples:'."\n"
+ .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20221114/rkbx/MergeImageFacebutuijian.png" width="300).'."\n"
+ ."\n"
+ .'## Billing description'."\n"
+ .'For the billable methods and pricing of image face fusion, see [Billing overview](~~184049~~).'."\n"
+ .'> The debugging operation below is a paid operation. For a free trial, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=MergeImageFace).',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'For the image face fusion feature under the Alibaba Cloud Visual AI Face and Body category, we recommend using the SDK. Multiple programming languages are supported. When calling the operation, select the SDK package for the Face and Body (facebody) AI category. File parameters support local files and arbitrary URLs through the SDK. For more information, see [SDK overview](~~145033~~).'."\n"
+ ."\n"
+ .'## Sample code'."\n"
+ .'For sample code in commonly used languages, see [Image face fusion sample code](~~467963~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of image face fusion, see [Common error codes](~~146756~~).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Ensure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.',
+ 'changeSet' => [],
+ 'ramActions' => [
+ [
+ 'operationType' => 'none',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:MergeImageFace',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"59697D68-2A6E-4553-89BD-0FADD07881E8\\",\\n \\"Data\\": {\\n \\"ImageURL\\": \\"https://dashscope-result-sh.oss-cn-shanghai.aliyuncs.com/viapi-video/person_image_cartoonizer/2023-10-25/55798d04-0957-4ab1-accc-0e4d2d01a039/20231025092636774205_styleanime_n2vedxruht.jpg?Expires=1698283596&OSSAccessKeyId=LTAI****************&Signature=ut2kn46Lz%2FRwqJ9jWJ0RBDut12****\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<GenerateHumanAnimeStyleResponse>\\n <RequestId>59697D68-2A6E-4553-89BD-0FADD07881E8</RequestId>\\n <Data>\\n <ImageURL>https://dashscope-result-sh.oss-cn-shanghai.aliyuncs.com/viapi-video/person_image_cartoonizer/2023-10-25/55798d04-0957-4ab1-accc-0e4d2d01a039/20231025092636774205_styleanime_n2vedxruht.jpg?Expires=1698283596&amp;OSSAccessKeyId=LTAI****************&amp;Signature=ut2kn46Lz%2FRwqJ9jWJ0RBDut12****</ImageURL>\\n </Data>\\n</GenerateHumanAnimeStyleResponse>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
],
- 'GenerateHumanSketchStyle' => [
- 'summary' => '人像素描风格化',
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'MonitorExamination' => [
+ 'summary' => 'This topic describes the syntax and provides examples of the MonitorExamination operation for online exam proctoring.',
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
- 'operationType' => 'readAndWrite',
'deprecated' => false,
'systemTags' => [],
'parameters' => [
[
- 'name' => 'ImageURL',
+ 'name' => 'Type',
'in' => 'formData',
- 'schema' => [
- 'title' => 'A short description of struct',
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/GenerateHumanSketchStyle/GenerateHumanSketchStyle7.png',
- 'isFileTransferUrl' => true,
- ],
+ 'schema' => ['title' => '', 'description' => 'The detection type.'."\n"
+ ."\n"
+ .'- 0: screen chat tool detection'."\n"
+ .'- 1: examinee status detection.', 'type' => 'integer', 'format' => 'int64', 'required' => true, 'maximum' => '1', 'minimum' => '0', 'example' => '1'],
],
[
- 'name' => 'ReturnType',
+ 'name' => 'ImageURL',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => false,
- 'example' => 'head',
- ],
+ 'schema' => ['description' => 'The URL of the image. We recommend that you use an China (Shanghai) region Object Storage Service (OSS) URL. If the file is stored locally or the OSS URL is not in the China (Shanghai) region, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/MonitorExamination/1MonitorExamination1.jpg', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
- 'title' => 'Schema of Response',
+ 'title' => '',
'description' => 'Schema of Response',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'title' => 'Id of the request',
- 'description' => '',
- 'type' => 'string',
- 'example' => 'E499788C-22DA-4F0E-B9C0-0E9D30A25716',
- ],
+ 'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => 'D0F6EB94-73B6-4CB8-B266-22D2F221C475'],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned result data.',
'type' => 'object',
'properties' => [
- 'ImageURL' => [
- 'title' => '出参图片地址',
- 'description' => '',
- 'type' => 'string',
- 'example' => 'http://vibktprfx-prod-prod-aic-gd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/person-image-pencil/fd49dd0a-9e24-4bb5-b303-0745cdb453e0_7aa6_20210128-073045.jpg?Expires=1611820849&OSSAccessKeyId=LTAI4FoLmvQ9urWXgSRp****&Signature=1oLYG%2FPe%2BNRIK7XcsUQYaKF%2B1C****',
+ 'FaceInfo' => [
+ 'description' => 'The face information of the central person. This parameter is returned when the Type request parameter is set to 1.',
+ 'type' => 'object',
+ 'properties' => [
+ 'Completeness' => ['description' => 'The face completeness score. Value range: (0, 1).', 'type' => 'number', 'format' => 'float', 'example' => '1', 'title' => ''],
+ 'FaceNumber' => ['description' => 'The number of detected faces. A value of 0 indicates that no examinee face is detected.', 'type' => 'integer', 'format' => 'int64', 'example' => '1', 'title' => ''],
+ 'Pose' => [
+ 'description' => 'The face pose angles. All three angles are 0 when the face is directly facing the camera. Value range: -90 to 90 degrees.',
+ 'type' => 'object',
+ 'properties' => [
+ 'Pitch' => ['description' => 'The pitch angle. A positive value indicates looking up, and a negative value indicates looking down.', 'type' => 'number', 'format' => 'float', 'example' => '-0.9185499548912048', 'title' => ''],
+ 'Roll' => ['description' => 'The roll angle. A positive value indicates clockwise rotation of the face in the image, and a negative value indicates counterclockwise rotation.', 'type' => 'number', 'format' => 'float', 'example' => '-0.18541647493839264', 'title' => ''],
+ 'Yaw' => ['description' => 'The yaw angle. A positive value indicates looking left, and a negative value indicates looking right.', 'type' => 'number', 'format' => 'float', 'example' => '8.095342636108398', 'title' => ''],
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'PersonInfo' => [
+ 'description' => 'The attribute and behavior information of the central person. This parameter is returned when the Type request parameter is set to 1.',
+ 'type' => 'object',
+ 'properties' => [
+ 'CellPhone' => [
+ 'description' => 'The phone call detection result.',
+ 'type' => 'object',
+ 'properties' => [
+ 'Score' => ['description' => 'The probability score of making a phone call. Value range: (0, 1).', 'type' => 'number', 'format' => 'float', 'example' => '0.39076218008995056', 'title' => ''],
+ 'Threshold' => ['description' => 'The recommended threshold.'."\n"
+ ."\n"
+ .'> This value is for reference only. Select an appropriate Score threshold based on your testing results.', 'type' => 'number', 'format' => 'float', 'example' => '0.6', 'title' => ''],
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'EarPhone' => [
+ 'description' => 'The earphone detection result.',
+ 'type' => 'object',
+ 'properties' => [
+ 'Score' => ['description' => 'The probability score of wearing earphones. Value range: (0, 1).', 'type' => 'number', 'format' => 'float', 'example' => '0.7980290651321411', 'title' => ''],
+ 'Threshold' => ['description' => 'The recommended threshold.'."\n"
+ ."\n"
+ .'> This value is for reference only. Select an appropriate Score threshold based on your testing results.', 'type' => 'number', 'format' => 'float', 'example' => '0.6', 'title' => ''],
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'PersonNumber' => ['description' => 'The total number of detected persons. A value of 0 indicates that no examinee is detected.', 'type' => 'integer', 'format' => 'int64', 'example' => '1', 'title' => ''],
+ ],
+ 'title' => '',
+ 'example' => '',
],
+ 'ChatScore' => ['description' => 'The probability that the screenshot contains a chat tool. Value range: (0, 1).'."\n"
+ .'This parameter is returned when the Type request parameter is set to 0.', 'type' => 'number', 'format' => 'float', 'example' => '0.28805577754974365', 'title' => ''],
+ 'Threshold' => ['description' => 'The recommended threshold. Value range: (0, 1). If ChatScore is greater than the threshold, the system determines that the input screenshot contains a chat tool.'."\n"
+ .'This parameter is returned when the Type request parameter is set to 0.', 'type' => 'number', 'format' => 'float', 'example' => '0.5', 'title' => ''],
],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable.'],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"D0F6EB94-73B6-4CB8-B266-22D2F221C475\\",\\n \\"Data\\": {\\n \\"FaceInfo\\": {\\n \\"Completeness\\": 1,\\n \\"FaceNumber\\": 1,\\n \\"Pose\\": {\\n \\"Pitch\\": -0.9185499548912048,\\n \\"Roll\\": -0.18541647493839264,\\n \\"Yaw\\": 8.095342636108398\\n }\\n },\\n \\"PersonInfo\\": {\\n \\"CellPhone\\": {\\n \\"Score\\": 0.39076218008995056,\\n \\"Threshold\\": 0.6\\n },\\n \\"EarPhone\\": {\\n \\"Score\\": 0.7980290651321411,\\n \\"Threshold\\": 0.6\\n },\\n \\"PersonNumber\\": 1\\n },\\n \\"ChatScore\\": 0.28805577754974365,\\n \\"Threshold\\": 0.5\\n }\\n}","type":"json"}]',
+ 'title' => 'Online exam proctoring',
+ 'description' => '## Feature description'."\n"
+ .'The online exam proctoring feature identifies examinee behaviors during online exams. It supports screen chat tool detection and examinee status detection.'."\n"
+ ."\n"
+ .'- Screen chat tool detection: Takes a screenshot image as input and determines whether common chat tools are present.'."\n"
+ .'- Examinee status detection: Uses images captured by the examinee\'s front-facing camera to determine the number of faces and bodies detected, face angle orientation, whether earphones are worn, and whether a mobile phone is being used.'."\n"
+ ."\n"
+ .'> - You can access [online consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for human assistance.'."\n"
+ .'- You can try this feature for free on the Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=MonitorExamination) for a hands-on experience and online purchase.'."\n"
+ .'- For questions about API integration or usage of Alibaba Cloud Vision Intelligence Open Platform visual AI capabilities, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Common scenarios'."\n"
+ .'- Remote online exams for individuals.'."\n"
+ .'- On-site fixed-camera exams for individuals.'."\n"
+ ."\n"
+ .'## Benefits'."\n"
+ ."\n"
+ .'- High feature integration. A single API call outputs all behavior monitoring results for the current examinee.'."\n"
+ .'- Dedicated screen detection for common chat tools to prevent remote chat-based cheating.'."\n"
+ .'- Supports single-camera setups (such as PCs) and dual-camera setups (such as mobile phone mounts) based on your needs.'."\n"
+ ."\n"
+ .'## Getting started'."\n"
+ .'1. Create an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete account registration.'."\n"
+ .'2. Activate the feature: Make sure you have activated the [Face and Body service](https://vision.aliyun.com/facebody). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open).'."\n"
+ ."\n"
+ .'><notice>'."\n"
+ .'This feature is available to enterprise users or users who have completed verify your identity - Individual account. For more information about identity verification, see [Identity verification](https://help.aliyun.com/knowledge_list/37170.html).'."\n"
+ .'></notice>'."\n"
+ ."\n"
+ .'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/facebody/2019-12-30/MonitorExamination?lang=JAVA&sdkStyle=old&params=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Ffacebody%2FMonitorExamination%2F1MonitorExamination1.jpg%22%2C%22Type%22%3A1%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development and integration steps:'."\n"
+ .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
+ .'- Find the SDK package for the Face and Body (facebody) AI category in the corresponding SDK documentation and install it.'."\n"
+ .'- Modify the sample code provided in the references as needed and invoke the operation.'."\n"
+ ."\n"
+ .'6. Sample code: For sample code in commonly used languages, see [Online exam proctoring sample code](~~2249024~~).'."\n"
+ ."\n"
+ .'7. Direct client calls: Common client-side call methods for this feature include the following.'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from mini programs](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Input limits'."\n"
+ ."\n"
+ .'- Image format: JPG or PNG.'."\n"
+ .'- Image size: Less than 5 MB.'."\n"
+ .'- Image resolution: We recommend that the resolution be greater than 480 × 640 pixels and less than 720 × 1280 pixels.'."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ ."\n"
+ .'> If the image resolution exceeds the maximum limit, scale the image first. For more information, see [Image resizing](~~44688~~).'."\n"
+ ."\n"
+ .'## Billing description'."\n"
+ .'For information about the billable methods and pricing of online exam proctoring, see [Billing overview](~~184049~~).'."\n"
+ .'> The following debugging API is a paid API. For a free trial, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=MonitorExamination).',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'We recommend that you use an SDK to call the online exam proctoring feature under the Face and Body category of Alibaba Cloud Vision AI. SDKs are available in multiple programming languages. Select the SDK package for the Face and Body (facebody) AI category. File parameters support local files and arbitrary URLs when called through the SDK. For more information, see [SDK overview](~~145033~~).'."\n"
+ ."\n"
+ .'## Sample code'."\n"
+ .'For sample code in commonly used languages, see [Online exam proctoring sample code](~~2249024~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of online exam proctoring, see [Common error codes](~~146756~~).'."\n"
+ .'## Security notice'."\n"
+ ."\n"
+ .'- Ensure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the experience debugging feature are valid for 1 hour and are automatically deleted by the system after 24 hours.',
+ 'changeSet' => [],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:MonitorExamination',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"E499788C-22DA-4F0E-B9C0-0E9D30A25716\\",\\n \\"Data\\": {\\n \\"ImageURL\\": \\"http://vibktprfx-prod-prod-aic-gd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/person-image-pencil/fd49dd0a-9e24-4bb5-b303-0745cdb453e0_7aa6_20210128-073045.jpg?Expires=1611820849&OSSAccessKeyId=LTAI****************&Signature=1oLYG%2FPe%2BNRIK7XcsUQYaKF%2B1C****\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<GenerateHumanSketchStyleResponse>\\n <RequestId>E499788C-22DA-4F0E-B9C0-0E9D30A25716</RequestId>\\n <Data>\\n <ImageURL>http://vibktprfx-prod-prod-aic-gd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/person-image-pencil/fd49dd0a-9e24-4bb5-b303-0745cdb453e0_7aa6_20210128-073045.jpg?Expires=1611820849&amp;OSSAccessKeyId=LTAI****************&amp;Signature=1oLYG%2FPe%2BNRIK7XcsUQYaKF%2B1C****</ImageURL>\\n </Data>\\n</GenerateHumanSketchStyleResponse>","errorExample":""}]',
],
- 'RecognizeAction' => [
- 'summary' => '动作行为识别(RecognizeAction)',
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'PedestrianDetectAttribute' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -4880,907 +5745,1491 @@
'systemTags' => [],
'parameters' => [
[
- 'name' => 'Type',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int32',
- 'required' => true,
- 'example' => '0',
- ],
- ],
- [
- 'name' => 'VideoUrl',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => false,
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/RecognizeAction/RecognizeAction-video1.mp4',
- 'isFileTransferUrl' => true,
- ],
- ],
- [
- 'name' => 'URLList',
- 'in' => 'formData',
- 'style' => 'repeatList',
- 'schema' => [
- 'description' => '',
- 'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'object',
- 'properties' => [
- 'URL' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => false,
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/RecognizeAction/1RecognizeAction1.png',
- 'isFileTransferUrl' => true,
- ],
- 'imageData' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => false,
- 'example' => '/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgQ****',
- ],
- ],
- 'required' => false,
- ],
- 'required' => false,
- 'maxItems' => 300,
- ],
- ],
- [
- 'name' => 'VideoData',
+ 'name' => 'ImageURL',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => false,
- 'example' => 'iVBORw0KGgoAAAANSUhEUgAAAoAAAAHJCAIAAACaEB9NAAEAAElEQVR4nNT9Wb****',
- ],
+ 'schema' => ['description' => 'The URL of the image. We recommend that you use an Object Storage Service (OSS) link in the Shanghai region. If the file is stored locally or in an OSS bucket outside the Shanghai region, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/PedestrianDetectAttribute/PedestrianDetectAttribute1.jpg', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
+ 'description' => '1',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'E9C40AF5-A7F8-49D5-8A0C-B21F15A07F17',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '4F609A30-F645-481E-A513-CADAA14DFB0A', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned data.',
'type' => 'object',
'properties' => [
- 'Elements' => [
- 'description' => '',
+ 'Attributes' => [
+ 'description' => 'The pedestrian attributes.',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
- 'Scores' => [
- 'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '0.702967643737793',
+ 'Gender' => [
+ 'description' => 'The gender.',
+ 'type' => 'object',
+ 'properties' => [
+ 'Score' => ['description' => 'The confidence score.', 'type' => 'number', 'format' => 'float', 'example' => '0.97989875078201294', 'title' => ''],
+ 'Name' => ['description' => 'male and female.', 'type' => 'string', 'example' => 'female', 'title' => ''],
],
+ 'title' => '',
+ 'example' => '',
],
- 'Labels' => [
- 'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '',
+ 'Orient' => [
+ 'description' => 'The body orientation.',
+ 'type' => 'object',
+ 'properties' => [
+ 'Score' => ['description' => 'The confidence score.', 'type' => 'number', 'format' => 'float', 'example' => '0.97838658094406128', 'title' => ''],
+ 'Name' => ['description' => 'Front, Side, and Back.', 'type' => 'string', 'example' => 'Front', 'title' => ''],
],
+ 'title' => '',
+ 'example' => '',
],
- 'Boxes' => [
- 'description' => '',
- 'type' => 'array',
- 'items' => [
- 'type' => 'object',
- 'properties' => [
- 'Box' => [
- 'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '[1119,576,1373,970]',
- ],
- ],
- ],
+ 'Age' => [
+ 'description' => 'The age.',
+ 'type' => 'object',
+ 'properties' => [
+ 'Score' => ['description' => 'The confidence score.', 'type' => 'number', 'format' => 'float', 'example' => '0.99590516090393066', 'title' => ''],
+ 'Name' => ['description' => 'AgeOver60 (older than 60), Age18-60 (between 18 and 60), and AgeLess18 (younger than 18).', 'type' => 'string', 'example' => 'Age18-60', 'title' => ''],
],
+ 'title' => '',
+ 'example' => '',
],
- 'Timestamp' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '3',
+ 'UpperWear' => [
+ 'description' => 'The upper clothing type.',
+ 'type' => 'object',
+ 'properties' => [
+ 'Score' => ['description' => 'The confidence score.', 'type' => 'number', 'format' => 'float', 'example' => '0.89291918277740479', 'title' => ''],
+ 'Name' => ['description' => 'LongSleeve and ShortSleeve.', 'type' => 'string', 'example' => 'ShortSleeve', 'title' => ''],
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'Glasses' => [
+ 'description' => 'The glasses attribute.',
+ 'type' => 'object',
+ 'properties' => [
+ 'Score' => ['description' => 'The confidence score.', 'type' => 'number', 'format' => 'float', 'example' => '0.87284471094608307', 'title' => ''],
+ 'Name' => ['description' => 'Yes (wearing glasses) and No (not wearing glasses).', 'type' => 'string', 'example' => 'No', 'title' => ''],
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'LowerWear' => [
+ 'description' => 'The lower clothing type.',
+ 'type' => 'object',
+ 'properties' => [
+ 'Score' => ['description' => 'The confidence score.', 'type' => 'number', 'format' => 'float', 'example' => '0.6424860954284668', 'title' => ''],
+ 'Name' => ['description' => 'Trousers, Shorts, and Skirt&Dress.', 'type' => 'string', 'example' => 'Trousers', 'title' => ''],
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'LowerColor' => [
+ 'description' => 'The lower clothing color.',
+ 'type' => 'object',
+ 'properties' => [
+ 'Score' => ['description' => 'The confidence score.', 'type' => 'number', 'format' => 'float', 'example' => '0.69961744546890259', 'title' => ''],
+ 'Name' => ['description' => 'Black, Gray, Blue, Green, White, Purple, Red, Brown, Yellow, Pink, and Unknown.', 'type' => 'string', 'example' => '黑', 'title' => ''],
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'Hat' => [
+ 'description' => 'The hat attribute.',
+ 'type' => 'object',
+ 'properties' => [
+ 'Score' => ['description' => 'The confidence score.', 'type' => 'number', 'format' => 'float', 'example' => '0.98272394016385078', 'title' => ''],
+ 'Name' => ['description' => 'Yes (wearing a hat) and No (not wearing a hat).', 'type' => 'string', 'example' => 'No', 'title' => ''],
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'Handbag' => [
+ 'description' => 'The handbag attribute.',
+ 'type' => 'object',
+ 'properties' => [
+ 'Score' => ['description' => 'The confidence score.', 'type' => 'number', 'format' => 'float', 'example' => '0.55011671781539917', 'title' => ''],
+ 'Name' => ['description' => 'Yes (carrying a handbag) and No (not carrying a handbag).', 'type' => 'string', 'example' => 'Yes', 'title' => ''],
+ ],
+ 'title' => '',
+ 'example' => '',
],
+ 'Backpack' => [
+ 'description' => 'The backpack attribute.',
+ 'type' => 'object',
+ 'properties' => [
+ 'Score' => ['description' => 'The confidence score.', 'type' => 'number', 'format' => 'float', 'example' => '0.96486538648605347', 'title' => ''],
+ 'Name' => ['description' => 'Yes (carrying a backpack) and No (not carrying a backpack).', 'type' => 'string', 'example' => 'No', 'title' => ''],
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'UpperColor' => [
+ 'description' => 'The upper clothing color.',
+ 'type' => 'object',
+ 'properties' => [
+ 'Score' => ['description' => 'The confidence score.', 'type' => 'number', 'format' => 'float', 'example' => '0.97796273231506348', 'title' => ''],
+ 'Name' => ['description' => 'Black, Gray, Blue, Green, White, Purple, Red, Brown, Yellow, Pink, and Unknown.', 'type' => 'string', 'example' => '黄', 'title' => ''],
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'ShoulderBag' => [
+ 'description' => 'The shoulder bag attribute.',
+ 'type' => 'object',
+ 'properties' => [
+ 'Score' => ['description' => 'The confidence score.', 'type' => 'number', 'format' => 'float', 'example' => '0.91198787838220596', 'title' => ''],
+ 'Name' => ['description' => 'Yes (carrying a shoulder bag) and No (not carrying a shoulder bag).', 'type' => 'string', 'example' => 'No', 'title' => ''],
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ ],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'Boxes' => [
+ 'description' => 'The coordinates of the detected pedestrian bounding boxes.',
+ 'type' => 'array',
+ 'items' => [
+ 'type' => 'object',
+ 'properties' => [
+ 'BottomRightX' => ['description' => 'The x-coordinate of the bottom-right corner of the bounding box.', 'type' => 'number', 'format' => 'float', 'example' => '584', 'title' => ''],
+ 'TopLeftY' => ['description' => 'The y-coordinate of the top-left corner of the bounding box.', 'type' => 'number', 'format' => 'float', 'example' => '27', 'title' => ''],
+ 'Score' => ['description' => 'The confidence score of the bounding box.', 'type' => 'number', 'format' => 'float', 'example' => '0.88381063938140869', 'title' => ''],
+ 'TopLeftX' => ['description' => 'The x-coordinate of the top-left corner of the bounding box.', 'type' => 'number', 'format' => 'float', 'example' => '36', 'title' => ''],
+ 'BottomRightY' => ['description' => 'The y-coordinate of the bottom-right corner of the bounding box.', 'type' => 'number', 'format' => 'float', 'example' => '218', 'title' => ''],
],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
+ 'title' => '',
+ 'example' => '',
],
+ 'PersonNumber' => ['description' => 'The number of detected pedestrians. The value is a positive integer.', 'type' => 'integer', 'format' => 'int32', 'example' => '1', 'title' => ''],
+ 'Width' => ['description' => 'The width of the original image, in pixels.', 'type' => 'integer', 'format' => 'int64', 'example' => '264', 'title' => ''],
+ 'Height' => ['description' => 'The height of the original image, in pixels.', 'type' => 'integer', 'format' => 'int64', 'example' => '584', 'title' => ''],
],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'title' => '',
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable.'],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"4F609A30-F645-481E-A513-CADAA14DFB0A\\",\\n \\"Data\\": {\\n \\"Attributes\\": [\\n {\\n \\"Gender\\": {\\n \\"Score\\": 0.9798987507820129,\\n \\"Name\\": \\"female\\"\\n },\\n \\"Orient\\": {\\n \\"Score\\": 0.9783865809440613,\\n \\"Name\\": \\"Front\\"\\n },\\n \\"Age\\": {\\n \\"Score\\": 0.9959051609039307,\\n \\"Name\\": \\"Age18-60\\"\\n },\\n \\"UpperWear\\": {\\n \\"Score\\": 0.8929191827774048,\\n \\"Name\\": \\"ShortSleeve\\"\\n },\\n \\"Glasses\\": {\\n \\"Score\\": 0.8728447109460831,\\n \\"Name\\": \\"No\\"\\n },\\n \\"LowerWear\\": {\\n \\"Score\\": 0.6424860954284668,\\n \\"Name\\": \\"Trousers\\"\\n },\\n \\"LowerColor\\": {\\n \\"Score\\": 0.6996174454689026,\\n \\"Name\\": \\"黑\\"\\n },\\n \\"Hat\\": {\\n \\"Score\\": 0.9827239401638508,\\n \\"Name\\": \\"No\\"\\n },\\n \\"Handbag\\": {\\n \\"Score\\": 0.5501167178153992,\\n \\"Name\\": \\"Yes\\"\\n },\\n \\"Backpack\\": {\\n \\"Score\\": 0.9648653864860535,\\n \\"Name\\": \\"No\\"\\n },\\n \\"UpperColor\\": {\\n \\"Score\\": 0.9779627323150635,\\n \\"Name\\": \\"黄\\"\\n },\\n \\"ShoulderBag\\": {\\n \\"Score\\": 0.911987878382206,\\n \\"Name\\": \\"No\\"\\n }\\n }\\n ],\\n \\"Boxes\\": [\\n {\\n \\"BottomRightX\\": 584,\\n \\"TopLeftY\\": 27,\\n \\"Score\\": 0.8838106393814087,\\n \\"TopLeftX\\": 36,\\n \\"BottomRightY\\": 218\\n }\\n ],\\n \\"PersonNumber\\": 1,\\n \\"Width\\": 264,\\n \\"Height\\": 584\\n }\\n}","type":"json"}]',
+ 'title' => 'Pedestrian structured attribute detection',
+ 'summary' => 'This topic describes the syntax and examples of the pedestrian structured attribute detection feature (PedestrianDetectAttribute).',
+ 'description' => '## Feature description'."\n"
+ .'The pedestrian structured attribute detection feature detects human body attributes in images, including pedestrian detection and attribute estimation. Attributes include gender, age, orientation, hat, glasses, bag, clothing, color, and more.'."\n"
+ ."\n"
+ .'> - You can join [online consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) to get help from our support team.'."\n"
+ .'- You can try this feature for free on the Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=PedestrianDetectAttribute) to experience this feature or purchase it online.'."\n"
+ .'- To learn more about how to use visual AI APIs on the Alibaba Cloud Vision Intelligence Open Platform, join the DingTalk group (23109592).'."\n"
+ ."\n"
+ .'## Advantages'."\n"
+ .'Rich attributes: Provides a wide range of human body attributes, including age, gender, glasses, hat, backpack, handbag, shoulder bag, upper clothing color, upper clothing type, lower clothing color, lower clothing type, and body orientation.'."\n"
+ ."\n"
+ .'## Integration guide'."\n"
+ .'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete registration.'."\n"
+ .'2. Activate the feature: Make sure you have activated the [Face and Body service](https://vision.aliyun.com/facebody). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open).'."\n"
+ ."\n"
+ .'> This feature is available to enterprise users or users who have completed verify your identity - Individual account. For more information about identity verification, see [Identity verification](https://help.aliyun.com/knowledge_list/37170.html).'."\n"
+ ."\n"
+ .'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/facebody/2019-12-30/PedestrianDetectAttribute?lang=JAVA&sdkStyle=old&params=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Ffacebody%2FPedestrianDetectAttribute%2FPedestrianDetectAttribute1.jpg%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development and integration steps:'."\n"
+ .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
+ .'- Find the SDK package for the Face and Body (facebody) category in the corresponding SDK documentation and install it.'."\n"
+ .'- Modify the sample code provided in the References as needed and invoke the API.'."\n"
+ ."\n"
+ .'6. Direct client calls: Common client call methods for this feature include the following.'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from mini programs](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Input limits'."\n"
+ ."\n"
+ .'- Image format: JPG, JPEG, PNG, or BMP.'."\n"
+ ."\n"
+ .'- Image size: Up to 3 MB.'."\n"
+ ."\n"
+ .'- Image resolution: Greater than 20 × 20 pixels and less than 2048 × 2048 pixels.'."\n"
+ ."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ ."\n"
+ .'> If the image resolution exceeds the maximum limit, resize the image first. For more information, see [Resize images](~~44688~~).'."\n"
+ ."\n"
+ .'## Billing description'."\n"
+ .'For information about the billable methods and pricing of the pedestrian structured property detection feature, see [Billing overview](~~184049~~).'."\n"
+ .'> The debug API operation below is a paid operation. To try it for free, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=PedestrianDetectAttribute).',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'We recommend that you use an SDK to call the pedestrian structured attribute detection feature under the Face and Body category of Alibaba Cloud Vision AI. SDKs are available in multiple programming languages. When calling this feature, select the SDK package for the Face and Body (facebody) category. File parameters support local files and arbitrary URLs when called through the SDK. For more information, see [SDK overview](~~145033~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of the pedestrian structured attribute detection feature, see [Common error codes](~~146756~~).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ ."\n"
+ .'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging console are valid for 1 hour and are automatically deleted by the system after 24 hours.',
+ 'changeSet' => [],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:PedestrianDetectAttribute',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"E9C40AF5-A7F8-49D5-8A0C-B21F15A07F17\\",\\n \\"Data\\": {\\n \\"Elements\\": [\\n {\\n \\"Scores\\": [\\n 0.702967643737793\\n ],\\n \\"Labels\\": [\\n \\"跌倒\\"\\n ],\\n \\"Boxes\\": [\\n {\\n \\"Box\\": [\\n 0\\n ]\\n }\\n ],\\n \\"Timestamp\\": 3\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<RequestId>E9C40AF5-A7F8-49D5-8A0C-B21F15A07F17</RequestId>\\n<Data>\\n <Elements>\\n <Timestamp>1</Timestamp>\\n </Elements>\\n <Elements>\\n <Scores>0.702967643737793</Scores>\\n <Labels>跌倒</Labels>\\n <Timestamp>3</Timestamp>\\n <Boxes>\\n <Box>1119</Box>\\n <Box>576</Box>\\n <Box>1373</Box>\\n <Box>970</Box>\\n </Boxes>\\n </Elements>\\n <Elements>\\n <Scores>0.7334273457527161</Scores>\\n <Labels>跌倒</Labels>\\n <Timestamp>5</Timestamp>\\n <Boxes>\\n <Box>1128</Box>\\n <Box>613</Box>\\n <Box>1363</Box>\\n <Box>991</Box>\\n </Boxes>\\n </Elements>\\n</Data>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
],
- 'RecognizeExpression' => [
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'QueryFaceImageTemplate' => [
+ 'summary' => 'This topic describes the syntax and examples of the QueryFaceImageTemplate operation for querying face image fusion templates.',
+ 'methods' => ['get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
- 'operationType' => 'readAndWrite',
- 'systemTags' => [],
+ 'deprecated' => false,
+ 'systemTags' => ['operationType' => 'get'],
'parameters' => [
[
- 'name' => 'ImageURL',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/RecognizeExpression/RecognizeExpression10.jpg',
- 'isFileTransferUrl' => true,
- ],
+ 'name' => 'TemplateId',
+ 'in' => 'query',
+ 'schema' => ['description' => 'The ID of the template to query. If you do not specify TemplateId, the template list of the current user is returned. If you specify TemplateId, only the corresponding result is returned.', 'type' => 'string', 'required' => false, 'example' => '6cd509ea-54fa-4730-8e9d-c94cadcda048', 'title' => ''],
+ ],
+ [
+ 'name' => 'PageNo',
+ 'in' => 'query',
+ 'schema' => ['description' => 'The page number. Default value: 1. Valid values: 1 to 5000.', 'type' => 'integer', 'format' => 'int64', 'maximum' => '5000', 'minimum' => '1', 'default' => '1', 'required' => false, 'example' => '1', 'title' => ''],
+ ],
+ [
+ 'name' => 'PageSize',
+ 'in' => 'query',
+ 'schema' => ['description' => 'The number of entries per page. Default value: 100. Valid values: 1 to 500.', 'type' => 'integer', 'format' => 'int64', 'maximum' => '500', 'minimum' => '1', 'example' => '100', 'default' => '100', 'required' => false, 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
+ 'title' => '',
+ 'description' => 'Schema of Response',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'E1C4C576-1799-4079-A934-15BC406A54EF',
- ],
+ 'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '7C29675C-751F-4D2F-86FB-2BD8D69AC860'],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned data.',
'type' => 'object',
'properties' => [
+ 'Total' => ['description' => 'The total number of available templates under the current account.', 'type' => 'integer', 'format' => 'int64', 'example' => '20', 'title' => ''],
'Elements' => [
- 'description' => '',
+ 'description' => 'The template list.',
'type' => 'array',
'items' => [
- 'description' => '1',
'type' => 'object',
'properties' => [
- 'FaceRectangle' => [
- 'description' => '',
- 'type' => 'object',
- 'properties' => [
- 'Top' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '41',
- ],
- 'Width' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '121',
- ],
- 'Height' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '174',
- ],
- 'Left' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int32',
- 'example' => '196',
+ 'CreateTime' => ['description' => 'The time when the template was created.', 'type' => 'string', 'example' => '2021-01-29 10:19:05', 'title' => ''],
+ 'UpdateTime' => ['description' => 'The time when the template was updated.', 'type' => 'string', 'example' => '2021-01-29 10:19:05', 'title' => ''],
+ 'UserId' => ['description' => 'The user ID.', 'type' => 'string', 'example' => 'zhangsan', 'title' => ''],
+ 'TemplateId' => ['description' => 'The template ID.', 'type' => 'string', 'example' => '6cd509ea-54fa-4730-8e9d-c94cadcda048', 'title' => ''],
+ 'TemplateURL' => ['description' => 'The URL of the face template image specified when the template was added.', 'type' => 'string', 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/MergeImageFace/MergeImageFace-1.png', 'title' => ''],
+ 'FaceInfos' => [
+ 'description' => 'The face ID and position information for each face when the input image contains multiple faces.',
+ 'type' => 'array',
+ 'items' => [
+ 'description' => 'The face ID and position information for each face when the input image contains multiple faces.',
+ 'type' => 'object',
+ 'properties' => [
+ 'TemplateFaceID' => ['description' => 'The sub-template ID corresponding to the face.', 'type' => 'string', 'example' => '6cd509ea-54fa-4730-8e9d-c94cadcda048', 'title' => ''],
+ 'FaceRect' => [
+ 'description' => 'The position information of the face.',
+ 'type' => 'object',
+ 'properties' => [
+ 'X' => ['description' => 'The x-coordinate of the upper-left corner of the face bounding box.', 'type' => 'string', 'example' => '254', 'title' => ''],
+ 'Y' => ['description' => 'The y-coordinate of the upper-left corner of the face bounding box.', 'type' => 'string', 'example' => '318', 'title' => ''],
+ 'Height' => ['description' => 'The height of the face bounding box.', 'type' => 'string', 'example' => '94', 'title' => ''],
+ 'Width' => ['description' => 'The width of the face bounding box.', 'type' => 'string', 'example' => '89', 'title' => ''],
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
],
+ 'title' => '',
+ 'example' => '',
],
- ],
- 'Expression' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'surprise',
- ],
- 'FaceProbability' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '0.99651491641998291',
+ 'title' => '',
+ 'example' => '',
],
],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable.'],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"7C29675C-751F-4D2F-86FB-2BD8D69AC860\\",\\n \\"Data\\": {\\n \\"Total\\": 20,\\n \\"Elements\\": [\\n {\\n \\"CreateTime\\": \\"2021-01-29 10:19:05\\",\\n \\"UpdateTime\\": \\"2021-01-29 10:19:05\\",\\n \\"UserId\\": \\"zhangsan\\",\\n \\"TemplateId\\": \\"6cd509ea-54fa-4730-8e9d-c94cadcda048\\",\\n \\"TemplateURL\\": \\"http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/MergeImageFace/MergeImageFace-1.png\\",\\n \\"FaceInfos\\": [\\n {\\n \\"TemplateFaceID\\": \\"6cd509ea-54fa-4730-8e9d-c94cadcda048\\",\\n \\"FaceRect\\": {\\n \\"X\\": \\"254\\",\\n \\"Y\\": \\"318\\",\\n \\"Height\\": \\"94\\",\\n \\"Width\\": \\"89\\"\\n }\\n }\\n ]\\n }\\n ]\\n }\\n}","type":"json"}]',
+ 'title' => 'Query face image templates',
+ 'description' => '## Description'."\n"
+ .'The face image fusion template query feature allows you to query face template images that you have added.'."\n"
+ ."\n"
+ .'> - You can join the Chinese-language DingTalk group (ID 23109592) to contact us for technical support from Alibaba Cloud Vision Intelligence Open Platform.'."\n"
+ ."\n"
+ .'## How to use'."\n"
+ .'1. Create an Alibaba Cloud account. Go to the [Alibaba Cloud official website](https://www.aliyun.com) and click **Register Now** in the upper-right corner to create an account.'."\n"
+ .'2. Activate the service: Make sure you have activated the [Face and Body service](https://vision.aliyun.com/facebody). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open).'."\n"
+ .'><notice>'."\n"
+ .'This feature is available only to users who have completed verify your identity - Enterprise account. For more information about real-name verification, see [Real-name verification](https://help.aliyun.com/knowledge_list/37170.html).'."\n"
+ .'></notice>'."\n"
+ ."\n"
+ .'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using an AccessKey pair of a RAM user, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/facebody/2019-12-30/QueryFaceImageTemplate?lang=JAVA&sdkStyle=old&params=%7B%7D&tab=DEMO) to debug this operation online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Before you begin: Make sure you have created a TemplateId by invoking the [AddFaceImageTemplate](~~203512~~) operation to increase a face image fusion template.'."\n"
+ .'6. Development steps:'."\n"
+ .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
+ .'- Find and install the SDK package for the Face and Body category (facebody) in the corresponding SDK documentation.'."\n"
+ .'- Modify the sample code provided in the References as needed and invoke the operation.'."\n"
+ ."\n"
+ .'7. Direct client calls: Common client invocation methods for this feature include the following:'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from mini programs](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Billing'."\n"
+ .'The face image fusion template query feature is free of charge.',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'We recommend that you use an SDK to call the face image fusion template query operation under the Face and Body category of Alibaba Cloud Vision AI. SDKs are available in multiple programming languages. When calling this operation, select the SDK package for the Face and Body category (facebody). File parameters support local files and arbitrary URLs through SDK calls. For more information, see [SDK overview](~~145033~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of the face image fusion template query operation, see [Common error codes](~~146756~~).'."\n"
+ ."\n\n"
+ .'## Security notice'."\n"
+ .'- Make sure that the images or files you upload comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging console are valid for 1 hour and are automatically deleted by the system after 24 hours.',
+ 'changeSet' => [],
+ 'ramActions' => [
+ [
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:QueryFaceImageTemplate',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"E1C4C576-1799-4079-A934-15BC406A54EF\\",\\n \\"Data\\": {\\n \\"Elements\\": [\\n {\\n \\"FaceRectangle\\": {\\n \\"Top\\": 67,\\n \\"Width\\": 113,\\n \\"Height\\": 154,\\n \\"Left\\": 370\\n },\\n \\"Expression\\": \\"happiness\\",\\n \\"FaceProbability\\": 0.88330078125\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<RecognizeExpressionResponse>\\n <RequestId>E1C4C576-1799-4079-A934-15BC406A54EF</RequestId>\\n <Data>\\n <Elements>\\n <FaceRectangle>\\n <Top>67</Top>\\n <Width>113</Width>\\n <Height>154</Height>\\n <Left>370</Left>\\n </FaceRectangle>\\n <Expression>happiness</Expression>\\n <FaceProbability>0.8833008</FaceProbability>\\n </Elements>\\n </Data>\\n</RecognizeExpressionResponse>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
],
- 'BatchAddFaces' => [
- 'summary' => '批量添加人脸数据',
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'RecognizeAction' => [
+ 'summary' => 'This topic describes the syntax and examples of the RecognizeAction operation.',
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
- 'operationType' => 'write',
+ 'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'none',
- 'riskType' => 'none',
- 'chargeType' => 'free',
- 'tenantRelevance' => 'publicInformation',
- ],
+ 'systemTags' => [],
'parameters' => [
[
- 'name' => 'DbName',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'default',
- ],
- ],
- [
- 'name' => 'EntityId',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'U1',
- ],
- ],
- [
- 'name' => 'SimilarityScoreThresholdInEntity',
+ 'name' => 'Type',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'required' => false,
- 'example' => '50.0',
- ],
+ 'schema' => ['description' => 'The input content type, which can be video or image.'."\n"
+ ."\n"
+ .'- 0: specifies a video URL or Base64-encoded video string as input.'."\n"
+ ."\n"
+ .'- 1: specifies an image URL or Base64-encoded image string as input.'."\n"
+ ."\n"
+ .'- Other values: invalid input.', 'type' => 'integer', 'format' => 'int32', 'required' => true, 'example' => '0', 'title' => ''],
],
[
- 'name' => 'SimilarityScoreThresholdBetweenEntity',
+ 'name' => 'VideoUrl',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'required' => false,
- 'example' => '50.0',
- ],
+ 'schema' => ['description' => 'The video URL to be provided when Type is set to 0. We recommend that you use an Object Storage Service (OSS) link in the Shanghai region. If the file is stored locally or the OSS link is in a region other than Shanghai, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => false, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/RecognizeAction/RecognizeAction-video1.mp4', 'title' => ''],
],
[
- 'name' => 'Faces',
+ 'name' => 'URLList',
'in' => 'formData',
- 'style' => 'json',
+ 'style' => 'repeatList',
'schema' => [
- 'description' => '',
+ 'description' => 'The list of images.',
'type' => 'array',
'items' => [
- 'description' => '1',
+ 'description' => 'The list of images.',
'type' => 'object',
'properties' => [
- 'ExtraData' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => false,
- 'example' => '',
- ],
- 'ImageURL' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'https://viapi-test.oss-cn-shanghai.aliyuncs.com/test/imgsearch/demo/1.png',
- 'isFileTransferUrl' => true,
- ],
+ 'URL' => ['description' => 'The image URL to be provided when Type is set to 1. **You must provide exactly 4 images, and the 4 images must be uniformly sampled from a 2-second video. The resolution and number of channels must be consistent across all images.** We recommend that you use an OSS link in the Shanghai region. If the file is stored locally or the OSS link is in a region other than Shanghai, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => false, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/RecognizeAction/1RecognizeAction1.png', 'title' => ''],
+ 'imageData' => ['description' => 'The Base64-encoded string of the image. If both this parameter and URL are specified, URL takes precedence. For information about Base64 encoding, see [File Base64 processing](~~468191~~).', 'type' => 'string', 'required' => false, 'example' => '/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgQ****', 'title' => ''],
],
'required' => false,
+ 'title' => '',
+ 'example' => '',
],
- 'required' => true,
- 'maxItems' => 5,
+ 'required' => false,
+ 'maxItems' => 300,
+ 'title' => '',
+ 'example' => '',
],
],
[
- 'name' => 'QualityScoreThreshold',
+ 'name' => 'VideoData',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'required' => false,
- 'example' => '50.0',
- ],
+ 'schema' => ['description' => 'The Base64-encoded string of the video. If both this parameter and VideoURL are specified, VideoURL takes precedence. For information about Base64 encoding, see [File Base64 processing](~~468191~~).', 'type' => 'string', 'required' => false, 'example' => 'iVBORw0KGgoAAAANSUhEUgAAAoAAAAHJCAIAAACaEB9NAAEAAElEQVR4nNT9Wb****', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
- 'title' => 'Schema of Response',
- 'description' => '1',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'title' => 'Id of the request',
- 'description' => '',
- 'type' => 'string',
- 'example' => 'C46A46D0-3263-181A-A1EE-0901E4595390',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => 'E9C40AF5-A7F8-49D5-8A0C-B21F15A07F17', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned result data.',
'type' => 'object',
'properties' => [
- 'InsertedFaces' => [
- 'description' => '',
- 'type' => 'array',
- 'items' => [
- 'description' => '1',
- 'type' => 'object',
- 'properties' => [
- 'ImageURL' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'https://viapi-test.oss-cn-shanghai.aliyuncs.com/test/imgsearch/demo/xxxx.png',
- ],
- 'FaceId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '16350536',
- ],
- 'QualitieScore' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '99.79581',
- ],
- ],
- ],
- ],
- 'FailedFaces' => [
- 'description' => '',
+ 'Elements' => [
+ 'description' => 'The list of returned result elements.',
'type' => 'array',
'items' => [
- 'description' => '1',
'type' => 'object',
'properties' => [
- 'ImageURL' => [
+ 'Scores' => [
+ 'type' => 'array',
+ 'items' => ['description' => 'The confidence score of the behavior category. Valid values: 0 to 1. A higher value indicates a more accurate recognition. The system provides threshold standards for different actions based on algorithms. You can also adjust the threshold standards based on your needs.'."\n"
+ ."\n"
+ .'- Raising hand: 0.5 (A value lower than 0.5 indicates that the behavior is not raising hand. Otherwise, the behavior is raising hand.)'."\n"
+ ."\n"
+ .'- Eating or drinking: 0.5 (A value lower than 0.5 indicates that the behavior is not eating or drinking. Otherwise, the behavior is eating or drinking.)'."\n"
+ ."\n"
+ .'- Smoking: 0.5 (A value lower than 0.5 indicates that the behavior is not smoking. Otherwise, the behavior is smoking.)'."\n"
+ ."\n"
+ .'- Making a phone call: 0.5 (A value lower than 0.5 indicates that the behavior is not making a phone call. Otherwise, the behavior is making a phone call.)'."\n"
+ ."\n"
+ .'- Using a phone: 0.5 (A value lower than 0.5 indicates that the behavior is not using a phone. Otherwise, the behavior is using a phone.)'."\n"
+ ."\n"
+ .'- Sleeping on a desk: 0.5 (A value lower than 0.5 indicates that the behavior is not sleeping on a desk. Otherwise, the behavior is sleeping on a desk.)'."\n"
+ ."\n"
+ .'- Falling down: 0.5 (A value lower than 0.5 indicates that the behavior is not falling down. Otherwise, the behavior is falling down.)'."\n"
+ .'- Washing hands: 0.5 (A value lower than 0.5 indicates that the behavior is not washing hands. Otherwise, the behavior is washing hands.)'."\n"
+ .'- Taking a photo: 0.5 (A value lower than 0.5 indicates that the behavior is not taking a photo. Otherwise, the behavior is taking a photo.).', 'type' => 'number', 'format' => 'float', 'example' => '0.702967643737793', 'title' => ''],
'description' => '',
- 'type' => 'string',
- 'example' => 'https://viapi-test.oss-cn-shanghai.aliyuncs.com/test/imgsearch/demo/xxxx.png',
+ 'title' => '',
+ 'example' => '',
],
- 'Code' => [
+ 'Labels' => [
+ 'type' => 'array',
+ 'items' => ['description' => 'The recognized behavior category.', 'type' => 'string', 'example' => '跌倒', 'title' => ''],
'description' => '',
- 'type' => 'string',
- 'example' => 'ClientError.IllegalArgument',
+ 'title' => '',
+ 'example' => '',
],
- 'Message' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'not found the db=test',
+ 'Boxes' => [
+ 'description' => 'The list of bounding boxes for specific actions.',
+ 'type' => 'array',
+ 'items' => [
+ 'type' => 'object',
+ 'properties' => [
+ 'Box' => [
+ 'type' => 'array',
+ 'items' => ['description' => 'The bounding box information for a specific action.', 'type' => 'integer', 'format' => 'int32', 'example' => '[1119,576,1373,970]', 'title' => ''],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
+ ],
+ ],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'title' => '',
+ 'example' => '',
],
+ 'Timestamp' => ['description' => 'The timestamp at which the behavior occurs in the video or image.', 'type' => 'integer', 'format' => 'int32', 'example' => '3', 'title' => ''],
],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable.'],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E9C40AF5-A7F8-49D5-8A0C-B21F15A07F17\\",\\n \\"Data\\": {\\n \\"Elements\\": [\\n {\\n \\"Scores\\": [\\n 0.702967643737793\\n ],\\n \\"Labels\\": [\\n \\"跌倒\\"\\n ],\\n \\"Boxes\\": [\\n {\\n \\"Box\\": [\\n 0\\n ]\\n }\\n ],\\n \\"Timestamp\\": 3\\n }\\n ]\\n }\\n}","type":"json"}]',
+ 'title' => 'Action recognition',
+ 'description' => '## Description'."\n"
+ .'The action recognition feature identifies human actions and behaviors in videos and images, and returns the recognized behavior categories. Currently supported behavior categories include: raising hand, eating or drinking, smoking, making a phone call, using a phone, sleeping on a desk, falling down, washing hands, and taking a photo. You can use the system-provided confidence thresholds to determine the recognized actions.'."\n"
+ ."\n"
+ .'**Applicable scope of action recognition:**'."\n"
+ .'- Raising hand: The arm is extended straight up with the wrist above the head.'."\n"
+ .'- Eating or drinking: Eating food or drinking water.'."\n"
+ .'- Smoking: Lighting and actually smoking a cigarette. The cigarette must be clearly visible in the image.'."\n"
+ .'- Making a phone call: Using a phone call or WeChat voice call. The phone must be close to the ear or mouth.'."\n"
+ .'- Using a phone: Typing on a phone, browsing, watching videos, playing games, video chatting, and other phone usage behaviors. The phone must be clearly visible in the image.'."\n"
+ .'- Sleeping on a desk: Resting the head on a desk while sleeping.'."\n"
+ .'- Falling down: The entire body falls to the ground.'."\n"
+ .'- Washing hands: Washing hands under a faucet or in a basin.'."\n"
+ .'- Taking a photo: Holding a phone slightly raised and taking a photo of a person or object.'."\n"
+ ."\n"
+ .'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for online assistance.'."\n"
+ .'- You can try this feature for free on the Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=RecognizeAction) for a hands-on experience and online purchase.'."\n"
+ .'- For questions about API integration and usage of Alibaba Cloud Vision Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Common scenarios'."\n"
+ .'- Driver Monitoring System (DMS): Detects whether a driver is smoking, eating or drinking, making a phone call, using a phone, or engaging in other behaviors that affect driving safety.'."\n"
+ .'- Learning status monitoring: Monitors whether behaviors such as raising a hand, using a phone, or sleeping on a desk occur during learning procedures.'."\n"
+ .'- Public place behavior monitoring: Monitors whether behaviors such as smoking, making phone calls, or taking photos occur in public places such as museums and exhibition halls, and detects abnormal situations such as falling down.'."\n"
+ .'- Workplace supervision: Monitors whether behaviors such as eating or drinking, smoking, making phone calls, or sleeping on a desk occur in the workplace, and checks whether hand-washing requirements are followed.'."\n"
+ ."\n"
+ .'## Features'."\n"
+ .'- Overwrites multiple common scenarios: Supports recognition of behaviors such as raising hand, eating or drinking, smoking, making a phone call, using a phone, sleeping, falling down, washing hands, and taking a photo. This covers various patterns including driving, learning, and general security.'."\n"
+ .'- Adapts to various lighting conditions: Supports behavior recognition under natural light, indoor lighting, and nighttime infrared pattern.'."\n"
+ ."\n"
+ .'## Getting started'."\n"
+ .'1. Create an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to create an account.'."\n"
+ .'2. Activate the service: Make sure you have activated the [Face and Body service](https://vision.aliyun.com/facebody). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open).'."\n"
+ ."\n"
+ .'> This feature is available to enterprise or verify your identity - Individual account users. For more information about identity verification, see [Identity Verification](https://help.aliyun.com/knowledge_list/37170.html).'."\n"
+ ."\n"
+ .'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/facebody/2019-12-30/RecognizeAction?lang=JAVA&sdkStyle=old&params=%7B%22Type%22%3A1%2C%22URLList%22%3A%5B%7B%22URL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Ffacebody%2FRecognizeAction%2F1RecognizeAction1.png%22%7D%2C%7B%22URL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Ffacebody%2FRecognizeAction%2F1RecognizeAction2.png%22%7D%2C%7B%22URL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Ffacebody%2FRecognizeAction%2F1RecognizeAction3.png%22%7D%2C%7B%22URL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Ffacebody%2FRecognizeAction%2F1RecognizeAction4.png%22%7D%5D%7D&tab=DEMO) to debug the feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development and integration steps:'."\n"
+ .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
+ .'- Find the SDK package for the Face and Body (facebody) category in the corresponding SDK documentation and install it.'."\n"
+ .'- Modify the sample code provided in the references as needed and invoke the operation.'."\n"
+ ."\n"
+ .'6. Sample code: For sample code in commonly used languages, see [Action recognition sample code](~~478479~~).'."\n"
+ ."\n"
+ .'7. Direct client calls: Common client call methods for this feature include the following.'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from mini programs](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Input limits'."\n"
+ ."\n"
+ .'- Video requirements:'."\n"
+ .' 1. The duration must be greater than 2 seconds and less than 5 seconds. If the input video is longer than 5 seconds, the system returns detection results for only the first 5 seconds.'."\n"
+ .' 2. The video size must be less than 10 MB.'."\n"
+ .' 3. The resolution must be greater than 256 × 256 pixels and less than or equal to 1280 × 720 pixels.'."\n"
+ .' 4. Common video formats are supported, such as MPEG, AVI, MOV, and MP4.'."\n"
+ ."\n"
+ .' > A home camera or close-range monitoring scenario is recommended, where the camera is fixed and the shooting distance is 2 to 10 meters.'."\n"
+ .'- Image requirements:'."\n"
+ ."\n"
+ .' 1. The number of frames must be 4, and they must be uniformly sampled from the same video over a continuous 2-second period. If the 4 frames are not from the same video, a recognition error occurs.'."\n"
+ .' 2. The resolution must be greater than 256 × 256 pixels and less than or equal to 1280 × 720 pixels.'."\n"
+ .' 3. Supported formats are JPEG, PNG, BMP, and JPG.'."\n"
+ .' 4. A mix of URL and Base64-encoded string inputs is supported.'."\n"
+ ."\n"
+ .'- The URL must not contain Chinese characters.',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'For the action recognition feature under the Face and Body category of Alibaba Cloud Vision AI, we recommend that you use the SDK. Multiple programming languages are supported. Select the SDK package for the Face and Body (facebody) category. File parameters support local files and arbitrary URLs when called through the SDK. For more information, see [SDK overview](~~145033~~).'."\n"
+ ."\n"
+ .'## Sample code'."\n"
+ .'For sample code in commonly used languages, see [Action recognition sample code](~~478479~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of the action recognition feature, see [Common error codes](~~146756~~).'."\n"
+ ."\n\n"
+ .'## Security notice'."\n"
+ ."\n"
+ .'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.',
+ 'changeSet' => [],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:RecognizeAction',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"C46A46D0-3263-181A-A1EE-0901E4595390\\",\\n \\"Data\\": {\\n \\"InsertedFaces\\": [\\n {\\n \\"ImageURL\\": \\"https://viapi-test.oss-cn-shanghai.aliyuncs.com/test/imgsearch/demo/xxxx.png\\",\\n \\"FaceId\\": \\"16350536\\",\\n \\"QualitieScore\\": 99.79581\\n }\\n ],\\n \\"FailedFaces\\": [\\n {\\n \\"ImageURL\\": \\"https://viapi-test.oss-cn-shanghai.aliyuncs.com/test/imgsearch/demo/xxxx.png\\",\\n \\"Code\\": \\"ClientError.IllegalArgument\\",\\n \\"Message\\": \\"not found the db=test\\"\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<BatchAddFacesResponse>\\n <RequestId>C46A46D0-3263-181A-A1EE-0901E4595390</RequestId>\\n <Data>\\n <InsertedFaces>\\n <ImageURL>https://viapi-test.oss-cn-shanghai.aliyuncs.com/test/imgsearch/demo/xxxx.png</ImageURL>\\n <FaceId>16350536</FaceId>\\n <QualitieScore>99.79581</QualitieScore>\\n </InsertedFaces>\\n <FailedFaces>\\n <ImageURL>https://viapi-test.oss-cn-shanghai.aliyuncs.com/test/imgsearch/demo/xxxx.png</ImageURL>\\n <Code>ClientError.IllegalArgument</Code>\\n <Message>not found the db=test</Message>\\n </FailedFaces>\\n </Data>\\n</BatchAddFacesResponse>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
],
- 'ExtractFingerPrint' => [
- 'summary' => '指纹提取',
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'RecognizeExpression' => [
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
- 'deprecated' => false,
+ 'operationType' => 'readAndWrite',
'systemTags' => [],
'parameters' => [
[
'name' => 'ImageURL',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => false,
- 'example' => 'https://viapi-test.oss-cn-shanghai.aliyuncs.com/test-team/xuhan/ExtractFingerPrint.png',
- 'isFileTransferUrl' => true,
- ],
- ],
- [
- 'name' => 'ImageData',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => false,
- 'example' => 'iVBORw0KGgoAAAANSUhEUgAAASUAA****',
- ],
+ 'schema' => ['description' => 'The URL of the image. We recommend that you use an Object Storage Service (OSS) link in the China (Shanghai) region. If the file is stored locally or the OSS link is in a region other than China (Shanghai), see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/RecognizeExpression/RecognizeExpression7.jpg', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
- 'title' => 'Schema of Response',
- 'description' => 'Schema of Response',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'title' => 'Id of the request',
- 'description' => '',
- 'type' => 'string',
- 'example' => 'D21978CC-C1E7-4A7A-A1B2-D5896BDC7ADF',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => 'E1C4C576-1799-4079-A934-15BC406A54EF', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned data.',
'type' => 'object',
'properties' => [
- 'FingerPrint' => [
- 'description' => '',
- 'type' => 'string',
- 'format' => 'byte',
- 'example' => '/9j/4AAQSkZJRgABAQAAAQABAAD****',
+ 'Elements' => [
+ 'description' => 'The recognition results of each element.',
+ 'type' => 'array',
+ 'items' => [
+ 'description' => 'The recognition results of each element.',
+ 'type' => 'object',
+ 'properties' => [
+ 'FaceRectangle' => [
+ 'description' => 'The face region information.',
+ 'type' => 'object',
+ 'properties' => [
+ 'Top' => ['description' => 'The y-coordinate of the upper-left corner of the face region, with the upper-left corner of the image as the origin.', 'type' => 'integer', 'format' => 'int32', 'example' => '67', 'title' => ''],
+ 'Width' => ['description' => 'The width of the face region.', 'type' => 'integer', 'format' => 'int32', 'example' => '113', 'title' => ''],
+ 'Height' => ['description' => 'The height of the face region.', 'type' => 'integer', 'format' => 'int32', 'example' => '154', 'title' => ''],
+ 'Left' => ['description' => 'The x-coordinate of the upper-left corner of the face region, with the upper-left corner of the image as the origin.', 'type' => 'integer', 'format' => 'int32', 'example' => '370', 'title' => ''],
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'Expression' => ['description' => 'The expression type. Valid values:'."\n"
+ ."\n"
+ .'- neutral'."\n"
+ .'- happiness'."\n"
+ .'- surprise'."\n"
+ .'- sadness'."\n"
+ .'- anger'."\n"
+ .'- disgust'."\n"
+ .'- fear'."\n"
+ .'- pouty'."\n"
+ .'- grimace.', 'type' => 'string', 'example' => 'happiness', 'title' => ''],
+ 'FaceProbability' => ['description' => 'The probability that the detected region contains a face. Valid values: 0 to 1.', 'type' => 'number', 'format' => 'float', 'example' => '0.88330078125', 'title' => ''],
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable.'],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"E1C4C576-1799-4079-A934-15BC406A54EF\\",\\n \\"Data\\": {\\n \\"Elements\\": [\\n {\\n \\"FaceRectangle\\": {\\n \\"Top\\": 67,\\n \\"Width\\": 113,\\n \\"Height\\": 154,\\n \\"Left\\": 370\\n },\\n \\"Expression\\": \\"happiness\\",\\n \\"FaceProbability\\": 0.88330078125\\n }\\n ]\\n }\\n}","type":"json"}]',
+ 'title' => 'Facial expression recognition',
+ 'summary' => 'This topic describes the syntax and examples of the RecognizeExpression operation for facial expression recognition.',
+ 'description' => '## Feature description'."\n"
+ .'The facial expression recognition feature detects and recognizes facial expressions in images. The supported expression types are: neutral, happiness, surprise, sadness, anger, disgust, fear, pouty, and grimace.'."\n"
+ .'The following figures show examples of this operation:'."\n"
+ ."\n"
+ .'- Input image'."\n"
+ .'![](https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20231206/ggvw/RecognizeExpression.jpeg" width="500)'."\n"
+ .'- Detection result'."\n"
+ .'![](https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20231206/iddo/RecognizeExpression1.png" width="500)'."\n"
+ ."\n"
+ .'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) to get online assistance.'."\n"
+ .'- You can try this feature for free on the Visual Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=RecognizeExpression) to experience this feature or purchase it online.'."\n"
+ .'- To connect to, use, or consult about the visual AI APIs on the Alibaba Cloud Visual Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Common scenarios'."\n"
+ .'- Facial recognition: Detect and verify authentic facial expressions by recognizing users\' facial expressions.'."\n"
+ .'- Expression recognition: Determine the psychological and emotional state of the recognized subject by using expression recognition technology.'."\n"
+ .'- Interactive entertainment: Obtain face attribute information such as expressions and emotions to implement interactive entertainment features such as special-effect cameras.'."\n"
+ ."\n"
+ .'## Benefits'."\n"
+ ."\n"
+ .'- Supports recognition of multiple expressions: neutral, happiness, surprise, sadness, anger, disgust, fear, pouty, and grimace (9 types in total).'."\n"
+ .'- Easy to use: Provides directly callable API operations that are easy to use, integrate, and compatible with various systems.'."\n"
+ .'- Respects user privacy. Uploaded images are deleted within 24 hours, and the service does not retain user images.'."\n"
+ ."\n"
+ .'## Getting started'."\n"
+ .'1. Create an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com). In the upper-right corner, click **Register Now** and follow the instructions to create an account.'."\n"
+ .'2. Activate the service: Make sure that you have activated the [Face and Body service](https://vision.aliyun.com/facebody). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open).'."\n"
+ .'> This feature is available to enterprise users or users who have completed verify your identity - Individual account. For more information about identity verification, see [Identity verification](https://help.aliyun.com/knowledge_list/37170.html).'."\n"
+ .'3. Create an AccessKey pair: Make sure that you have [created an AccessKey pair](~~175144~~). If you are using an AccessKey pair of a RAM user, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/facebody/2019-12-30/RecognizeExpression?lang=JAVA&sdkStyle=dara&params=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Ffacebody%2FRecognizeExpression%2FRecognizeExpression1.jpg%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development and integration steps:'."\n"
+ .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
+ .'- Find the SDK package for the Face and Body (facebody) AI category in the corresponding SDK documentation and install it.'."\n"
+ .'- Modify the sample code provided in the References as needed and invoke the operation.'."\n"
+ ."\n"
+ .'6. Direct client calls: The following common methods are available for calling this feature from a client.'."\n"
+ .'- [Direct call from a web frontend](~~467779~~)'."\n"
+ .'- [Direct call from a mini program](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Input limits'."\n"
+ .'- Image format: JPEG, JPG, BMP, PNG, TIF, or WEBP.'."\n"
+ .'- Image size: up to 3 MB.'."\n"
+ .'- Image resolution: greater than 5 × 5 pixels and less than 2048 × 2048 pixels. The face must occupy at least 64 × 64 pixels.'."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ ."\n"
+ .'> If the image resolution exceeds the maximum limit, resize the image first. For more information, see [Image resizing](~~44688~~).'."\n"
+ ."\n"
+ .'## Billing description'."\n"
+ .'For information about the billable methods and pricing of facial expression recognition, see [Billing overview](~~184049~~).'."\n"
+ ."\n"
+ .'> The following debugging operation is a paid operation. To try it for free, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=RecognizeExpression).',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'We recommend that you use an SDK to call the facial expression recognition feature under the Face and Body category of Alibaba Cloud Visual AI. SDKs are available in multiple programming languages. When calling the operation, select the SDK package for the Face and Body (facebody) AI category. File parameters support local files and arbitrary URLs when called through the SDK. For more information, see [SDK overview](~~145033~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of facial expression recognition, see [Common error codes](~~146756~~).'."\n"
+ ."\n"
+ .'## Open source Playground'."\n"
+ .'For more open source free model experiences and downloads, visit ModelScope: [FairFace face property recognition model](https://modelscope.cn/models/damo/cv_resnet34_face-attribute-recognition_fairface/summary), [FER facial expression recognition model](https://modelscope.cn/models/damo/cv_vgg19_facial-expression-recognition_fer/summary), and [FQA face quality assessment model](https://modelscope.cn/models/damo/cv_manual_face-quality-assessment_fqa/summary).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the experience debugging feature are valid for 1 hour and are automatically deleted by the system after 24 hours.'."\n"
+ .'- The platform does not store original face images or file information involved during service usage.',
+ 'changeSet' => [],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:RecognizeExpression',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"D21978CC-C1E7-4A7A-A1B2-D5896BDC7ADF\\",\\n \\"Data\\": {\\n \\"FingerPrint\\": \\"/9j/4AAQSkZJRgABAQAAAQABAAD****\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<ExtractFingerPrintResponse>\\n <RequestId>D21978CC-C1E7-4A7A-A1B2-D5896BDC7ADF</RequestId>\\n <Data>\\n <FingerPrint>/9j/4AAQSkZJRgABAQAAAQABAAD****</FingerPrint>\\n </Data>\\n</ExtractFingerPrintResponse>","errorExample":""}]',
],
- 'LiquifyFace' => [
- 'summary' => '智能瘦脸',
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'RecognizeFace' => [
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
+ 'operationType' => 'read',
'deprecated' => false,
'systemTags' => [],
'parameters' => [
[
'name' => 'ImageURL',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/LiquifyFace/LiquifyFace1.png',
- 'isFileTransferUrl' => true,
- ],
+ 'schema' => ['description' => 'The image URL address. We recommend using OSS links in the Shanghai region. For files stored locally or OSS links in regions other than Shanghai, see [File URL Processing](~~155645~~).'."\n"
+ ."\n"
+ .'> - The recommended calling method for the new version is to input only the image. When only ImageURL is passed, all API data will be returned. The new version supports returning data for up to 10 faces.'."\n"
+ ."\n"
+ .'- Compatible with old version interface support logic for boolean input parameters and MaxFaceNumber. When any supported boolean input parameter or MaxFaceNumber is passed to control the returned data, only the data for which boolean input parameters are set to true will be returned. This calling method does not return data outside the scope of boolean input parameters (Landmarks, LandmarkCount, PoseList, Pupils).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/RecognizeFace/RecognizeFace1.png', 'title' => ''],
],
[
- 'name' => 'SlimDegree',
+ 'name' => 'Age',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'required' => false,
- 'maximum' => '2',
- 'minimum' => '0',
- 'example' => '1.0',
- 'default' => '1',
- ],
+ 'schema' => ['description' => 'Compatible with old version interface. Used to control whether to return face age results. Valid values: true or false. Default value: false.', 'type' => 'boolean', 'required' => false, 'example' => 'false', 'title' => ''],
+ ],
+ [
+ 'name' => 'Gender',
+ 'in' => 'formData',
+ 'schema' => ['description' => 'Compatible with old version interface. Used to control whether to return face gender results. Valid values: true or false. Default value: false.', 'type' => 'boolean', 'required' => false, 'example' => 'false', 'title' => ''],
+ ],
+ [
+ 'name' => 'Hat',
+ 'in' => 'formData',
+ 'schema' => ['description' => 'Compatible with old version interface. Used to control whether to return face hat-wearing results. Valid values: true or false. Default value: false.', 'type' => 'boolean', 'required' => false, 'example' => 'false', 'title' => ''],
+ ],
+ [
+ 'name' => 'Glass',
+ 'in' => 'formData',
+ 'schema' => ['description' => 'Compatible with old version interface. Used to control whether to return face glasses-wearing results. Valid values: true or false. Default value: false.', 'type' => 'boolean', 'required' => false, 'example' => 'false', 'title' => ''],
+ ],
+ [
+ 'name' => 'Beauty',
+ 'in' => 'formData',
+ 'schema' => ['description' => 'Compatible with old version interface. Used to control whether to return face beauty score results. Valid values: true or false. Default value: false.', 'type' => 'boolean', 'required' => false, 'example' => 'false', 'title' => ''],
+ ],
+ [
+ 'name' => 'Expression',
+ 'in' => 'formData',
+ 'schema' => ['description' => 'Compatible with old version interface. Used to control whether to return face expression results. Valid values: true or false. Default value: false.', 'type' => 'boolean', 'required' => false, 'example' => 'false', 'title' => ''],
+ ],
+ [
+ 'name' => 'Mask',
+ 'in' => 'formData',
+ 'schema' => ['description' => 'Compatible with old version interface. Used to control whether to return face mask-wearing results. Valid values: true or false. Default value: false.', 'type' => 'boolean', 'required' => false, 'example' => 'false', 'title' => ''],
+ ],
+ [
+ 'name' => 'Quality',
+ 'in' => 'formData',
+ 'schema' => ['description' => 'Compatible with old version interface. Used to control whether to return face quality results. Valid values: true or false. Default value: false.', 'type' => 'boolean', 'required' => false, 'example' => 'false', 'title' => ''],
+ ],
+ [
+ 'name' => 'MaxFaceNumber',
+ 'in' => 'formData',
+ 'schema' => ['description' => 'Compatible with old version interface. Used to set the maximum number of faces to return from the image. Valid values: 1 to 10. Default value: 1. To return multiple face detection results, set this parameter correctly. By default, results are sorted in descending order by the FaceProbabilityList return parameter.', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '1', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
- 'title' => 'Schema of Response',
- 'description' => 'Schema of Response',
+ 'description' => '1',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'title' => 'Id of the request',
- 'description' => '',
- 'type' => 'string',
- 'example' => 'CA1C8937-B30C-15E6-B804-41C357BA413B',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '8251C88E-8273-4DBF-94FB-A6BCB268CEA2', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned result data content.',
'type' => 'object',
'properties' => [
- 'ImageURL' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'http://vibktprfx-prod-prod-aic-gd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/face-liquify/CA1C8937-B30C-15E6-B804-41C357BA413B_5eca_20210923-093411.jpg?Expires=1632391451&OSSAccessKeyId=LTAI4FoLmvQ9urWXgSRp****&Signature=46apJQVNBz%2FFzDLEYn2M1w9MKA****',
+ 'Pupils' => [
+ 'description' => '1',
+ 'type' => 'array',
+ 'items' => ['description' => 'The center coordinates and radius of the left and right pupils. Each face returns 6 floating-point numbers in the order `[left_iris_cenpt.x, left_iris_cenpt.y, left_iris_radius, right_iris_cenpt.x, right_iris_cenpt.y, right_iris_radius]`.', 'type' => 'number', 'format' => 'float', 'example' => '[397.06,183.99,7.87,487.49,173.85,7.87]', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'GenderList' => [
+ 'description' => '1',
+ 'type' => 'array',
+ 'items' => ['description' => 'The detected face gender. If multiple faces are detected, results are returned sequentially.'."\n"
+ ."\n"
+ .'- 0: Female'."\n"
+ ."\n"
+ .'- 1: Male'."\n"
+ ."\n", 'type' => 'integer', 'format' => 'int32', 'example' => '1', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'Expressions' => [
+ 'description' => '1',
+ 'type' => 'array',
+ 'items' => ['description' => 'The expression result from face recognition. Includes:'."\n"
+ ."\n"
+ .'- 0: Neutral'."\n"
+ ."\n"
+ .'- 1: Smile', 'type' => 'integer', 'format' => 'int32', 'example' => '0', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'DenseFeatures' => [
+ 'description' => '1',
+ 'type' => 'array',
+ 'items' => ['description' => 'The features returned by face recognition. If multiple faces are detected, results are returned sequentially.'."\n"
+ ."\n"
+ .'> Due to version upgrade, this field is deprecated. The returned data has no practical significance.', 'type' => 'string', 'example' => '[-0.04283177852630615, 0.01496131718158722, 0.08304227143526077, -0.006072732154279947, -0.012721054255962372, -0.024241730570793152, -0.03138406202197075, 0.006191537249833345, 0.017898650839924812, -0.03185232728719711, -0.02717948891222477, 0.028409384191036224, -0.03557640686631203, -0.02255111373960972, -0.030578967183828354, 0.011586467735469341, -0.005520580802112818, -0.0061850580386817455, -0.023915085941553116, 0.014204374514520168]', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'FaceCount' => ['description' => 'The number of detected faces.', 'type' => 'integer', 'format' => 'int32', 'example' => '1', 'title' => ''],
+ 'Landmarks' => [
+ 'description' => '1',
+ 'type' => 'array',
+ 'items' => ['description' => 'The facial landmark localization results. Each face returns a set of landmark positions in the format `(x0, y0, x1, y1, ...)`. If multiple faces are detected, results are returned sequentially as floating-point numbers.', 'type' => 'number', 'format' => 'float', 'example' => '[371.31,170.54,421.14,162.72,395.33,156.36,396.06,167.71,377.92,164.47,386.19,158.26,404.89,156.61,413.89,157.87,378.82,171,387.24,168.73,404.84,167.34,413.57,167.26,458.27,159.5,521.24,165.59,490.58,......]', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'LandmarkCount' => ['description' => 'The number of facial landmarks detected. Currently fixed at 105 points: eyebrows 24 points, eyes 32 points, nose 6 points, mouth 34 points, and outer contour 9 points.', 'type' => 'integer', 'format' => 'int32', 'example' => '105', 'title' => ''],
+ 'Qualities' => [
+ 'description' => 'Face quality scores. Higher scores indicate better conditions for recognition.',
+ 'type' => 'object',
+ 'properties' => [
+ 'ScoreList' => [
+ 'description' => '1',
+ 'type' => 'array',
+ 'items' => ['description' => 'Overall quality score. Higher scores indicate better conditions for recognition. Value range: (0, 100]. If multiple faces are detected, results are returned sequentially. For recognition, it is recommended to set the threshold to 85 or above (you can determine whether to set a threshold and the appropriate threshold value based on your actual application scenario). Scores above 85 indicate higher overall image quality, while scores below 85 indicate lower overall image quality.'."\n", 'type' => 'number', 'format' => 'float', 'example' => '87.47', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'BlurList' => [
+ 'description' => '1',
+ 'type' => 'array',
+ 'items' => ['description' => 'The impact score of face blur on recognition. Higher scores indicate better conditions for recognition. Value range: (0, 100]. If multiple faces are detected, results are returned sequentially. For recognition, it is recommended to set the threshold to 85 or above (you can determine whether to set a threshold and the appropriate threshold value based on your actual application scenario). Scores above 85 indicate a lower probability of image blur, while scores below 85 indicate a higher probability of image blur.', 'type' => 'number', 'format' => 'float', 'example' => '99.99', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'FnfList' => [
+ 'description' => '1',
+ 'type' => 'array',
+ 'items' => ['description' => 'The score indicating whether the target is a face and its impact on recognition. Higher scores indicate better conditions for recognition. Value range: (0, 100]. If multiple faces are detected, results are returned sequentially. For recognition, it is recommended to set the threshold to 85 or above (you can determine whether to set a threshold and the appropriate threshold value based on your actual application scenario). Scores above 85 indicate a higher probability that the image contains a face, while scores below 85 indicate a lower probability that the image contains a face.', 'type' => 'number', 'format' => 'float', 'example' => '100', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'GlassList' => [
+ 'description' => '1',
+ 'type' => 'array',
+ 'items' => ['description' => 'The impact score of upper face occlusion such as glasses on recognition. Higher scores indicate better conditions for recognition. Value range: (0, 100]. If multiple faces are detected, results are returned sequentially. For recognition, it is recommended to set the threshold to 85 or above (you can determine whether to set a threshold and the appropriate threshold value based on your actual application scenario). Scores above 85 indicate a lower probability of wearing glasses, while scores below 85 indicate a higher probability of wearing glasses.', 'type' => 'number', 'format' => 'float', 'example' => '97.59', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'IlluList' => [
+ 'description' => '1',
+ 'type' => 'array',
+ 'items' => ['description' => 'The impact score of illumination on recognition. Higher scores indicate better conditions for recognition. Value range: (0, 100]. If multiple faces are detected, results are returned sequentially. For recognition, it is recommended to set the threshold to 85 or above (you can determine whether to set a threshold and the appropriate threshold value based on your actual application scenario). Scores above 85 indicate a higher probability of good lighting conditions, while scores below 85 indicate a lower probability of good lighting conditions.', 'type' => 'number', 'format' => 'float', 'example' => '99.97', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'MaskList' => [
+ 'description' => '1',
+ 'type' => 'array',
+ 'items' => ['description' => 'The impact score of lower face occlusion such as masks on recognition. Higher scores indicate better conditions for recognition. Value range: (0, 100]. If multiple faces are detected, results are returned sequentially. For recognition, it is recommended to set the threshold to 85 or above (you can determine whether to set a threshold and the appropriate threshold value based on your actual application scenario). Scores above 85 indicate a lower probability of wearing a mask, while scores below 85 indicate a higher probability of wearing a mask.', 'type' => 'number', 'format' => 'float', 'example' => '93.33', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'NoiseList' => [
+ 'description' => '1',
+ 'type' => 'array',
+ 'items' => ['description' => 'The impact score of image noise on recognition. Higher scores indicate better conditions for recognition. Value range: (0, 100]. If multiple faces are detected, results are returned sequentially. For recognition, it is recommended to set the threshold to 85 or above (you can determine whether to set a threshold and the appropriate threshold value based on your actual application scenario). Scores above 85 indicate a lower probability of image noise, while scores below 85 indicate a higher probability of image noise.', 'type' => 'number', 'format' => 'float', 'example' => '99.73', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'PoseList' => [
+ 'description' => '1',
+ 'type' => 'array',
+ 'items' => ['description' => 'The impact score of face pose on recognition. Higher scores indicate better conditions for recognition. Value range: (0, 100]. If multiple faces are detected, results are returned sequentially. For recognition, it is recommended to set the threshold to 85 or above (you can determine whether to set a threshold and the appropriate threshold value based on your actual application scenario). Scores above 85 indicate a higher probability of a frontal face pose, while scores below 85 indicate a lower probability of a frontal face pose.', 'type' => 'number', 'format' => 'float', 'example' => '11.57', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
+ ],
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'BeautyList' => [
+ 'description' => '1',
+ 'type' => 'array',
+ 'items' => ['description' => 'Beauty score. Higher scores indicate higher beauty ratings. Value range: (0, 100].', 'type' => 'number', 'format' => 'float', 'example' => '48', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'HatList' => [
+ 'description' => '1',
+ 'type' => 'array',
+ 'items' => ['description' => 'Whether the face is wearing a hat.'."\n"
+ ."\n"
+ .'- 0: No hat'."\n"
+ ."\n"
+ .'- 1: Wearing a hat', 'type' => 'integer', 'format' => 'int32', 'example' => '0', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'FaceProbabilityList' => [
+ 'description' => '1',
+ 'type' => 'array',
+ 'items' => ['description' => 'The probability of face detection. Value range: 0 to 1. If multiple faces are detected, results are returned sequentially. For example, if two faces are detected, `[face_prob1, face_prob2]` is returned.', 'type' => 'number', 'format' => 'float', 'example' => '0.95', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'Glasses' => [
+ 'description' => '1',
+ 'type' => 'array',
+ 'items' => ['description' => 'Whether the face is wearing glasses.'."\n"
+ ."\n"
+ .'- 0: No glasses'."\n"
+ ."\n"
+ .'- 1: Wearing regular glasses'."\n"
+ ."\n"
+ .'- 2: Wearing sunglasses', 'type' => 'integer', 'format' => 'int32', 'example' => '1', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'FaceRectangles' => [
+ 'description' => '1',
+ 'type' => 'array',
+ 'items' => ['description' => 'The face bounding rectangle in the format `[left, top, width, height]`. If multiple faces are detected, results are appended sequentially. For example, if two faces are detected, `[left1, top1, width1, height1, left2, top2, width2, height2]` is returned.'."\n"
+ .'left-top: Represents the position of the upper-left corner of the bounding box using the top-left corner of the image as the coordinate origin (x, y), indicating that the first point of the box is x pixels from the left edge and y pixels from the top edge of the image.'."\n"
+ .'width-height: Represents the width and height of the bounding box.'."\n"
+ .'The area of the bounding box is width*height. The bottom-right corner coordinates of the bounding box are (left+width, top+height).', 'type' => 'integer', 'format' => 'int32', 'example' => '[356,84,211,278]', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'PoseList' => [
+ 'description' => '1',
+ 'type' => 'array',
+ 'items' => ['description' => 'The face pose in the format `[yaw, pitch, roll]`. If multiple faces are detected, results are returned sequentially.'."\n"
+ ."\n"
+ .'- yaw: Left-right angle. Value range: -90 to 90.'."\n"
+ ."\n"
+ .'- pitch: Up-down angle. Value range: -90 to 90.'."\n"
+ ."\n"
+ .'- roll: In-plane rotation angle. Value range: -180 to 180.'."\n"
+ ."\n", 'type' => 'number', 'format' => 'float', 'example' => '[-12.7,7.48,0.12]', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'AgeList' => [
+ 'description' => '1',
+ 'type' => 'array',
+ 'items' => ['description' => 'The age of the face in the image. Value range: 0 to 100. If multiple faces are detected, the ages of all faces are returned sequentially.', 'type' => 'integer', 'format' => 'int32', 'example' => '57', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'DenseFeatureLength' => ['description' => 'The feature dimension returned by face recognition. Currently fixed at 1024.', 'type' => 'integer', 'format' => 'int32', 'example' => '1024', 'title' => ''],
+ 'Masks' => [
+ 'description' => '1',
+ 'type' => 'array',
+ 'items' => ['description' => 'Whether the face is wearing a mask.'."\n"
+ ."\n"
+ .'- 0: Not wearing a mask'."\n"
+ .'- 1: Wearing a mask'."\n"
+ .'- 2: Mask not worn correctly', 'type' => 'integer', 'format' => 'int64', 'example' => '0', 'title' => ''],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'title' => '',
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable.'],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"8251C88E-8273-4DBF-94FB-A6BCB268CEA2\\",\\n \\"Data\\": {\\n \\"Pupils\\": [\\n 0\\n ],\\n \\"GenderList\\": [\\n 1\\n ],\\n \\"Expressions\\": [\\n 0\\n ],\\n \\"DenseFeatures\\": [\\n \\"[-0.04283177852630615, 0.01496131718158722, 0.08304227143526077, -0.006072732154279947, -0.012721054255962372, -0.024241730570793152, -0.03138406202197075, 0.006191537249833345, 0.017898650839924812, -0.03185232728719711, -0.02717948891222477, 0.028409384191036224, -0.03557640686631203, -0.02255111373960972, -0.030578967183828354, 0.011586467735469341, -0.005520580802112818, -0.0061850580386817455, -0.023915085941553116, 0.014204374514520168]\\"\\n ],\\n \\"FaceCount\\": 1,\\n \\"Landmarks\\": [\\n 0\\n ],\\n \\"LandmarkCount\\": 105,\\n \\"Qualities\\": {\\n \\"ScoreList\\": [\\n 87.47\\n ],\\n \\"BlurList\\": [\\n 99.99\\n ],\\n \\"FnfList\\": [\\n 100\\n ],\\n \\"GlassList\\": [\\n 97.59\\n ],\\n \\"IlluList\\": [\\n 99.97\\n ],\\n \\"MaskList\\": [\\n 93.33\\n ],\\n \\"NoiseList\\": [\\n 99.73\\n ],\\n \\"PoseList\\": [\\n 11.57\\n ]\\n },\\n \\"BeautyList\\": [\\n 48\\n ],\\n \\"HatList\\": [\\n 0\\n ],\\n \\"FaceProbabilityList\\": [\\n 0.95\\n ],\\n \\"Glasses\\": [\\n 1\\n ],\\n \\"FaceRectangles\\": [\\n 0\\n ],\\n \\"PoseList\\": [\\n 0\\n ],\\n \\"AgeList\\": [\\n 57\\n ],\\n \\"DenseFeatureLength\\": 1024,\\n \\"Masks\\": [\\n 0\\n ]\\n }\\n}","type":"json"}]',
+ 'title' => 'Face Attribute Recognition',
+ 'summary' => 'Detects five face attributes including gender, age, expression, glasses, and hat, and returns 1024-dimensional deep learning features of the face.',
+ 'description' => '## Feature Description'."\n"
+ .'The Face Attribute Recognition capability can detect and identify five face attributes including gender, age, expression, glasses, and hat. It supports comprehensive quality scoring for face occlusion, illumination, blur, pose, and noise, and supports attribute detection for photos containing multiple faces.'."\n"
+ ."\n"
+ .'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for online assistance.'."\n"
+ .'- This capability offers a complete free product experience on the Visual Intelligence Open Platform. You can click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=RecognizeFace) for a more intuitive trial and online purchase.'."\n"
+ .'- For Alibaba Cloud Visual Intelligence Open Platform visual AI capability API access, interface usage, or consultation, please join the Alibaba Cloud Visual Intelligence Open Platform consultation group through DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Key Advantages'."\n"
+ ."\n"
+ .'- Strong adaptability: Supports recognition across different photos, face sizes, and multiple scenarios, covering multiple age groups.'."\n"
+ .'- Image quality scoring: Supports comprehensive quality scoring for face occlusion, illumination, blur, pose, and noise.'."\n"
+ .'- Stable platform service: Provides millisecond-level recognition response and guarantee under high concurrency and large traffic.'."\n"
+ ."\n"
+ .'## Access Guide'."\n"
+ .'1. Register an Alibaba Cloud account: Open the [Alibaba Cloud official website](https://www.aliyun.com). In the upper-right corner of the Alibaba Cloud official website, click **Register Now** and follow the instructions to complete account registration.'."\n"
+ .'2. Activate the capability: Make sure you have activated the [Face and Body service](https://vision.aliyun.com/facebody). If you have not activated the service, please [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open).'."\n"
+ .'> This capability is available for enterprise or individual verified users. For more information about real-name verification, see [Real-name Verification](https://help.aliyun.com/knowledge_list/37170.html).'."\n"
+ .'3. Create an AccessKey: Make sure you have [created an AccessKey](~~175144~~). If you are using a RAM user AccessKey, you need to grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM Authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/facebody/2019-12-30/RecognizeFace?lang=JAVA&sdkStyle=dara&params=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Ffacebody%2FRecognizeFace%2FRecognizeFace1.png%22%7D&tab=DEMO) for online debugging, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development integration steps:'."\n"
+ .'- Select the SDK language you want to use from the [SDK Overview](~~145033~~).'."\n"
+ .'- Find and install the SDK package with the AI category of Face and Body (facebody) in the corresponding language\'s SDK documentation.'."\n"
+ .'- Refer to the sample code provided in the documentation, make appropriate modifications, and call the API.'."\n"
+ ."\n"
+ .'6. Sample code: For sample code in commonly used languages for this capability, see [Face Attribute Recognition Sample Code](~~465558~~).'."\n"
+ .'7. Direct client invocation: Common client calling methods for this capability include the following.'."\n"
+ .'- [Direct Web Frontend Invocation](~~467779~~)'."\n"
+ .'- [Direct Invocation in Mini Program Scenarios](~~467780~~)'."\n"
+ .'- [Direct Android Invocation](~~467781~~)'."\n"
+ .'- [Direct iOS Invocation](~~467782~~)'."\n"
+ ."\n"
+ .'## Input Limitations'."\n"
+ ."\n"
+ .'- Image formats: JPEG, JPG, PNG, BMP.'."\n"
+ .'- Image size: No larger than 20 MB.'."\n"
+ .'- Image resolution: Greater than 32×32 pixels and less than 4096×4096 pixels. The face area must be no smaller than 64×64 pixels.'."\n"
+ .'- The URL must not contain Chinese characters.'."\n"
+ ."\n"
+ .'> When the image resolution exceeds the maximum limit, please scale the image first. For more information, see [Image Scaling](~~44688~~).'."\n"
+ ."\n"
+ .'## Billing'."\n"
+ .'For the billing method and pricing of Face Attribute Recognition, see [Billing Overview](~~184049~~).'."\n"
+ .'> The debugging interface below is a paid interface. For free trial debugging, please go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=RecognizeFace).',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK Reference'."\n"
+ .'For the Face Attribute Recognition capability under the Alibaba Cloud Visual AI Face and Body category, we recommend using the SDK for invocation. Multiple programming languages are supported. When calling, please select the SDK package with the AI category of Face and Body (facebody). File parameters can support local files and any URL through SDK invocation. For more information, see [SDK Overview](~~145033~~).'."\n"
+ ."\n"
+ .'## Sample Code'."\n"
+ .'For sample code in commonly used languages for this capability, see [Face Attribute Recognition Sample Code](~~465558~~).',
+ 'extraInfo' => '## Error Codes'."\n"
+ .'For error codes related to Face Attribute Recognition, see [Common Error Codes](~~146756~~).'."\n"
+ ."\n"
+ .'## Open Source Model Experience'."\n"
+ .'For more open source free model experiences and downloads, see ModelScope: [Face Attribute Recognition Model FairFace](https://modelscope.cn/models/damo/cv_resnet34_face-attribute-recognition_fairface/summary), [Facial Expression Recognition Model FER](https://modelscope.cn/models/damo/cv_vgg19_facial-expression-recognition_fer/summary), [Face Quality Assessment Model FQA](https://modelscope.cn/models/damo/cv_manual_face-quality-assessment_fqa/summary).'."\n"
+ ."\n"
+ .'## Security Statement'."\n"
+ .'- Please ensure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the trial debugging are valid for 1 hour and will be automatically cleaned up and deleted by the system after 24 hours.'."\n"
+ .'- The platform does not store the original face images or file information involved in the user\'s use of the service.',
+ 'changeSet' => [],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:RecognizeFace',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"CA1C8937-B30C-15E6-B804-41C357BA413B\\",\\n \\"Data\\": {\\n \\"ImageURL\\": \\"http://vibktprfx-prod-prod-aic-gd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/face-liquify/CA1C8937-B30C-15E6-B804-41C357BA413B_5eca_20210923-093411.jpg?Expires=1632391451&OSSAccessKeyId=LTAI****************&Signature=46apJQVNBz%2FFzDLEYn2M1w9MKA****\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<LiquifyFaceResponse>\\n <RequestId>CA1C8937-B30C-15E6-B804-41C357BA413B</RequestId>\\n <Data>\\n <ImageURL>http://vibktprfx-prod-prod-aic-gd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/face-liquify/CA1C8937-B30C-15E6-B804-41C357BA413B_5eca_20210923-093411.jpg?Expires=1632391451&amp;OSSAccessKeyId=LTAI****************&amp;Signature=46apJQVNBz%2FFzDLEYn2M1w9MKA****</ImageURL>\\n </Data>\\n</LiquifyFaceResponse>","errorExample":""}]',
],
- 'MonitorExamination' => [
- 'summary' => '线上监考',
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'RecognizePublicFace' => [
+ 'summary' => 'This topic describes the syntax and provides examples of the RecognizePublicFace operation.',
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
+ 'operationType' => 'read',
'deprecated' => false,
'systemTags' => [],
'parameters' => [
[
- 'name' => 'Type',
- 'in' => 'formData',
- 'schema' => [
- 'title' => 'A short description of struct',
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int64',
- 'required' => true,
- 'maximum' => '1',
- 'minimum' => '0',
- 'example' => '1',
- ],
- ],
- [
- 'name' => 'ImageURL',
+ 'name' => 'Task',
'in' => 'formData',
+ 'style' => 'repeatList',
'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/MonitorExamination/1MonitorExamination1.jpg',
- 'isFileTransferUrl' => true,
+ 'description' => '1.',
+ 'type' => 'array',
+ 'items' => [
+ 'description' => '1',
+ 'type' => 'object',
+ 'properties' => [
+ 'ImageURL' => ['description' => 'The URL of the image to be detected. Each element in the JSON array is an image detection task structure (image table). A maximum of 10 elements are supported, which means up to 10 images can be detected at a time. We recommend that you use OSS links in the China (Shanghai) region. For images stored locally or in OSS links outside the China (Shanghai) region, see [File URL processing](~~155645~~).'."\n"
+ ."\n"
+ .'> The system automatically converts OSS link addresses to internal addresses before downloading files. Therefore, calling this operation does not incur OSS traffic fees.', 'type' => 'string', 'required' => false, 'isFileTransferUrl' => true, 'example' => 'https://viapi-oss.oss-cn-shanghai.aliyuncs.com/doc/facebody/xxx.jpg', 'title' => ''],
+ 'ImageData' => ['description' => 'The Base64-encoded string of the image. If both this parameter and the URL parameter are specified, the URL parameter takes precedence.'."\n"
+ .'For information about how to Base64-encode a file, see [File Base64 processing](~~468191~~).', 'type' => 'string', 'required' => false, 'example' => '/9j/4AAQSkZJRgABAQAAAQABAAD/2****9j/4AAQSkZJRgABAQAAAQABAAD/2****', 'title' => ''],
+ ],
+ 'required' => false,
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'required' => false,
+ 'maxItems' => 10,
+ 'minItems' => 1,
+ 'title' => '',
+ 'example' => '',
],
],
],
'responses' => [
200 => [
'schema' => [
- 'title' => 'Schema of Response',
- 'description' => 'Schema of Response',
+ 'description' => '1',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'title' => 'Id of the request',
- 'description' => '',
- 'type' => 'string',
- 'example' => 'D0F6EB94-73B6-4CB8-B266-22D2F221C475',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => 'AC4D107C-29E3-4873-A719-0D2217EA28A8', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned data.',
'type' => 'object',
'properties' => [
- 'FaceInfo' => [
- 'description' => '',
- 'type' => 'object',
- 'properties' => [
- 'Completeness' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '1',
- ],
- 'FaceNumber' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1',
- ],
- 'Pose' => [
- 'description' => '',
- 'type' => 'object',
- 'properties' => [
- 'Pitch' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '-0.9185499548912048',
- ],
- 'Roll' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '-0.18541647493839264',
- ],
- 'Yaw' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '8.095342636108398',
- ],
- ],
- ],
- ],
- ],
- 'PersonInfo' => [
- 'description' => '',
- 'type' => 'object',
- 'properties' => [
- 'CellPhone' => [
- 'description' => '',
- 'type' => 'object',
- 'properties' => [
- 'Score' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '0.39076218008995056',
- ],
- 'Threshold' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '0.6',
- ],
- ],
- ],
- 'EarPhone' => [
- 'description' => '',
- 'type' => 'object',
- 'properties' => [
- 'Score' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '0.7980290651321411',
- ],
- 'Threshold' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '0.6',
+ 'Elements' => [
+ 'description' => 'The recognized elements.',
+ 'type' => 'array',
+ 'items' => [
+ 'description' => '1',
+ 'type' => 'object',
+ 'properties' => [
+ 'ImageURL' => ['description' => 'The image URL corresponding to the request.', 'type' => 'string', 'example' => 'https://viapi-oss.oss-cn-shanghai.aliyuncs.com/doc/facebody/xxx.jpg', 'title' => ''],
+ 'TaskId' => ['description' => 'The ID of the detection task.', 'type' => 'string', 'example' => 'img3dhYqt1e4wO77Wnf2y@t@E-1tYAEt', 'title' => ''],
+ 'Results' => [
+ 'description' => 'The returned results. A successful call returns one or more elements.',
+ 'type' => 'array',
+ 'items' => [
+ 'description' => '1',
+ 'type' => 'object',
+ 'properties' => [
+ 'Suggestion' => ['description' => 'The recommended action. Valid values:'."\n"
+ ."\n"
+ .'- pass: The image is normal and no further action is required.'."\n"
+ ."\n"
+ .'- review: The detection result is uncertain and manual review is required.'."\n"
+ ."\n"
+ .'- block: The image violates the rules. Further action is recommended, such as deleting or restricting the image.', 'type' => 'string', 'example' => 'review', 'title' => ''],
+ 'Label' => ['description' => 'The category of the detection result. Valid values:'."\n"
+ ."\n"
+ .'- normal: The image is normal and does not contain sensitive faces.'."\n"
+ ."\n"
+ .'- sface: The image contains sensitive faces.', 'type' => 'string', 'example' => 'sface', 'title' => ''],
+ 'SubResults' => [
+ 'description' => 'The list of recognized face information.'."\n"
+ .'> If the image contains multiple faces, only the face with the highest confidence is returned by default.',
+ 'type' => 'array',
+ 'items' => [
+ 'description' => '1',
+ 'type' => 'object',
+ 'properties' => [
+ 'W' => ['description' => 'The width of the face region.', 'type' => 'number', 'format' => 'float', 'example' => '132', 'title' => ''],
+ 'Faces' => [
+ 'description' => 'The recognized face information.',
+ 'type' => 'array',
+ 'items' => [
+ 'description' => '1',
+ 'type' => 'object',
+ 'properties' => [
+ 'Name' => ['description' => 'The name of the recognized similar person.', 'type' => 'string', 'example' => '张三', 'title' => ''],
+ 'Id' => ['description' => 'The face ID.', 'type' => 'string', 'example' => 'AliFace_0006272', 'title' => ''],
+ 'Rate' => ['description' => 'The similarity probability.', 'type' => 'number', 'format' => 'float', 'example' => '98.35', 'title' => ''],
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'H' => ['description' => 'The height of the face region.', 'type' => 'number', 'format' => 'float', 'example' => '153', 'title' => ''],
+ 'Y' => ['description' => 'The distance from the upper-left corner of the face region to the y-axis, with the upper-left corner of the image as the origin.', 'type' => 'number', 'format' => 'float', 'example' => '153', 'title' => ''],
+ 'X' => ['description' => 'The distance from the upper-left corner of the face region to the x-axis, with the upper-left corner of the image as the origin.', 'type' => 'number', 'format' => 'float', 'example' => '182', 'title' => ''],
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'Rate' => ['description' => 'The confidence of the detection result. Value range: `[0.00,100.00]`. A higher value indicates a higher probability that the image belongs to the category.', 'type' => 'number', 'format' => 'float', 'example' => '98.35', 'title' => ''],
+ ],
+ 'title' => '',
+ 'example' => '',
],
+ 'title' => '',
+ 'example' => '',
],
],
- 'PersonNumber' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1',
- ],
+ 'title' => '',
+ 'example' => '',
],
- ],
- 'ChatScore' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '0.28805577754974365',
- ],
- 'Threshold' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '0.5',
+ 'title' => '',
+ 'example' => '',
],
],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'title' => '',
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable.'],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"AC4D107C-29E3-4873-A719-0D2217EA28A8\\",\\n \\"Data\\": {\\n \\"Elements\\": [\\n {\\n \\"ImageURL\\": \\"https://viapi-oss.oss-cn-shanghai.aliyuncs.com/doc/facebody/xxx.jpg\\",\\n \\"TaskId\\": \\"img3dhYqt1e4wO77Wnf2y@t@E-1tYAEt\\",\\n \\"Results\\": [\\n {\\n \\"Suggestion\\": \\"review\\",\\n \\"Label\\": \\"sface\\",\\n \\"SubResults\\": [\\n {\\n \\"W\\": 132,\\n \\"Faces\\": [\\n {\\n \\"Name\\": \\"张三\\",\\n \\"Id\\": \\"AliFace_0006272\\",\\n \\"Rate\\": 98.35\\n }\\n ],\\n \\"H\\": 153,\\n \\"Y\\": 153,\\n \\"X\\": 182\\n }\\n ],\\n \\"Rate\\": 98.35\\n }\\n ]\\n }\\n ]\\n }\\n}","type":"json"}]',
+ 'title' => 'Public figure recognition',
+ 'description' => '## Feature description'."\n"
+ .'The public figure recognition feature identifies public figures in images.'."\n"
+ .'Public figures are individuals who have significant influence within a certain scope, hold a certain social status, are widely followed by the public, and can gain substantial benefits from society. They are closely related to public interests, such as leaders, scientists, entrepreneurs, or social activists.'."\n"
+ ."\n"
+ .'> - If multiple tasks are detected at the same time, you are charged based on the number of tasks.'."\n"
+ .'- You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for online assistance.'."\n"
+ .'- You can try this feature for free on the Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=RecognizePublicFace) to try this feature or purchase it online.'."\n"
+ .'- To learn more about how to use the visual intelligence API or to consult about issues, join the Alibaba Cloud Vision Intelligence Open Platform DingTalk group (23109592).'."\n"
+ ."\n"
+ .'## Common scenarios'."\n"
+ .'- User content moderation: Checks whether images and videos submitted by users contain public figures and identifies potential legal risks.'."\n"
+ .'- Video and image retrieval: Identifies and tags video and image content related to public figures. Users can search for related videos and images by the names of public figures.'."\n"
+ ."\n"
+ .'## Advantages'."\n"
+ .'Accurately identifies public figure information in images.'."\n"
+ ."\n"
+ .'## Getting started'."\n"
+ .'1. Create an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com). In the upper-right corner, click **Register Now** and follow the instructions to create an account.'."\n"
+ .'2. Activate the feature:'."\n"
+ .'- Make sure that you have activated the [Face and Body service](https://vision.aliyun.com/facebody). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open).'."\n"
+ .'- After you activate the service, [commit an application](https://vision.console.aliyun.com/cn-shanghai/applyopen/facebody/RecognizePublicFace). You can use this feature only after the application is approved.'."\n"
+ ."\n"
+ .'><notice>'."\n"
+ .'This feature is available only to users who have completed verify your identity - Enterprise account. For more information about identity verification, see [Identity verification](https://help.aliyun.com/knowledge_list/37170.html).'."\n"
+ .'></notice>'."\n"
+ ."\n"
+ .'3. Create an AccessKey pair: Make sure that you have [created an AccessKey pair](~~175144~~). If you are using an AccessKey pair of a RAM user, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/facebody/2019-12-30/RecognizePublicFace?lang=JAVA&sdkStyle=dara&params=%7B%22Task%22%3A%5B%7B%22ImageURL%22%3A%22%22%7D%5D%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development and integration steps:'."\n"
+ .'- Select the SDK language that you want to use from [SDK overview](~~145033~~).'."\n"
+ .'- Find the SDK package for the Face and Body category (facebody) in the corresponding SDK documentation and install it.'."\n"
+ .'- Modify the sample code provided in the references as needed and invoke the operation.'."\n"
+ ."\n"
+ .'6. Sample code: For sample code in common programming languages, see [RecognizePublicFace sample code](~~478122~~).'."\n"
+ ."\n"
+ .'7. Direct client calls: Common client call methods for this feature include the following:'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from mini programs](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Input limits'."\n"
+ .'- Image format: PNG, JPG, JPEG, BMP, GIF, and WEBP.'."\n"
+ .'- Image size: up to 10 MB.'."\n"
+ .'- Image resolution: at least 256 × 256 pixels is recommended. A lower resolution may affect recognition accuracy.'."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ ."\n"
+ .'> If the image resolution exceeds the maximum limit, resize the image first. For more information, see [Image resizing](~~44688~~).'."\n"
+ ."\n"
+ .'## Detection notes'."\n"
+ .'- The maximum detection time is 6 seconds. If the detection is not completed within this time limit, the system returns a timeout error code.'."\n"
+ .'- The image download time limit is 3 seconds. If the download time exceeds 3 seconds, the system returns a download timeout error.'."\n"
+ .'- The response time of the image detection API depends on the image download time. Make sure that the storage service where the images are stored is stable and reliable. We recommend that you use Alibaba Cloud OSS or CDN caching.'."\n"
+ .'- A maximum of 10 images can be detected at a time.'."\n"
+ ."\n"
+ .'## Billing description'."\n"
+ .'For information about the billable methods and pricing of public figure recognition, see [Billing overview](~~184049~~).'."\n"
+ ."\n"
+ .'> The debugging API below is a paid API. To try it for free, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=RecognizePublicFace).',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'We recommend that you use the SDK to call the public figure recognition feature under the Face and Body category of Alibaba Cloud Vision AI. The SDK supports multiple programming languages. When calling, select the SDK package for the Face and Body category (facebody). File parameters can be passed as local files or arbitrary URLs through the SDK. For more information, see [SDK overview](~~145033~~).'."\n"
+ ."\n"
+ .'## Sample code'."\n"
+ .'For sample code in common programming languages, see [RecognizePublicFace sample code](~~478122~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of public figure recognition, see [Common error codes](~~146756~~).'."\n"
+ ."\n"
+ .'## Open source Playground'."\n"
+ .'For more open source free model experience and downloads, visit ModelScope: [Face Recognition OOD Model](https://modelscope.cn/models/damo/cv_ir_face-recognition-ood_rts/summary), [ArcFace Face Recognition Model](https://modelscope.cn/models/damo/cv_ir50_face-recognition_arcface/summary), [IR Face Recognition Model FRIR](https://modelscope.cn/models/damo/cv_manual_face-recognition_frir/summary), [Masked Face Recognition Model FRFM-large](https://modelscope.cn/models/damo/cv_manual_face-recognition_frfm/summary), [Masked Face Recognition Model FaceMask](https://modelscope.cn/models/damo/cv_resnet_face-recognition_facemask/summary).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.'."\n"
+ .'- The platform does not store original face images or file information involved during your use of the service.',
+ 'changeSet' => [],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:RecognizePublicFace',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"D0F6EB94-73B6-4CB8-B266-22D2F221C475\\",\\n \\"Data\\": {\\n \\"FaceInfo\\": {\\n \\"Completeness\\": 1,\\n \\"FaceNumber\\": 1,\\n \\"Pose\\": {\\n \\"Pitch\\": -0.9185499548912048,\\n \\"Roll\\": -0.18541647493839264,\\n \\"Yaw\\": 8.095342636108398\\n }\\n },\\n \\"PersonInfo\\": {\\n \\"CellPhone\\": {\\n \\"Score\\": 0.39076218008995056,\\n \\"Threshold\\": 0.6\\n },\\n \\"EarPhone\\": {\\n \\"Score\\": 0.7980290651321411,\\n \\"Threshold\\": 0.6\\n },\\n \\"PersonNumber\\": 1\\n },\\n \\"ChatScore\\": 0.28805577754974365,\\n \\"Threshold\\": 0.5\\n }\\n}","errorExample":""},{"type":"xml","example":"<RequestId>D0F6EB94-73B6-4CB8-B266-22D2F221C475</RequestId>\\n<Data>\\n <FaceInfo>\\n <Completeness>1</Completeness>\\n <FaceNumber>1</FaceNumber>\\n <Pose>\\n <Pitch>-0.91854995</Pitch>\\n <Roll>-0.18541647</Roll>\\n <Yaw>8.095343</Yaw>\\n </Pose>\\n </FaceInfo>\\n <PersonInfo>\\n <CellPhone>\\n <Score>0.39076218</Score>\\n <Threshold>0.6</Threshold>\\n </CellPhone>\\n <EarPhone>\\n <Score>0.79802907</Score>\\n <Threshold>0.6</Threshold>\\n </EarPhone>\\n <PersonNumber>1</PersonNumber>\\n </PersonInfo>\\n <ChatScore>0.28805578</ChatScore>\\n <Threshold>0.5</Threshold>\\n</Data>","errorExample":""}]',
],
'RetouchSkin' => [
- 'summary' => '美肤',
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'summary' => 'This topic describes the syntax and provides examples of the intelligent skin retouching feature (RetouchSkin).',
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -5792,645 +7241,1138 @@
[
'name' => 'ImageURL',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/RetouchSkin/RetouchSkin3.png',
- 'isFileTransferUrl' => true,
- ],
+ 'schema' => ['description' => 'The URL of the image. We recommend that you use an Object Storage Service (OSS) URL in the Shanghai region. If the file is stored locally or the OSS URL is in a region other than Shanghai, see [File URL processing](~~155645~~).'."\n"
+ .'Image requirements:'."\n"
+ ."\n"
+ .'- Image format: JPEG, JPG, or PNG.'."\n"
+ .'- Image size: Up to 6 MB.'."\n"
+ .'- Image resolution: Greater than 128 × 128 pixels and up to 5000 × 5000 pixels. The longest side must be up to 5000 pixels.'."\n"
+ .'- Image content: The photo must contain 1 to 10 people with clearly visible skin.'."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ ."\n"
+ .'> Image content: If the image resolution exceeds the maximum limit, resize the image first. For more information, see [Image resizing](~~44688~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/RetouchSkin/RetouchSkin3.png', 'title' => ''],
],
[
'name' => 'RetouchDegree',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'required' => false,
- 'example' => '1.0',
- ],
+ 'schema' => ['description' => 'The skin smoothing intensity. Valid values: 0 to 1.5. Default value: 1.0. A larger value results in less visible skin texture.', 'type' => 'number', 'format' => 'float', 'required' => false, 'example' => '1.0', 'title' => ''],
],
[
'name' => 'WhiteningDegree',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'required' => false,
- 'example' => '1.0',
- ],
+ 'schema' => ['description' => 'The skin whitening intensity. Valid values: 0 to 1.5. Default value: 1.0. A larger value results in whiter skin.', 'type' => 'number', 'format' => 'float', 'required' => false, 'example' => '1.0', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
- 'title' => 'Schema of Response',
+ 'title' => '',
'description' => 'Schema of Response',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'title' => 'Id of the request',
- 'description' => '',
- 'type' => 'string',
- 'example' => 'FD2BF3DF-3D98-1D5D-85BB-C8EC3A9FE347',
- ],
+ 'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => 'FD2BF3DF-3D98-1D5D-85BB-C8EC3A9FE347'],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned data.',
'type' => 'object',
'properties' => [
- 'ImageURL' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'http://vibktprfx-prod-prod-aic-gd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/skin-retouch/FD2BF3DF-3D98-1D5D-85BB-C8EC3A9FE347_3467_20210923-094238.jpg?Expires=1632391959&OSSAccessKeyId=LTAI4FoLmvQ9urWXgSRp****&Signature=jXJcFTv3no7Gx%2BLuPvANhRSnc2****',
- ],
+ 'ImageURL' => ['description' => 'The URL of the retouched image.'."\n"
+ .'> This URL is a temporary URL that is valid for 30 minutes. After the URL expires, you can no longer access it. To save the file for a longer period or permanently, access the URL within 30 minutes and download the file to your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://vibktprfx-prod-prod-aic-gd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/skin-retouch/FD2BF3DF-3D98-1D5D-85BB-C8EC3A9FE347_3467_20210923-094238.jpg?Expires=1632391959&OSSAccessKeyId=LTAI****************&Signature=jXJcFTv3no7Gx%2BLuPvANhRSnc2****', 'title' => ''],
],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable.'],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"FD2BF3DF-3D98-1D5D-85BB-C8EC3A9FE347\\",\\n \\"Data\\": {\\n \\"ImageURL\\": \\"http://vibktprfx-prod-prod-aic-gd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/skin-retouch/FD2BF3DF-3D98-1D5D-85BB-C8EC3A9FE347_3467_20210923-094238.jpg?Expires=1632391959&OSSAccessKeyId=LTAI****************&Signature=jXJcFTv3no7Gx%2BLuPvANhRSnc2****\\"\\n }\\n}","type":"json"}]',
+ 'title' => 'Intelligent skin retouching',
+ 'description' => '## Feature description'."\n"
+ .'The intelligent skin retouching feature takes a portrait image as input and automatically retouches the facial and full-body skin while preserving skin texture as much as possible. The feature supports the following scenarios:'."\n"
+ .'- Facial retouching: Smooths the facial area and removes blemishes such as acne, acne marks, and freckles.'."\n"
+ .'- Full-body skin: Whitens the skin across the entire body.'."\n"
+ .'- Group photos: Supports processing of images with up to 10 people.'."\n"
+ ."\n"
+ .'The following images show examples of this feature:'."\n"
+ .'- Input image'."\n"
+ .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20221108/kruz/RetouchSkin.png" width="250)'."\n"
+ .'- Output image'."\n"
+ .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20221108/ffyu/RetouchSkinmeifu.jpg" width="250)'."\n"
+ ."\n"
+ .'> - You can join [online consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) to get help from our support team.'."\n"
+ .'- You can try this feature for free on the China site (Chinese). Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=RetouchSkin) to experience this feature or purchase it online.'."\n"
+ .'- To consult about API access, usage, or issues related to the China site (Chinese), join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Common scenarios'."\n"
+ ."\n"
+ .'- Professional photo retouching: Active in professional photography scenarios such as photo studios, e-commerce, and live photo sharing. The intelligent skin retouching algorithm enables quick skin retouching to improve work efficiency.'."\n"
+ .'- Beauty camera: Active in entertainment and daily life scenarios to enhance the appearance of people in photos.'."\n"
+ ."\n"
+ .'## Benefits'."\n"
+ ."\n"
+ .'- Preserves skin texture: Uses deep learning algorithms to achieve precise skin retouching while maintaining smooth and natural skin texture.'."\n"
+ .'- Maintains background stability: Only retouches exposed skin areas without affecting the background.'."\n"
+ .'- Supports multi-person retouching: Supports skin retouching for multiple people in a single image.'."\n"
+ ."\n"
+ .'## Getting started'."\n"
+ .'1. Create an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Sign Up** in the upper-right corner, and follow the instructions to create an account.'."\n"
+ .'2. Activate the service: Make sure that you have activated the [Face and Body service](https://vision.aliyun.com/facebody). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open).'."\n"
+ .'> This feature is available to enterprise users or users who verify your identity - Individual account. For more information about identity verification, see [Identity verification](https://help.aliyun.com/knowledge_list/37170.html).'."\n"
+ .'3. Create an AccessKey pair: Make sure that you have [created an AccessKey pair](~~175144~~). If you are using an AccessKey pair of a RAM user, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/facebody/2019-12-30/RetouchSkin?lang=JAVA&sdkStyle=dara&params=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Ffacebody%2FRetouchSkin%2FRetouchSkin1.png%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Development and integration steps:'."\n"
+ .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
+ .'- Find and install the SDK package for the Face and Body (facebody) category in the corresponding SDK documentation.'."\n"
+ .'- Modify the sample code provided in the References as needed and invoke the API operation.'."\n"
+ ."\n"
+ .'6. Sample code: For sample code in commonly used languages, see [Intelligent skin retouching sample code](~~605230~~).'."\n"
+ ."\n"
+ .'7. Direct client calls: Common client call methods for this feature include the following.'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from mini programs](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Input limits'."\n"
+ ."\n"
+ .'- Image format: JPEG, JPG, or PNG.'."\n"
+ .'- Image size: Up to 6 MB.'."\n"
+ .'- Image resolution: Greater than 128 × 128 pixels and up to 5000 × 5000 pixels. The longest side must be up to 5000 pixels.'."\n"
+ .'- Image content: The photo must contain 1 to 10 people with clearly visible skin.'."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ ."\n"
+ .'> If the image resolution exceeds the maximum limit, resize the image first. For more information, see [Image resizing](~~44688~~).'."\n"
+ ."\n"
+ .'## Billing description'."\n"
+ .'For information about the billable methods and pricing of the intelligent skin retouching feature, see [Billing overview](~~184049~~).',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'We recommend that you use an SDK to call the intelligent skin retouching feature under the Face and Body category of Alibaba Cloud Vision AI. Multiple programming languages are supported. When making a call, select the SDK package for the Face and Body (facebody) category. File parameters support local files and arbitrary URLs when called through the SDK. For more information, see [SDK overview](~~145033~~).'."\n"
+ ."\n"
+ .'## Sample code'."\n"
+ .'For sample code in commonly used languages, see [Intelligent skin retouching sample code](~~605230~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of the intelligent skin retouching feature, see [Common error codes](~~146756~~).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.',
+ 'changeSet' => [],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:RetouchSkin',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"FD2BF3DF-3D98-1D5D-85BB-C8EC3A9FE347\\",\\n \\"Data\\": {\\n \\"ImageURL\\": \\"http://vibktprfx-prod-prod-aic-gd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/skin-retouch/FD2BF3DF-3D98-1D5D-85BB-C8EC3A9FE347_3467_20210923-094238.jpg?Expires=1632391959&OSSAccessKeyId=LTAI****************&Signature=jXJcFTv3no7Gx%2BLuPvANhRSnc2****\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<RetouchSkinResponse>\\n <RequestId>FD2BF3DF-3D98-1D5D-85BB-C8EC3A9FE347</RequestId>\\n <Data>\\n <ImageURL>http://vibktprfx-prod-prod-aic-gd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/skin-retouch/FD2BF3DF-3D98-1D5D-85BB-C8EC3A9FE347_3467_20210923-094238.jpg?Expires=1632391959&amp;OSSAccessKeyId=LTAI****************&amp;Signature=jXJcFTv3no7Gx%2BLuPvANhRSnc2****</ImageURL>\\n </Data>\\n</RetouchSkinResponse>","errorExample":""}]',
],
- 'CompareFaceWithMask' => [
- 'summary' => '口罩人脸比对1:1',
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'SearchFace' => [
+ 'summary' => 'Describes the syntax and examples of the SearchFace operation for face search.',
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
+ 'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [],
+ 'systemTags' => ['operationType' => 'get'],
'parameters' => [
[
- 'name' => 'ImageURLA',
+ 'name' => 'DbName',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => '',
- 'isFileTransferUrl' => true,
- ],
+ 'schema' => ['description' => 'The database name.'."\n"
+ ."\n"
+ .'> Specify either **DbName** or **DbNames**. If both parameters are specified, **DbNames** takes precedence over **DbName**.', 'type' => 'string', 'required' => false, 'example' => 'default', 'title' => ''],
],
[
- 'name' => 'ImageURLB',
+ 'name' => 'ImageUrl',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => '',
- 'isFileTransferUrl' => true,
- ],
+ 'schema' => ['description' => 'The URL of the image. We recommend that you use an Object Storage Service (OSS) link in the China (Shanghai) region. If the file is stored locally or in an OSS bucket outside the China (Shanghai) region, see [File URL processing](~~155645~~). The URL cannot exceed 1,024 characters in length.', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/SearchFace/SearchFace1.png', 'title' => ''],
+ ],
+ [
+ 'name' => 'Limit',
+ 'in' => 'formData',
+ 'schema' => ['description' => 'The maximum number of face search results returned for each face list. Valid values: 1 to 100.', 'type' => 'integer', 'format' => 'int32', 'required' => true, 'maximum' => '1000', 'minimum' => '0', 'pattern' => '^\\d+$', 'example' => '2', 'title' => ''],
+ ],
+ [
+ 'name' => 'DbNames',
+ 'in' => 'formData',
+ 'schema' => ['description' => 'The list of database names, separated by commas (,). This parameter enables cross-database search and supports up to 10 databases.'."\n"
+ .'> Specify either **DbName** or **DbNames**. If both parameters are specified, **DbNames** takes precedence over **DbName**.', 'type' => 'string', 'maxLength' => 4096, 'required' => false, 'example' => 'test1,test2,test3', 'title' => ''],
],
[
'name' => 'QualityScoreThreshold',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'required' => false,
- 'example' => '97.0',
- ],
+ 'schema' => ['description' => 'The quality score threshold. The system performs quality analysis on the face image. If the quality score is lower than this threshold, the face image quality does not meet the requirements and the comparison fails. Valid values: 0.0 to 100.0. A value of 0.0 or an empty value indicates that quality score evaluation is not performed.', 'type' => 'number', 'format' => 'float', 'required' => false, 'example' => '50.0', 'title' => ''],
+ ],
+ [
+ 'name' => 'MaxFaceNum',
+ 'in' => 'formData',
+ 'schema' => ['description' => 'The number of faces in the input image to search and compare. This parameter controls the number of face sample lists. Valid values: 1 to 10. Default value: 5.', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '5', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
- 'title' => 'Schema of Response',
- 'description' => 'Schema of Response',
+ 'description' => '1',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'title' => 'Id of the request',
- 'description' => '',
- 'type' => 'string',
- 'example' => 'C6499918-E932-41B3-96F5-A18F50D262DD',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '4159e64a-0fe8-436c-a8de-ee531555db3c', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned data.',
'type' => 'object',
'properties' => [
- 'Confidence' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '',
- ],
- 'IsMaskA' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '',
- ],
- 'IsMaskB' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '',
- ],
- 'LandmarksAList' => [
- 'description' => '',
- 'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '',
- ],
- ],
- 'LandmarksBList' => [
- 'description' => '',
+ 'MatchList' => [
+ 'description' => 'The list of matching results. If the input image contains multiple faces, multiple entries are returned.',
'type' => 'array',
'items' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int64',
+ 'description' => '1',
+ 'type' => 'object',
+ 'properties' => [
+ 'FaceItems' => [
+ 'description' => 'The list of matched face data.',
+ 'type' => 'array',
+ 'items' => [
+ 'description' => '1',
+ 'type' => 'object',
+ 'properties' => [
+ 'EntityId' => ['description' => 'The entity ID, which uniquely identifies a user, such as a user ID or employee ID. Each entity can contain multiple face images. The value can contain uppercase and lowercase letters, digits, and underscores (_), and must be 1 to 64 characters in length.', 'type' => 'string', 'example' => 'U1', 'title' => ''],
+ 'FaceId' => ['description' => 'The face image data ID, which must be globally unique and cannot be duplicated. The value can contain lowercase letters, digits, and underscores (_), and must be 1 to 64 characters in length.', 'type' => 'string', 'example' => '001', 'title' => ''],
+ 'Score' => ['description' => 'The similarity score of the face. Valid values: -1.0 to 1.0, rounded to 6 decimal places. A higher value indicates greater similarity. Three recommended reference thresholds are 0.35, 0.45, and 0.6, corresponding to false acceptance rates of 1/1,000, 1/10,000, and 1/100,000 respectively. A higher threshold results in a lower false acceptance rate but also a lower pass rate. Set a higher threshold for scenarios with higher security requirements.', 'type' => 'number', 'format' => 'float', 'example' => '0.892133', 'title' => ''],
+ 'ExtraData' => ['description' => 'The custom information (string). The value can contain letters, digits, punctuation marks, and Chinese characters, and cannot exceed 512 characters in length.', 'type' => 'string', 'example' => '王小二', 'title' => ''],
+ 'DbName' => ['description' => 'The database name.', 'type' => 'string', 'example' => 'default', 'title' => ''],
+ 'Confidence' => ['description' => 'The converted confidence score. Valid values: 0.0 to 100.0. A higher value indicates greater similarity. Three recommended reference thresholds are 60.48, 67.87, and 72.62, corresponding to false acceptance rates of 1/1,000, 1/10,000, and 1/100,000 respectively. A higher threshold results in a lower false acceptance rate but also a lower pass rate. Set a higher threshold for scenarios with higher security requirements.', 'type' => 'number', 'format' => 'float', 'example' => '36.820168', 'title' => ''],
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'Location' => [
+ 'description' => 'The face coordinate information in the input image.',
+ 'type' => 'object',
+ 'properties' => [
+ 'Width' => ['description' => 'The width, in pixels.', 'type' => 'integer', 'format' => 'int32', 'example' => '200', 'title' => ''],
+ 'Height' => ['description' => 'The height, in pixels.', 'type' => 'integer', 'format' => 'int32', 'example' => '200', 'title' => ''],
+ 'Y' => ['description' => 'The y-coordinate of the upper-left corner.', 'type' => 'integer', 'format' => 'int32', 'example' => '6', 'title' => ''],
+ 'X' => ['description' => 'The x-coordinate of the upper-left corner.', 'type' => 'integer', 'format' => 'int32', 'example' => '5', 'title' => ''],
+ ],
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'QualitieScore' => ['description' => 'The quality score of the face in the input image.', 'type' => 'number', 'format' => 'float', 'example' => '71.7349', 'title' => ''],
+ ],
+ 'title' => '',
'example' => '',
],
- ],
- 'QualityScoreA' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
+ 'title' => '',
'example' => '',
],
- 'QualityScoreB' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '',
- ],
- 'RectAList' => [
- 'description' => '',
- 'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '',
- ],
- ],
- 'RectBList' => [
- 'description' => '',
- 'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '',
- ],
- ],
- 'Thresholds' => [
- 'description' => '',
- 'type' => 'array',
- 'items' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '[61, 69, 75]',
- ],
- ],
- 'MessageTips' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'imageB quality score less threshold',
- ],
],
+ 'title' => '',
+ 'example' => '',
],
],
+ 'title' => '',
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable.'],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"4159e64a-0fe8-436c-a8de-ee531555db3c\\",\\n \\"Data\\": {\\n \\"MatchList\\": [\\n {\\n \\"FaceItems\\": [\\n {\\n \\"EntityId\\": \\"U1\\",\\n \\"FaceId\\": \\"001\\",\\n \\"Score\\": 0.892133,\\n \\"ExtraData\\": \\"王小二\\",\\n \\"DbName\\": \\"default\\",\\n \\"Confidence\\": 36.820168\\n }\\n ],\\n \\"Location\\": {\\n \\"Width\\": 200,\\n \\"Height\\": 200,\\n \\"Y\\": 6,\\n \\"X\\": 5\\n },\\n \\"QualitieScore\\": 71.7349\\n }\\n ]\\n }\\n}","type":"json"}]',
+ 'title' => 'Search for faces',
+ 'description' => '## Feature description'."\n"
+ .'The face search feature searches a database for similar face images based on an input image and returns the matching results. A single search supports up to 10 face databases simultaneously (cross-database search). This feature identifies faces based on facial features by converting face images into feature vectors and then comparing the similarity of these feature vectors.'."\n"
+ ."\n"
+ .'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for online assistance.'."\n"
+ .'- You can try this feature for free on the China Vision AI Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=SearchFace) to try this feature or purchase it online.'."\n"
+ .'- For questions about API integration and usage of Alibaba Cloud Vision AI Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Advantages'."\n"
+ .'- High recognition accuracy: The face detection and recognition algorithms achieve industry-leading accuracy.'."\n"
+ .'- High recognition efficiency: Millisecond-level response time with support for real-time recognition.'."\n"
+ ."\n"
+ .'## Integration guide'."\n"
+ .'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete account registration.'."\n"
+ .'2. Activate the service: Make sure that you have activated the [Face and Body service](https://vision.aliyun.com/facebody). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open).'."\n"
+ ."\n"
+ .'><notice>'."\n"
+ ."\n"
+ .'- This feature is available to enterprise users or users who have completed verify your identity - Individual account. For more information about identity verification, see [Identity Verification](https://help.aliyun.com/knowledge_list/37170.html).'."\n"
+ .'- If you are an existing customer who needs to use the large-scale face database creation and search feature, contact us through the DingTalk group (23109592).'."\n"
+ ."\n"
+ .'></notice>'."\n"
+ ."\n"
+ .'3. Create an AccessKey pair: Make sure that you have [created an AccessKey pair](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Before you begin:'."\n"
+ .'- Create a database name (DbName) by invoking the [CreateFaceDb](~~159141~~) operation.'."\n"
+ .'- Create an entity ID (EntityId) by invoking the [AddFaceEntity](~~161144~~) operation.'."\n"
+ .'- Add face images to the entity ID (EntityId) in the database (DbName) by invoking the [AddFace](~~159216~~) operation.'."\n"
+ ."\n"
+ .'5. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/facebody/2019-12-30/SearchFace?lang=JAVA&sdkStyle=dara&params=%7B%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'6. Development integration steps:'."\n"
+ .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n"
+ .'- Find and install the SDK package for the Face and Body (facebody) AI category in the corresponding SDK documentation.'."\n"
+ .'- Modify the sample code provided in the References as needed and invoke the operation.'."\n"
+ ."\n"
+ .'7. Sample code: For sample code in commonly used languages, see [Face search sample code](~~478011~~).'."\n"
+ ."\n"
+ .'8. Direct client calls: Common client call methods for this feature include the following.'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from mini programs](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~)'."\n"
+ ."\n"
+ .'## Input limits'."\n"
+ .'- Image format: JPG, JPEG, or PNG.'."\n"
+ .'- Image size: up to 5 MB.'."\n"
+ .'- Image resolution: greater than 32 × 32 pixels and less than 4096 × 4096 pixels. The face must occupy at least 64 × 64 pixels.'."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ .'- Up to 10 faces in an image are supported. Additional faces are ignored.'."\n"
+ .'>If the image resolution exceeds the maximum limit, resize the image first. For more information, see [Image resizing](~~44688~~).'."\n"
+ ."\n"
+ .'## Billing description'."\n"
+ .'For the billable methods and pricing of face search 1:N, see [Billing overview](~~184049~~). Only this operation (SearchFace) is billed for the face search 1:N feature. Other operations can be invoked for free.'."\n"
+ .'> The debugging operation below is a paid operation. To try it for free, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=facebody&children=SearchFace).',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'We recommend that you use the SDK to call the face search feature under the Face and Body category of Alibaba Cloud Vision AI. The SDK supports multiple programming languages. When calling the SDK, select the SDK package for the Face and Body (facebody) AI category. File parameters support local files and arbitrary URLs through the SDK. For more information, see [SDK overview](~~145033~~).'."\n"
+ ."\n"
+ .'## Sample code'."\n"
+ .'For sample code in commonly used languages, see [Face search sample code](~~478011~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of face search, see [Common error codes](~~146756~~).'."\n"
+ ."\n"
+ .'## Open source Playground'."\n"
+ .'For more open source free model experiences and downloads, visit ModelScope: [Face Recognition OOD Model](https://modelscope.cn/models/damo/cv_ir_face-recognition-ood_rts/summary), [ArcFace Face Recognition Model](https://modelscope.cn/models/damo/cv_ir50_face-recognition_arcface/summary), [IR Face Recognition Model FRIR](https://modelscope.cn/models/damo/cv_manual_face-recognition_frir/summary), [Masked Face Recognition Model FRFM-large](https://modelscope.cn/models/damo/cv_manual_face-recognition_frfm/summary), [Masked Face Recognition Model FaceMask](https://modelscope.cn/models/damo/cv_resnet_face-recognition_facemask/summary).'."\n"
+ ."\n"
+ .'## Security statement'."\n"
+ .'- Ensure that the uploaded images or files comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the experience debugging interface are valid for 1 hour and are automatically deleted by the system after 24 hours.'."\n"
+ .'- The platform does not store original face images or file information involved in the use of the service.'."\n"
+ .'- The platform freezes face characteristic vector data for users who have not invoked any API operations for 6 months or more to ensure the information security of inactive customers. To unfreeze the data, contact us through the DingTalk group (23109592).',
+ 'changeSet' => [],
+ 'ramActions' => [
+ [
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:SearchFace',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'staticInfo' => [
- 'returnType' => 'synchronous',
- ],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"C6499918-E932-41B3-96F5-A18F50D262DD\\",\\n \\"Data\\": {\\n \\"Confidence\\": 88.02560424804688,\\n \\"IsMaskA\\": 1,\\n \\"IsMaskB\\": 0,\\n \\"LandmarksAList\\": [\\n 0\\n ],\\n \\"LandmarksBList\\": [\\n 0\\n ],\\n \\"QualityScoreA\\": 75.8912582397461,\\n \\"QualityScoreB\\": 98.71688079833984,\\n \\"RectAList\\": [\\n 0\\n ],\\n \\"RectBList\\": [\\n 0\\n ],\\n \\"Thresholds\\": [\\n 0\\n ],\\n \\"MessageTips\\": \\"imageB quality score less threshold\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<CompareFaceWithMaskResponse>\\n <RequestId>C6499918-E932-41B3-96F5-A18F50D262DD</RequestId>\\n <Data>\\n <Confidence>88.025604</Confidence>\\n <IsMaskA>1</IsMaskA>\\n <IsMaskB>0</IsMaskB>\\n <LandmarksAList>348</LandmarksAList>\\n <LandmarksAList>490</LandmarksAList>\\n <LandmarksAList>523</LandmarksAList>\\n <LandmarksAList>478</LandmarksAList>\\n <LandmarksAList>446</LandmarksAList>\\n <LandmarksAList>577</LandmarksAList>\\n <LandmarksAList>386</LandmarksAList>\\n <LandmarksAList>677</LandmarksAList>\\n <LandmarksAList>514</LandmarksAList>\\n <LandmarksAList>668</LandmarksAList>\\n <LandmarksBList>356</LandmarksBList>\\n <LandmarksBList>590</LandmarksBList>\\n <LandmarksBList>487</LandmarksBList>\\n <LandmarksBList>589</LandmarksBList>\\n <LandmarksBList>410</LandmarksBList>\\n <LandmarksBList>676</LandmarksBList>\\n <LandmarksBList>368</LandmarksBList>\\n <LandmarksBList>754</LandmarksBList>\\n <LandmarksBList>476</LandmarksBList>\\n <LandmarksBList>753</LandmarksBList>\\n <QualityScoreA>75.89126</QualityScoreA>\\n <QualityScoreB>98.71688</QualityScoreB>\\n <RectAList>238</RectAList>\\n <RectAList>310</RectAList>\\n <RectAList>388</RectAList>\\n <RectAList>492</RectAList>\\n <RectBList>284</RectBList>\\n <RectBList>467</RectBList>\\n <RectBList>293</RectBList>\\n <RectBList>373</RectBList>\\n <Thresholds>61</Thresholds>\\n <Thresholds>69</Thresholds>\\n <Thresholds>75</Thresholds>\\n <MessageTips>imageB quality score less threshold</MessageTips>\\n </Data>\\n</CompareFaceWithMaskResponse>","errorExample":""}]',
],
- 'DetectInfraredLivingFace' => [
- 'summary' => '红外人脸活体检测',
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'UpdateFaceEntity' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
+ 'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [],
+ 'systemTags' => ['operationType' => 'update'],
'parameters' => [
[
- 'name' => 'Tasks',
+ 'name' => 'DbName',
'in' => 'formData',
- 'style' => 'repeatList',
- 'schema' => [
- 'description' => '',
- 'type' => 'array',
- 'items' => [
- 'type' => 'object',
- 'properties' => [
- 'ImageURL' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => 'https://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/DetectInfraredLivingFace/DetectInfraredLivingFace.jpeg',
- 'isFileTransferUrl' => true,
- ],
- ],
- 'required' => false,
- ],
- 'required' => true,
- 'maxItems' => 10,
- ],
+ 'schema' => ['description' => 'The name of the database.', 'type' => 'string', 'required' => true, 'example' => 'default', 'title' => ''],
+ ],
+ [
+ 'name' => 'EntityId',
+ 'in' => 'formData',
+ 'schema' => ['description' => 'The entity ID, such as a user ID or employee ID.', 'type' => 'string', 'required' => true, 'example' => 'mm2', 'title' => ''],
+ ],
+ [
+ 'name' => 'Labels',
+ 'in' => 'formData',
+ 'schema' => ['description' => 'The custom labels. You can add up to 10 labels.', 'type' => 'string', 'required' => false, 'example' => '视觉智能', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
- 'title' => 'Schema of Response',
- 'description' => 'Schema of Response',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'title' => 'Id of the request',
- 'description' => '',
- 'type' => 'string',
- 'example' => '68DF6EC7-3B1D-11EE-9FA7-1122F1AE92DD',
- ],
- 'Data' => [
- 'description' => '',
- 'type' => 'object',
- 'properties' => [
- 'Elements' => [
- 'description' => '',
- 'type' => 'array',
- 'items' => [
- 'type' => 'object',
- 'properties' => [
- 'FaceNumber' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1',
- ],
- 'ImageURL' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'http://viapi-demo.oss-cn-shanghai.aliyuncs.com/viapi-demo/images/SegmentCommonImage/segmentimage-src-hu.jpeg',
- ],
- 'Results' => [
- 'description' => '',
- 'type' => 'array',
- 'items' => [
- 'type' => 'object',
- 'properties' => [
- 'Label' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'liveness',
- ],
- 'Rate' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '83.3848',
- ],
- 'Rect' => [
- 'description' => '',
- 'type' => 'object',
- 'properties' => [
- 'Height' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '20',
- ],
- 'Width' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '30',
- ],
- 'Top' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '50',
- ],
- 'Left' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '60',
- ],
- ],
- ],
- 'Suggestion' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'review',
- ],
- 'MessageTips' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'blurred, occluded or large angle face, please check.',
- ],
- ],
- ],
- ],
- ],
- ],
- ],
- ],
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => 'DA7CAFEB-0A37-4496-9CDF-E3DBB6309CB2', 'title' => ''],
],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
],
],
'errorCodes' => [
400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
- ],
+ ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => 'The parameter is invalid. Please check again.'],
],
403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
- ],
+ ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
],
408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
- ],
+ ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => 'The request has timed out.'],
],
503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => 'The service is unavailable.'],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"DA7CAFEB-0A37-4496-9CDF-E3DBB6309CB2\\"\\n}","type":"json"}]',
+ 'title' => 'Update a face sample',
+ 'summary' => 'Updates a face sample.',
+ 'description' => '## Description'."\n"
+ .'The update face sample feature updates face sample data in a face database.'."\n"
+ ."\n"
+ .'> - You can join the Chinese-language DingTalk group (ID 23109592) to contact us for Chinese-language technical support from Alibaba Cloud Vision Intelligence Open Platform.'."\n"
+ .'- You can also submit your Chinese-language questions through [online consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2).'."\n"
+ ."\n"
+ .'## How to use'."\n"
+ .'1. Create an Alibaba Cloud account: Open the [Alibaba Cloud official website](https://www.alibabacloud.com), click **China Site Registration** in the upper-right corner, and follow the on-screen instructions to complete account registration.'."\n"
+ .'2. Activate the service: Make sure that you have activated the [Face and Body service](https://vision.aliyun.com/facebody). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open).'."\n"
+ ."\n"
+ .'><notice>'."\n"
+ .'This feature is available to enterprise users or users who verify your identity - Individual account. For more information about identity verification, see [Identity verification](https://help.aliyun.com/knowledge_list/37170.html).'."\n"
+ .'></notice>'."\n"
+ ."\n"
+ .'3. Create an AccessKey pair: Make sure that you have [created an AccessKey pair](~~175144~~). If you are using an AccessKey pair of a RAM user, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n"
+ .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/facebody/2019-12-30/UpdateFaceEntity?lang=JAVA) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n"
+ .'5. Integration steps:'."\n"
+ .'- Select the SDK language that you want to use from [SDK overview](~~145033~~).'."\n"
+ .'- Find and install the SDK package for the Face and Body category (facebody) in the corresponding SDK documentation.'."\n"
+ .'- Modify the sample code provided in the references as needed and invoke the feature.'."\n"
+ ."\n"
+ .'6. Direct client calls: Common client call methods for this feature include the following:'."\n"
+ .'- [Direct call from web frontend](~~467779~~)'."\n"
+ .'- [Direct call from a mini program](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Limits'."\n"
+ .'The default concurrency for submitting tasks through the update face sample operation is 2 QPS.'."\n"
+ ."\n"
+ .'## Billing'."\n"
+ .'The update face sample feature is free of charge.',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'We recommend that you use an SDK to call the update face sample feature of Alibaba Cloud Vision AI Face and Body category. SDKs are available in multiple programming languages. When making the call, select the SDK package for the Face and Body category (facebody). File parameters support local files and arbitrary URLs through SDK calls. For more information, see [SDK overview](~~145033~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For the error codes of the update face sample feature, see [Common error codes](~~146756~~).'."\n"
+ ."\n"
+ .'## Security notice'."\n"
+ .'- Make sure that the images or files you upload comply with applicable laws and regulations.'."\n"
+ .'- Temporary files uploaded through the debugging console are valid for 1 hour and are automatically deleted by the system after 24 hours.'."\n"
+ .'- The platform does not store original face images or file information involved in your use of the service.'."\n"
+ .'- The platform freezes face feature vector data for users who have not made any API invoke for 6 months or more to ensure the information security of inactive users. To unfreeze data, contact us through the DingTalk group (ID 23109592).',
+ 'changeSet' => [],
+ 'ramActions' => [
+ [
+ 'operationType' => 'update',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:UpdateFaceEntity',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"68DF6EC7-3B1D-11EE-9FA7-1122F1AE92DD\\",\\n \\"Data\\": {\\n \\"Elements\\": [\\n {\\n \\"FaceNumber\\": 1,\\n \\"ImageURL\\": \\"http://viapi-demo.oss-cn-shanghai.aliyuncs.com/viapi-demo/images/SegmentCommonImage/segmentimage-src-hu.jpeg\\",\\n \\"Results\\": [\\n {\\n \\"Label\\": \\"liveness\\",\\n \\"Rate\\": 83.3848,\\n \\"Rect\\": {\\n \\"Height\\": 20,\\n \\"Width\\": 30,\\n \\"Top\\": 50,\\n \\"Left\\": 60\\n },\\n \\"Suggestion\\": \\"review\\",\\n \\"MessageTips\\": \\"blurred, occluded or large angle face, please check.\\"\\n }\\n ]\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<DetectInfraredLivingFaceResponse>\\n <RequestId>68DF6EC7-3B1D-11EE-9FA7-1122F1AE92DD</RequestId>\\n <Data>\\n <Elements>\\n <FaceNumber>1</FaceNumber>\\n <ImageURL>http://viapi-demo.oss-cn-shanghai.aliyuncs.com/viapi-demo/images/SegmentCommonImage/segmentimage-src-hu.jpeg</ImageURL>\\n <Results>\\n <Label>liveness</Label>\\n <Rate>83.3848</Rate>\\n <Rect>\\n <Height>20</Height>\\n <Width>30</Width>\\n <Top>50</Top>\\n <Left>60</Left>\\n </Rect>\\n <Suggestion>review</Suggestion>\\n <MessageTips>blurred, occluded or large angle face, please check.</MessageTips>\\n </Results>\\n </Elements>\\n </Data>\\n</DetectInfraredLivingFaceResponse>","errorExample":""}]',
],
- 'DeepfakeFace' => [
- 'summary' => '换脸鉴别',
- 'methods' => [
- 'post',
+ ],
+ 'endpoints' => [
+ ['regionId' => 'cn-shanghai', 'regionName' => 'China (Shanghai)', 'areaId' => 'asiaPacific', 'areaName' => 'Asia Pacific', 'public' => 'facebody.cn-shanghai.aliyuncs.com', 'endpoint' => 'facebody.cn-shanghai.aliyuncs.com', 'vpc' => 'facebody-vpc.cn-shanghai.aliyuncs.com'],
+ ],
+ 'errorCodes' => [
+ ['code' => 'AuthFailed', 'message' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'http_code' => 403, 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
+ ['code' => 'ClientError.IllegalArgument', 'message' => 'The request parameter has an error.', 'http_code' => 400, 'description' => 'The request parameter has an error.'],
+ ['code' => 'Data.Exist', 'message' => 'The data already exists.', 'http_code' => 409, 'description' => 'The data already exists.'],
+ ['code' => 'EntityNotExist.Role', 'message' => '没有Ram权限,请联系主账号给你添加AliyunVIAPIFullAccess权限,操作流程可参考https://help.aliyun.com/document_detail/145025.htm', 'http_code' => 403, 'description' => ''],
+ ['code' => 'IllegalUrlParameter', 'message' => 'Url不合法,请检查url能否正常打开', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InternalError', 'message' => 'An error occurred to the algorithm service.', 'http_code' => 500, 'description' => 'An internal error occurred.'],
+ ['code' => 'InternalError.Algo', 'message' => 'An algorithm error occurred.', 'http_code' => 500, 'description' => 'An algorithm error occurred.'],
+ ['code' => 'InternalError.Busy', 'message' => 'Server busy.', 'http_code' => 500, 'description' => ''],
+ ['code' => 'InternalError.Decode', 'message' => 'Failed to decode the image.', 'http_code' => 500, 'description' => ''],
+ ['code' => 'InternalError.Env', 'message' => 'Failed to initilize the environment.', 'http_code' => 500, 'description' => ''],
+ ['code' => 'InternalError.Mapping', 'message' => 'An algorithm error occurred.', 'http_code' => 500, 'description' => 'An algorithm error occurred.'],
+ ['code' => 'InternalError.Model', 'message' => 'Failed to load the model.', 'http_code' => 500, 'description' => ''],
+ ['code' => 'InternalError.Process', 'message' => 'An error occurred during inference.', 'http_code' => 500, 'description' => ''],
+ ['code' => 'InternalError.Remote', 'message' => 'The request processing has failed due to some unknown error.', 'http_code' => 500, 'description' => ''],
+ ['code' => 'InternalError.Server', 'message' => 'The request processing has failed due to some unknown error.', 'http_code' => 500, 'description' => ''],
+ ['code' => 'InternalError.Timeout', 'message' => 'The request has timed out.', 'http_code' => 500, 'description' => 'The request has timed out.'],
+ ['code' => 'InternalServerError', 'message' => 'A server error occurred while processing your request.', 'http_code' => 500, 'description' => ''],
+ ['code' => 'InvalidAccessKeyId.Inactive', 'message' => 'AccessKeyId非法,请检查AccessKeyId是否被禁用,或者AccessKeyId和AccessKeySecret是否填写正确。', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidAccessKeyId.NotFound', 'message' => 'access key not found', 'http_code' => 404, 'description' => ''],
+ ['code' => 'InvalidAccessKeySecret', 'message' => 'AccessKeyId或AccessKeySecret填写错误,请检查AccessKeyId和AccessKeySecret是否填写正确。', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidAction.NotFound', 'message' => '能力未找到,请检查类目与能力是否匹配,检查访问域名与能力是否匹配,关于访问域名可参考:https://help.aliyun.com/document_detail/143103.htm。SDK接入请参考:https://help.aliyun.com/document_detail/145033.html,选择合适编程语言根据实例代码作相关修改进行接入。', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidApi.ForbiddenInvoke', 'message' => '调用受限,请检查您调用的能力是否为受限能力,受限能力需要在控制台https://vision.console.aliyun.com/找到相应能力申请经过审批之后才能调用。如非上述情况,请检查账号是否欠费', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidApi.NotPurchase', 'message' => 'specified api is not purchase', 'http_code' => 403, 'description' => ''],
+ ['code' => 'InvalidApi.OutOfService', 'message' => '产品未开通,请开通产品:https://common-buy.aliyun.com/?commodityCode=viapi_facebody_public_cn#/open', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidDB.Status', 'message' => 'DB instance current status not support the operation.', 'http_code' => 400, 'description' => 'DB instance current status not support the operation.'],
+ ['code' => 'InvalidFile.Content', 'message' => 'The content format of the image or video is invalid.', 'http_code' => 400, 'description' => 'The content format of the image or video is invalid.'],
+ ['code' => 'InvalidFile.Decode', 'message' => 'Failed to decode the file.', 'http_code' => 400, 'description' => 'Failed to decode the file.'],
+ ['code' => 'InvalidFile.Download', 'message' => 'Failed to download the file.', 'http_code' => 400, 'description' => 'Failed to download the file.'],
+ ['code' => 'InvalidFile.Region', 'message' => 'The URL format of the file is invalid.', 'http_code' => 400, 'description' => 'The URL format of the file is invalid.'],
+ ['code' => 'InvalidFile.Resolution', 'message' => 'The resolution of the image or video is invalid.', 'http_code' => 400, 'description' => 'The resolution of the image or video is invalid.'],
+ ['code' => 'InvalidFile.Type', 'message' => 'The file type of the image or video is invalid.', 'http_code' => 400, 'description' => 'The file type of the image or video is invalid.'],
+ ['code' => 'InvalidFile.Unsafe', 'message' => 'Risky file URL.', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidFile.URL', 'message' => 'The URL format of the file is invalid.', 'http_code' => 400, 'description' => 'The URL format of the file is invalid.'],
+ ['code' => 'InvalidImage.Content', 'message' => '请参考算法文档检查图片内容,更换包含符合算法要求的', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidImage.Decode', 'message' => 'The content format of the image or video is invalid.', 'http_code' => 400, 'description' => 'The content format of the image or video is invalid.'],
+ ['code' => 'InvalidImage.Download', 'message' => 'Failed to download the file.', 'http_code' => 400, 'description' => 'Failed to download the file.'],
+ ['code' => 'InvalidImage.NotFound', 'message' => 'The image file is not found in the parameter.', 'http_code' => 404, 'description' => 'The image file is not found in the parameter.'],
+ ['code' => 'InvalidImage.NotFoundFace', 'message' => 'No face is detected in the specified image.', 'http_code' => 404, 'description' => 'No face is detected in the specified image.'],
+ ['code' => 'InvalidImage.Region', 'message' => 'The URL format of the file is invalid.', 'http_code' => 400, 'description' => 'The URL format of the file is invalid.'],
+ ['code' => 'InvalidImage.Resolution', 'message' => 'The resolution of the image or video is invalid.', 'http_code' => 400, 'description' => 'The resolution of the image or video is invalid.'],
+ ['code' => 'InvalidImage.Timeout', 'message' => 'Failed to download the file due to timeout.', 'http_code' => 400, 'description' => 'Failed to download the file due to timeout.'],
+ ['code' => 'InvalidImage.Type', 'message' => '图片类型错误,请检查图片类型 - 请参考算法API文档,使用算法支持的图片类型', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidImage.Unsafe', 'message' => 'Risky file URL.', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidImage.UnsupportedMediaType', 'message' => 'Failed to decode the image.', 'http_code' => 415, 'description' => ''],
+ ['code' => 'InvalidImage.URL', 'message' => 'The URL format of the file is invalid.', 'http_code' => 400, 'description' => 'The URL format of the file is invalid.'],
+ ['code' => 'InvalidImage.URL', 'message' => 'The URL format of the file is invalid or URL access has failed.', 'http_code' => 400, 'description' => 'The URL format of the file is invalid or URL access has failed.'],
+ ['code' => 'InvalidImageType', 'message' => 'Invalid image type.', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidParameter', 'message' => 'The request parameter is invalid.', 'http_code' => 400, 'description' => 'The request parameter is invalid.'],
+ ['code' => 'InvalidParameter.BadRequest', 'message' => 'The request parameter or the data has an error.', 'http_code' => 400, 'description' => 'The request parameter or the data has an error.'],
+ ['code' => 'InvalidParameter.NotFound', 'message' => 'The requested data is not found.', 'http_code' => 400, 'description' => 'The requested data is not found.'],
+ ['code' => 'InvalidParameter.TooLarge', 'message' => 'The file size exceeds the limit.', 'http_code' => 400, 'description' => 'The file size exceeds the limit.'],
+ ['code' => 'InvalidParameter.Type', 'message' => 'The data format of the request parameter is invalid.', 'http_code' => 400, 'description' => 'The data format of the request parameter is invalid.'],
+ ['code' => 'InvalidParamter.Type', 'message' => 'The data format of the request parameter is invalid.', 'http_code' => 400, 'description' => 'The data format of the request parameter is invalid.'],
+ ['code' => 'InvalidRamRole', 'message' => '没有Ram权限,请联系主账号给你添加AliyunVIAPIFullAccess权限,操作流程可参考https://help.aliyun.com/document_detail/145025.htm', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidResult', 'message' => '参数错误,请参考文档检查参数值,检查文件内容。请检查是否图片内容不完整或者太模糊等。', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidSide', 'message' => 'Specified parameter Side is not valid. 请参考文档填写正确的Side参数', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidTimeStamp.Expired', 'message' => '时间戳过期,请更新时间戳', 'http_code' => 400, 'description' => ''],
+ ['code' => 'InvalidVersion', 'message' => 'Specified parameter Version is not valid', 'http_code' => 400, 'description' => ''],
+ ['code' => 'MissingAccessKeyId', 'message' => 'AccessKeyId未填写,请检查AccessKeyId和AccessKeySecret是否填写正确。', 'http_code' => 400, 'description' => ''],
+ ['code' => 'MissingFileURL', 'message' => 'FileURL is required for this operation.', 'http_code' => 400, 'description' => ''],
+ ['code' => 'MissingImageURL', 'message' => 'ImageURL is required for this operation.', 'http_code' => 400, 'description' => ''],
+ ['code' => 'MissingLimit', 'message' => 'Limit is required for this operation', 'http_code' => 400, 'description' => ''],
+ ['code' => 'MissingParameter', 'message' => 'A required parameter is not specified.', 'http_code' => 400, 'description' => ''],
+ ['code' => 'MissingTasks', 'message' => 'Tasks is required for this operation.', 'http_code' => 400, 'description' => ''],
+ ['code' => 'ParameterError', 'message' => 'The parameter is invalid. Please check again.', 'http_code' => 400, 'description' => 'The parameter is invalid. Please check again.'],
+ ['code' => 'QualityScoreNotMatched', 'message' => 'image quality score not matched with given score', 'http_code' => 400, 'description' => ''],
+ ['code' => 'QuotaExceeded.DbCount', 'message' => 'The number of database exceeds the limit.', 'http_code' => 400, 'description' => 'The number of database exceeds the limit.'],
+ ['code' => 'QuotaExceeded.FaceGroupCount', 'message' => 'The number of database exceeds the limit.', 'http_code' => 400, 'description' => 'The number of database exceeds the limit.'],
+ ['code' => 'QuotaExceeded.FaceImageCount', 'message' => 'The number of image or trace exceeds the limit.', 'http_code' => 400, 'description' => 'The number of image or trace exceeds the limit.'],
+ ['code' => 'QuotaExceeded.ImageCount', 'message' => 'The number of image or trace exceeds the limit.', 'http_code' => 400, 'description' => 'The number of image or trace exceeds the limit.'],
+ ['code' => 'Retry', 'message' => 'An error occurred due to jitter. Please try again.', 'http_code' => 449, 'description' => 'An error occurred due to jitter. Please try again.'],
+ ['code' => 'SDK.ServerUnreachable', 'message' => 'An SDK client error occurred.', 'http_code' => 400, 'description' => 'An SDK client error occurred.'],
+ ['code' => 'ServiceUnavailable', 'message' => 'The service is unavailable.', 'http_code' => 503, 'description' => 'The service is unavailable.'],
+ ['code' => 'ServiceUnavailable', 'message' => 'A network error occurred.', 'http_code' => 500, 'description' => 'A network error occurred.'],
+ ['code' => 'SignatureDoesNotMatch', 'message' => '签名不正确,请重新计算签名。关于签名可参考文档:https://help.aliyun.com/document_detail/144904.html', 'http_code' => 400, 'description' => ''],
+ ['code' => 'SignatureNonceUsed', 'message' => '签名已经被使用过,请重新计算签名。关于签名可参考文档:https://help.aliyun.com/document_detail/144904.html', 'http_code' => 400, 'description' => ''],
+ ['code' => 'Throttling', 'message' => 'The request was denied due to QPS limits.', 'http_code' => 400, 'description' => 'The request was denied due to flow control.'],
+ ['code' => 'Throttling.User', 'message' => 'The request was denied due to QPS limits.', 'http_code' => 400, 'description' => ''],
+ ['code' => 'Timeout', 'message' => 'The request has timed out.', 'http_code' => 408, 'description' => 'The request has timed out.'],
+ ['code' => 'Unauthorized', 'message' => 'RAM authentication failed.', 'http_code' => 403, 'description' => 'RAM authentication failed.'],
+ ['code' => 'UnsupportedHTTPMethod', 'message' => 'The HTTP request method is not supported.', 'http_code' => 403, 'description' => ''],
+ ],
+ 'changeSet' => [],
+ 'ram' => [
+ 'productCode' => 'VisualIntelligenceAPI',
+ 'productName' => 'Visual Intelligence API',
+ 'ramCodes' => ['viapi-imageseg', 'viapi-imageaudit', 'viapi-ocr', 'viapi-objectdet', 'viapi-imageenhan', 'viapi-videorecog', 'viapi-imageprocess', 'viapi', 'viapi-ekyc', 'viapi-imgsearch', 'viapi-goodstech', 'viapi-facebody', 'viapi-threedvision', 'viapi-videoenhan', 'viapi-imagerecog', 'viapi-videoseg', 'viapi-regen', 'viapi-aigen'],
+ 'ramLevel' => 'SERVICE',
+ 'ramConditions' => [],
+ 'ramActions' => [
+ [
+ 'apiName' => 'DeleteFace',
+ 'description' => '',
+ 'operationType' => 'delete',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:DeleteFace',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
],
- 'schemes' => [
- 'https',
+ [
+ 'apiName' => 'DeepfakeFace',
+ 'description' => '',
+ 'operationType' => 'none',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:DeepfakeFace',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
],
- 'security' => [
- [
- 'AK' => [],
+ [
+ 'apiName' => 'BatchAddFaces',
+ 'description' => '',
+ 'operationType' => 'none',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:BatchAddFaces',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
- 'operationType' => 'read',
- 'deprecated' => false,
- 'systemTags' => [
+ [
+ 'apiName' => 'DetectCelebrity',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:DetectCelebrity',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'RecognizeFace',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:RecognizeFace',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'DeleteFaceDb',
+ 'description' => '',
+ 'operationType' => 'delete',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:DeleteFaceDb',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'DetectLivingFace',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:DetectLivingFace',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'ListFaceEntities',
+ 'description' => '',
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:ListFaceEntities',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'MonitorExamination',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:MonitorExamination',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'DetectFace',
+ 'description' => '',
'operationType' => 'none',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:DetectFace',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
],
- 'parameters' => [
- [
- 'name' => 'Tasks',
- 'in' => 'formData',
- 'style' => 'repeatList',
- 'schema' => [
- 'description' => '',
- 'type' => 'array',
- 'items' => [
- 'type' => 'object',
- 'properties' => [
- 'ImageURL' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => false,
- 'example' => 'https://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/DeepfakeFace/DeepfakeFace1.jpg',
- 'isFileTransferUrl' => true,
- ],
- 'ImageData' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => false,
- 'example' => '/9j/4AAQSkZJRgABAQAAAQABAAD/2****',
- ],
- ],
- 'required' => false,
- ],
- 'required' => true,
- 'maxItems' => 10,
+ [
+ 'apiName' => 'GetFaceEntity',
+ 'description' => '',
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:GetFaceEntity',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
- 'responses' => [
- 200 => [
- 'schema' => [
- 'title' => 'Schema of Response',
- 'description' => 'Schema of Response',
- 'type' => 'object',
- 'properties' => [
- 'RequestId' => [
- 'title' => 'Id of the request',
- 'description' => '',
- 'type' => 'string',
- 'example' => '8E6F65D5-62A1-1E5B-BC0B-00508034AC92',
- ],
- 'Data' => [
- 'description' => '',
- 'type' => 'object',
- 'properties' => [
- 'Elements' => [
- 'description' => '',
- 'type' => 'array',
- 'items' => [
- 'type' => 'object',
- 'properties' => [
- 'ImageURL' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/DeepfakeFace/DeepfakeFace1.jpg',
- ],
- 'TaskId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '8E6F65D5-62A1-1E5B-BC0B-00508034AC92',
- ],
- 'Results' => [
- 'description' => '',
- 'type' => 'array',
- 'items' => [
- 'type' => 'object',
- 'properties' => [
- 'Label' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'normalface',
- ],
- 'Confidence' => [
- 'description' => '',
- 'type' => 'number',
- 'format' => 'float',
- 'example' => '36.6455',
- ],
- 'Rect' => [
- 'description' => '',
- 'type' => 'object',
- 'properties' => [
- 'Left' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '373',
- ],
- 'Top' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '111',
- ],
- 'Width' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '207',
- ],
- 'Height' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '284',
- ],
- ],
- ],
- 'MessageTips' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'blurred, occluded or large angle face, please check.',
- ],
- ],
- ],
- ],
- 'FaceNumber' => [
- 'description' => '',
- 'type' => 'integer',
- 'format' => 'int64',
- 'example' => '1',
- ],
- ],
- ],
- ],
- ],
- ],
- ],
+ [
+ 'apiName' => 'ListFaceDbs',
+ 'description' => '',
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:ListFaceDbs',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
- 'errorCodes' => [
- 400 => [
- [
- 'errorCode' => 'ParameterError',
- 'errorMessage' => 'The parameter is invalid. Please check again.',
+ [
+ 'apiName' => 'DetectVideoLivingFace',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:DetectVideoLivingFace',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
- 403 => [
- [
- 'errorCode' => 'AuthFailed',
- 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.',
+ ],
+ [
+ 'apiName' => 'BodyPosture',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:BodyPosture',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
- 408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
+ ],
+ [
+ 'apiName' => 'GenRealPersonVerificationToken',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:GenRealPersonVerificationToken',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
- 503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ],
+ [
+ 'apiName' => 'UpdateFaceEntity',
+ 'description' => '',
+ 'operationType' => 'update',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:UpdateFaceEntity',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
- 'staticInfo' => [
- 'returnType' => 'synchronous',
+ [
+ 'apiName' => 'MergeImageFace',
+ 'description' => '',
+ 'operationType' => 'none',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:MergeImageFace',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'CreateFaceDb',
+ 'description' => '',
+ 'operationType' => 'create',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:CreateFaceDb',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'DetectPedestrian',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:DetectPedestrian',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'ExtractFingerPrint',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:ExtractFingerPrint',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'DetectInfraredLivingFace',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:DetectInfraredLivingFace',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'GenerateHumanAnimeStyle',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:GenerateHumanAnimeStyle',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'RecognizeExpression',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:RecognizeExpression',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'DetectBodyCount',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:DetectBodyCount',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'GenerateHumanSketchStyle',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:GenerateHumanSketchStyle',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'CompareFaceWithMask',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:CompareFaceWithMask',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'PedestrianDetectAttribute',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:PedestrianDetectAttribute',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'RecognizeAction',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:RecognizeAction',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'EnhanceFace',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:EnhanceFace',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'BlurFace',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:BlurFace',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'LiquifyFace',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:LiquifyFace',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'FaceBeauty',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:FaceBeauty',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'QueryFaceImageTemplate',
+ 'description' => '',
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:QueryFaceImageTemplate',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'AddFaceImageTemplate',
+ 'description' => '',
+ 'operationType' => 'create',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:AddFaceImageTemplate',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'RecognizePublicFace',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:RecognizePublicFace',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'DeleteFaceEntity',
+ 'description' => '',
+ 'operationType' => 'delete',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:DeleteFaceEntity',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'AddFaceEntity',
+ 'description' => '',
+ 'operationType' => 'create',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:AddFaceEntity',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'AddFace',
+ 'description' => '',
+ 'operationType' => 'create',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:AddFace',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'CompareFace',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:CompareFace',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'SearchFace',
+ 'description' => '',
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:SearchFace',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'RetouchSkin',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:RetouchSkin',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'DeleteFaceImageTemplate',
+ 'description' => '',
+ 'operationType' => 'delete',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:DeleteFaceImageTemplate',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'GetRealPersonVerificationResult',
+ 'description' => '',
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'viapi-facebody:GetRealPersonVerificationResult',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"8E6F65D5-62A1-1E5B-BC0B-00508034AC92\\",\\n \\"Data\\": {\\n \\"Elements\\": [\\n {\\n \\"ImageURL\\": \\"http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/DeepfakeFace/DeepfakeFace1.jpg\\",\\n \\"TaskId\\": \\"8E6F65D5-62A1-1E5B-BC0B-00508034AC92\\",\\n \\"Results\\": [\\n {\\n \\"Label\\": \\"normalface\\",\\n \\"Confidence\\": 36.6455,\\n \\"Rect\\": {\\n \\"Left\\": 373,\\n \\"Top\\": 111,\\n \\"Width\\": 207,\\n \\"Height\\": 284\\n },\\n \\"MessageTips\\": \\"blurred, occluded or large angle face, please check.\\"\\n }\\n ],\\n \\"FaceNumber\\": 1\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<DeepfakeFaceResponse>\\n <RequestId>8E6F65D5-62A1-1E5B-BC0B-00508034AC92</RequestId>\\n <Data>\\n <Elements>\\n <ImageURL>http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/facebody/DeepfakeFace/DeepfakeFace1.jpg</ImageURL>\\n <TaskId>8E6F65D5-62A1-1E5B-BC0B-00508034AC92</TaskId>\\n <Results>\\n <Label>normalface</Label>\\n <Confidence>36.6455</Confidence>\\n <Rect>\\n <Left>373</Left>\\n <Top>111</Top>\\n <Width>207</Width>\\n <Height>284</Height>\\n </Rect>\\n <MessageTips>blurred, occluded or large angle face, please check.</MessageTips>\\n </Results>\\n <FaceNumber>1</FaceNumber>\\n </Elements>\\n </Data>\\n</DeepfakeFaceResponse>","errorExample":""}]',
- ],
- ],
- 'endpoints' => [
- [
- 'regionId' => 'cn-shanghai',
- 'endpoint' => 'facebody.cn-shanghai.aliyuncs.com',
],
+ 'resourceTypes' => [],
],
];
diff --git a/data/en_us/facebody/2020-09-10/api-docs.php b/data/en_us/facebody/2020-09-10/api-docs.php
index a9098e1..2f330f1 100644
--- a/data/en_us/facebody/2020-09-10/api-docs.php
+++ b/data/en_us/facebody/2020-09-10/api-docs.php
@@ -1,18 +1,12 @@
<?php return [
'version' => '1.0',
- 'info' => [
- 'style' => 'ROA',
- 'product' => 'facebody',
- 'version' => '2020-09-10',
- ],
+ 'info' => ['style' => 'ROA', 'product' => 'facebody', 'version' => '2020-09-10'],
'directories' => [
[
'id' => 0,
'title' => '其它',
'type' => 'directory',
- 'children' => [
- 'ExecuteServerSideVerification',
- ],
+ 'children' => ['ExecuteServerSideVerification'],
],
],
'components' => [
@@ -22,24 +16,15 @@
'ExecuteServerSideVerification' => [
'summary' => '核身纯服务端版',
'path' => '/viapi/thirdparty/realperson/execServerSideVerification',
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
- 'consumes' => [
- 'application/x-www-form-urlencoded',
- ],
- 'produces' => [
- 'application/json',
- ],
+ 'consumes' => ['application/x-www-form-urlencoded'],
+ 'produces' => ['application/json'],
'operationType' => 'readAndWrite',
'deprecated' => false,
'systemTags' => [],
@@ -47,53 +32,27 @@
[
'name' => 'certificateName',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'example' => '',
- 'required' => false,
- 'type' => 'string',
- ],
+ 'schema' => ['description' => '', 'example' => '', 'required' => false, 'type' => 'string'],
],
[
'name' => 'certificateNumber',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'example' => '1281739873298172981',
- 'required' => false,
- 'type' => 'string',
- ],
+ 'schema' => ['description' => '', 'example' => '1281739873298172981', 'required' => false, 'type' => 'string'],
],
[
'name' => 'facialPictureData',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'example' => '/9j/wwew...',
- 'format' => 'byte',
- 'required' => false,
- 'type' => 'string',
- ],
+ 'schema' => ['description' => '', 'example' => '/9j/wwew...', 'format' => 'byte', 'required' => false, 'type' => 'string'],
],
[
'name' => 'facialPictureUrl',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'example' => 'http://xxx.xxx.com/xxx.jpg',
- 'required' => false,
- 'type' => 'string',
- ],
+ 'schema' => ['description' => '', 'example' => 'http://xxx.xxx.com/xxx.jpg', 'required' => false, 'type' => 'string'],
],
[
'name' => 'sceneType',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'example' => 'server',
- 'required' => false,
- 'type' => 'string',
- ],
+ 'schema' => ['description' => '', 'example' => 'server', 'required' => false, 'type' => 'string'],
],
],
'responses' => [
@@ -101,30 +60,13 @@
'schema' => [
'description' => '',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'example' => 'CE2FFC8A-6669-4F02-B4DA-95888087FBDC',
- 'title' => 'Id of the request',
- 'type' => 'string',
- ],
+ 'RequestId' => ['description' => '', 'example' => 'CE2FFC8A-6669-4F02-B4DA-95888087FBDC', 'title' => 'Id of the request', 'type' => 'string'],
'Data' => [
'description' => '',
'properties' => [
- 'Pass' => [
- 'description' => '',
- 'example' => 'true',
- 'type' => 'boolean',
- ],
- 'VerificationToken' => [
- 'description' => '',
- 'example' => '6f1f730e732b232ccbdd85abc751****',
- 'type' => 'string',
- ],
- 'Reason' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
+ 'Pass' => ['description' => '', 'example' => 'true', 'type' => 'boolean'],
+ 'VerificationToken' => ['description' => '', 'example' => '6f1f730e732b232ccbdd85abc751****', 'type' => 'string'],
+ 'Reason' => ['description' => '', 'example' => '', 'type' => 'string'],
],
'type' => 'object',
],
@@ -139,9 +81,6 @@
],
],
'endpoints' => [
- [
- 'regionId' => 'cn-shanghai',
- 'endpoint' => 'facebody.cn-shanghai.aliyuncs.com',
- ],
+ ['regionId' => 'cn-shanghai', 'endpoint' => 'facebody.cn-shanghai.aliyuncs.com'],
],
];