/* * Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ namespace TencentCloud.Iai.V20180301 { using Newtonsoft.Json; using System.Threading.Tasks; using TencentCloud.Common; using TencentCloud.Common.Profile; using TencentCloud.Iai.V20180301.Models; public class IaiClient : AbstractClient{ private const string endpoint = "iai.tencentcloudapi.com"; private const string version = "2018-03-01"; /// /// Client constructor. /// /// Credentials. /// Region name, such as "ap-guangzhou". public IaiClient(Credential credential, string region) : this(credential, region, new ClientProfile()) { } /// /// Client Constructor. /// /// Credentials. /// Region name, such as "ap-guangzhou". /// Client profiles. public IaiClient(Credential credential, string region, ClientProfile profile) : base(endpoint, version, credential, region, profile) { } /// /// 对请求图片进行五官定位(也称人脸关键点定位),计算构成人脸轮廓的 90 个点,包括眉毛(左右各 8 点)、眼睛(左右各 8 点)、鼻子(13 点)、嘴巴(22 点)、脸型轮廓(21 点)、眼珠[或瞳孔](2点)。 /// /// > /// - 公共参数中的签名方式请使用V3版本,即配置SignatureMethod参数为TC3-HMAC-SHA256。 /// /// /// public async Task AnalyzeFace(AnalyzeFaceRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "AnalyzeFace"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 对请求图片进行五官定位(也称人脸关键点定位),计算构成人脸轮廓的 90 个点,包括眉毛(左右各 8 点)、眼睛(左右各 8 点)、鼻子(13 点)、嘴巴(22 点)、脸型轮廓(21 点)、眼珠[或瞳孔](2点)。 /// /// > /// - 公共参数中的签名方式请使用V3版本,即配置SignatureMethod参数为TC3-HMAC-SHA256。 /// /// /// public AnalyzeFaceResponse AnalyzeFaceSync(AnalyzeFaceRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "AnalyzeFace"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 对指定的人员库进行人员查重,给出疑似相同人的信息。 /// /// 可以使用本接口对已有的单个人员库进行人员查重,避免同一人在单个人员库中拥有多个身份;也可以使用本接口对已有的多个人员库进行人员查重,查询同一人是否同时存在多个人员库中。 /// /// 不支持跨算法模型版本查重,且目前仅支持算法模型为3.0的人员库使用查重功能。 /// /// > /// - 若对完全相同的指定人员库进行查重操作,需等待上次操作完成才可。即,若两次请求输入的 GroupIds 相同,第一次请求若未完成,第二次请求将返回失败。 /// /// > /// - 查重的人员库状态为腾讯云开始进行查重任务的那一刻,即您可以理解为当您发起查重请求后,若您的查重任务需要排队,在排队期间您对人员库的增删操作均会会影响查重的结果。腾讯云将以开始进行查重任务的那一刻人员库的状态进行查重。查重任务开始后,您对人员库的任何操作均不影响查重任务的进行。但建议查重任务开始后,请不要对人员库中人员和人脸进行增删操作。 /// /// /// public async Task CheckSimilarPerson(CheckSimilarPersonRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "CheckSimilarPerson"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 对指定的人员库进行人员查重,给出疑似相同人的信息。 /// /// 可以使用本接口对已有的单个人员库进行人员查重,避免同一人在单个人员库中拥有多个身份;也可以使用本接口对已有的多个人员库进行人员查重,查询同一人是否同时存在多个人员库中。 /// /// 不支持跨算法模型版本查重,且目前仅支持算法模型为3.0的人员库使用查重功能。 /// /// > /// - 若对完全相同的指定人员库进行查重操作,需等待上次操作完成才可。即,若两次请求输入的 GroupIds 相同,第一次请求若未完成,第二次请求将返回失败。 /// /// > /// - 查重的人员库状态为腾讯云开始进行查重任务的那一刻,即您可以理解为当您发起查重请求后,若您的查重任务需要排队,在排队期间您对人员库的增删操作均会会影响查重的结果。腾讯云将以开始进行查重任务的那一刻人员库的状态进行查重。查重任务开始后,您对人员库的任何操作均不影响查重任务的进行。但建议查重任务开始后,请不要对人员库中人员和人脸进行增删操作。 /// /// /// public CheckSimilarPersonResponse CheckSimilarPersonSync(CheckSimilarPersonRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "CheckSimilarPerson"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 对两张图片中的人脸进行相似度比对,返回人脸相似度分数。 /// /// 若您需要判断 “此人是否是某人”,即验证某张图片中的人是否是已知身份的某人,如常见的人脸登录场景,建议使用[人脸验证](https://cloud.tencent.com/document/product/867/32806)或[人员验证](https://cloud.tencent.com/document/product/867/38879)接口。 /// /// > /// - 公共参数中的签名方式请使用V3版本,即配置SignatureMethod参数为TC3-HMAC-SHA256。 /// /// /// public async Task CompareFace(CompareFaceRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "CompareFace"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 对两张图片中的人脸进行相似度比对,返回人脸相似度分数。 /// /// 若您需要判断 “此人是否是某人”,即验证某张图片中的人是否是已知身份的某人,如常见的人脸登录场景,建议使用[人脸验证](https://cloud.tencent.com/document/product/867/32806)或[人员验证](https://cloud.tencent.com/document/product/867/38879)接口。 /// /// > /// - 公共参数中的签名方式请使用V3版本,即配置SignatureMethod参数为TC3-HMAC-SHA256。 /// /// /// public CompareFaceResponse CompareFaceSync(CompareFaceRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "CompareFace"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 将已存在于某人员库的人员复制到其他人员库,该人员的描述信息不会被复制。单个人员最多只能同时存在100个人员库中。 /// > /// - 注:若该人员创建时算法模型版本为2.0,复制到非2.0算法模型版本的Group中时,复制操作将会失败。 /// /// /// public async Task CopyPerson(CopyPersonRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "CopyPerson"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 将已存在于某人员库的人员复制到其他人员库,该人员的描述信息不会被复制。单个人员最多只能同时存在100个人员库中。 /// > /// - 注:若该人员创建时算法模型版本为2.0,复制到非2.0算法模型版本的Group中时,复制操作将会失败。 /// /// /// public CopyPersonResponse CopyPersonSync(CopyPersonRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "CopyPerson"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 将一组人脸图片添加到一个人员中。一个人员最多允许包含 5 张图片。若该人员存在多个人员库中,所有人员库中该人员图片均会增加。 /// /// > /// - 公共参数中的签名方式请使用V3版本,即配置SignatureMethod参数为TC3-HMAC-SHA256。 /// /// /// public async Task CreateFace(CreateFaceRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "CreateFace"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 将一组人脸图片添加到一个人员中。一个人员最多允许包含 5 张图片。若该人员存在多个人员库中,所有人员库中该人员图片均会增加。 /// /// > /// - 公共参数中的签名方式请使用V3版本,即配置SignatureMethod参数为TC3-HMAC-SHA256。 /// /// /// public CreateFaceResponse CreateFaceSync(CreateFaceRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "CreateFace"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 用于创建一个空的人员库,如果人员库已存在返回错误。 /// 可根据需要创建自定义描述字段,用于辅助描述该人员库下的人员信息。 /// /// 1个APPID下最多创建10万个人员库(Group)、最多包含5000万张人脸(Face)。 /// /// 不同算法模型版本(FaceModelVersion)的人员库(Group)最多可包含人脸(Face)数不同。算法模型版本为2.0的人员库最多包含100万张人脸,算法模型版本为3.0的人员库最多可包含300万张人脸。 /// /// /// public async Task CreateGroup(CreateGroupRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "CreateGroup"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 用于创建一个空的人员库,如果人员库已存在返回错误。 /// 可根据需要创建自定义描述字段,用于辅助描述该人员库下的人员信息。 /// /// 1个APPID下最多创建10万个人员库(Group)、最多包含5000万张人脸(Face)。 /// /// 不同算法模型版本(FaceModelVersion)的人员库(Group)最多可包含人脸(Face)数不同。算法模型版本为2.0的人员库最多包含100万张人脸,算法模型版本为3.0的人员库最多可包含300万张人脸。 /// /// /// public CreateGroupResponse CreateGroupSync(CreateGroupRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "CreateGroup"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 创建人员,添加人脸、姓名、性别及其他相关信息。 /// /// > /// - 公共参数中的签名方式请使用V3版本,即配置SignatureMethod参数为TC3-HMAC-SHA256。 /// /// /// public async Task CreatePerson(CreatePersonRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "CreatePerson"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 创建人员,添加人脸、姓名、性别及其他相关信息。 /// /// > /// - 公共参数中的签名方式请使用V3版本,即配置SignatureMethod参数为TC3-HMAC-SHA256。 /// /// /// public CreatePersonResponse CreatePersonSync(CreatePersonRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "CreatePerson"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 删除一个人员下的人脸图片。如果该人员只有一张人脸图片,则返回错误。 /// /// /// public async Task DeleteFace(DeleteFaceRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "DeleteFace"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 删除一个人员下的人脸图片。如果该人员只有一张人脸图片,则返回错误。 /// /// /// public DeleteFaceResponse DeleteFaceSync(DeleteFaceRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "DeleteFace"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 删除该人员库及包含的所有的人员。同时,人员对应的所有人脸信息将被删除。若某人员同时存在多个人员库中,该人员不会被删除,但属于该人员库中的自定义描述字段信息会被删除,属于其他人员库的自定义描述字段信息不受影响。 /// /// /// public async Task DeleteGroup(DeleteGroupRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "DeleteGroup"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 删除该人员库及包含的所有的人员。同时,人员对应的所有人脸信息将被删除。若某人员同时存在多个人员库中,该人员不会被删除,但属于该人员库中的自定义描述字段信息会被删除,属于其他人员库的自定义描述字段信息不受影响。 /// /// /// public DeleteGroupResponse DeleteGroupSync(DeleteGroupRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "DeleteGroup"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 删除该人员信息,此操作会导致所有人员库均删除此人员。同时,该人员的所有人脸信息将被删除。 /// /// /// public async Task DeletePerson(DeletePersonRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "DeletePerson"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 删除该人员信息,此操作会导致所有人员库均删除此人员。同时,该人员的所有人脸信息将被删除。 /// /// /// public DeletePersonResponse DeletePersonSync(DeletePersonRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "DeletePerson"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 从某人员库中删除人员,此操作仅影响该人员库。若该人员仅存在于指定的人员库中,该人员将被删除,其所有的人脸信息也将被删除。 /// /// /// public async Task DeletePersonFromGroup(DeletePersonFromGroupRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "DeletePersonFromGroup"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 从某人员库中删除人员,此操作仅影响该人员库。若该人员仅存在于指定的人员库中,该人员将被删除,其所有的人脸信息也将被删除。 /// /// /// public DeletePersonFromGroupResponse DeletePersonFromGroupSync(DeletePersonFromGroupRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "DeletePersonFromGroup"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 检测给定图片中的人脸(Face)的位置、相应的面部属性和人脸质量信息,位置包括 (x,y,w,h),面部属性包括性别(gender)、年龄(age)、表情(expression)、魅力(beauty)、眼镜(glass)、发型(hair)、口罩(mask)和姿态 (pitch,roll,yaw),人脸质量信息包括整体质量分(score)、模糊分(sharpness)、光照分(brightness)和五官遮挡分(completeness)。 /// /// /// 其中,人脸质量信息主要用于评价输入的人脸图片的质量。在使用人脸识别服务时,建议您对输入的人脸图片进行质量检测,提升后续业务处理的效果。该功能的应用场景包括: /// /// 1) 人员库[创建人员](https://cloud.tencent.com/document/product/867/32793)/[增加人脸](https://cloud.tencent.com/document/product/867/32795):保证人员人脸信息的质量,便于后续的业务处理。 /// /// 2) [人脸搜索](https://cloud.tencent.com/document/product/867/32798):保证输入的图片质量,快速准确匹配到对应的人员。 /// /// 3) [人脸验证](https://cloud.tencent.com/document/product/867/32806):保证人脸信息的质量,避免明明是本人却认证不通过的情况。 /// /// 4) [人脸融合](https://cloud.tencent.com/product/facefusion):保证上传的人脸质量,人脸融合的效果更好。 /// /// > /// - 公共参数中的签名方式请使用V3版本,即配置SignatureMethod参数为TC3-HMAC-SHA256。 /// /// /// /// public async Task DetectFace(DetectFaceRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "DetectFace"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 检测给定图片中的人脸(Face)的位置、相应的面部属性和人脸质量信息,位置包括 (x,y,w,h),面部属性包括性别(gender)、年龄(age)、表情(expression)、魅力(beauty)、眼镜(glass)、发型(hair)、口罩(mask)和姿态 (pitch,roll,yaw),人脸质量信息包括整体质量分(score)、模糊分(sharpness)、光照分(brightness)和五官遮挡分(completeness)。 /// /// /// 其中,人脸质量信息主要用于评价输入的人脸图片的质量。在使用人脸识别服务时,建议您对输入的人脸图片进行质量检测,提升后续业务处理的效果。该功能的应用场景包括: /// /// 1) 人员库[创建人员](https://cloud.tencent.com/document/product/867/32793)/[增加人脸](https://cloud.tencent.com/document/product/867/32795):保证人员人脸信息的质量,便于后续的业务处理。 /// /// 2) [人脸搜索](https://cloud.tencent.com/document/product/867/32798):保证输入的图片质量,快速准确匹配到对应的人员。 /// /// 3) [人脸验证](https://cloud.tencent.com/document/product/867/32806):保证人脸信息的质量,避免明明是本人却认证不通过的情况。 /// /// 4) [人脸融合](https://cloud.tencent.com/product/facefusion):保证上传的人脸质量,人脸融合的效果更好。 /// /// > /// - 公共参数中的签名方式请使用V3版本,即配置SignatureMethod参数为TC3-HMAC-SHA256。 /// /// /// /// public DetectFaceResponse DetectFaceSync(DetectFaceRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "DetectFace"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 用于对用户上传的静态图片进行人脸活体检测。与动态活体检测的区别是:静态活体检测中,用户不需要通过唇语或摇头眨眼等动作来识别。 /// /// 静态活体检测适用于手机自拍的场景,或对防攻击要求不高的场景。如果对活体检测有更高安全性要求,请使用[人脸核身·云智慧眼](https://cloud.tencent.com/product/faceid)产品。 /// /// > /// - 图片的宽高比请接近3:4,不符合宽高比的图片返回的分值不具备参考意义。本接口适用于类手机自拍场景,非类手机自拍照返回的分值不具备参考意义。 /// /// > /// - 公共参数中的签名方式请使用V3版本,即配置SignatureMethod参数为TC3-HMAC-SHA256。 /// /// /// public async Task DetectLiveFace(DetectLiveFaceRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "DetectLiveFace"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 用于对用户上传的静态图片进行人脸活体检测。与动态活体检测的区别是:静态活体检测中,用户不需要通过唇语或摇头眨眼等动作来识别。 /// /// 静态活体检测适用于手机自拍的场景,或对防攻击要求不高的场景。如果对活体检测有更高安全性要求,请使用[人脸核身·云智慧眼](https://cloud.tencent.com/product/faceid)产品。 /// /// > /// - 图片的宽高比请接近3:4,不符合宽高比的图片返回的分值不具备参考意义。本接口适用于类手机自拍场景,非类手机自拍照返回的分值不具备参考意义。 /// /// > /// - 公共参数中的签名方式请使用V3版本,即配置SignatureMethod参数为TC3-HMAC-SHA256。 /// /// /// public DetectLiveFaceResponse DetectLiveFaceSync(DetectLiveFaceRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "DetectLiveFace"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 获取若要开始一个人员查重任务,这个任务结束的预估时间。 /// /// 若EndTimestamp符合您预期,请您尽快发起人员查重请求,否则导致可能需要更多处理时间。 /// /// 若预估时间超过5小时,则无法使用人员查重功能。 /// /// /// public async Task EstimateCheckSimilarPersonCostTime(EstimateCheckSimilarPersonCostTimeRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "EstimateCheckSimilarPersonCostTime"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 获取若要开始一个人员查重任务,这个任务结束的预估时间。 /// /// 若EndTimestamp符合您预期,请您尽快发起人员查重请求,否则导致可能需要更多处理时间。 /// /// 若预估时间超过5小时,则无法使用人员查重功能。 /// /// /// public EstimateCheckSimilarPersonCostTimeResponse EstimateCheckSimilarPersonCostTimeSync(EstimateCheckSimilarPersonCostTimeRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "EstimateCheckSimilarPersonCostTime"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 获取人员查重任务列表,按任务创建时间逆序(最新的在前面)。 /// /// 只保留最近1年的数据。 /// /// /// public async Task GetCheckSimilarPersonJobIdList(GetCheckSimilarPersonJobIdListRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "GetCheckSimilarPersonJobIdList"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 获取人员查重任务列表,按任务创建时间逆序(最新的在前面)。 /// /// 只保留最近1年的数据。 /// /// /// public GetCheckSimilarPersonJobIdListResponse GetCheckSimilarPersonJobIdListSync(GetCheckSimilarPersonJobIdListRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "GetCheckSimilarPersonJobIdList"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 获取人员库信息。 /// /// /// public async Task GetGroupInfo(GetGroupInfoRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "GetGroupInfo"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 获取人员库信息。 /// /// /// public GetGroupInfoResponse GetGroupInfoSync(GetGroupInfoRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "GetGroupInfo"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 获取人员库列表。 /// /// /// public async Task GetGroupList(GetGroupListRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "GetGroupList"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 获取人员库列表。 /// /// /// public GetGroupListResponse GetGroupListSync(GetGroupListRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "GetGroupList"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 获取指定人员的信息,包括姓名、性别、人脸等。 /// /// /// public async Task GetPersonBaseInfo(GetPersonBaseInfoRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "GetPersonBaseInfo"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 获取指定人员的信息,包括姓名、性别、人脸等。 /// /// /// public GetPersonBaseInfoResponse GetPersonBaseInfoSync(GetPersonBaseInfoRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "GetPersonBaseInfo"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 获取指定人员的信息,包括加入的人员库、描述内容等。 /// /// /// public async Task GetPersonGroupInfo(GetPersonGroupInfoRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "GetPersonGroupInfo"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 获取指定人员的信息,包括加入的人员库、描述内容等。 /// /// /// public GetPersonGroupInfoResponse GetPersonGroupInfoSync(GetPersonGroupInfoRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "GetPersonGroupInfo"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 获取指定人员库中的人员列表。 /// /// /// public async Task GetPersonList(GetPersonListRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "GetPersonList"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 获取指定人员库中的人员列表。 /// /// /// public GetPersonListResponse GetPersonListSync(GetPersonListRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "GetPersonList"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 获取指定人员库中人员数量。 /// /// /// public async Task GetPersonListNum(GetPersonListNumRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "GetPersonListNum"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 获取指定人员库中人员数量。 /// /// /// public GetPersonListNumResponse GetPersonListNumSync(GetPersonListNumRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "GetPersonListNum"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 获取人员查重接口(CheckSimilarPerson)结果。 /// /// /// public async Task GetSimilarPersonResult(GetSimilarPersonResultRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "GetSimilarPersonResult"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 获取人员查重接口(CheckSimilarPerson)结果。 /// /// /// public GetSimilarPersonResultResponse GetSimilarPersonResultSync(GetSimilarPersonResultRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "GetSimilarPersonResult"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 修改人员库名称、备注、自定义描述字段名称。 /// /// /// public async Task ModifyGroup(ModifyGroupRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "ModifyGroup"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 修改人员库名称、备注、自定义描述字段名称。 /// /// /// public ModifyGroupResponse ModifyGroupSync(ModifyGroupRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "ModifyGroup"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 修改人员信息,包括名称、性别等。人员名称和性别修改会同步到包含该人员的所有人员库。 /// /// /// public async Task ModifyPersonBaseInfo(ModifyPersonBaseInfoRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "ModifyPersonBaseInfo"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 修改人员信息,包括名称、性别等。人员名称和性别修改会同步到包含该人员的所有人员库。 /// /// /// public ModifyPersonBaseInfoResponse ModifyPersonBaseInfoSync(ModifyPersonBaseInfoRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "ModifyPersonBaseInfo"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 修改指定人员库人员描述内容。 /// /// /// public async Task ModifyPersonGroupInfo(ModifyPersonGroupInfoRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "ModifyPersonGroupInfo"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 修改指定人员库人员描述内容。 /// /// /// public ModifyPersonGroupInfoResponse ModifyPersonGroupInfoSync(ModifyPersonGroupInfoRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "ModifyPersonGroupInfo"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 用于对一张待识别的人脸图片,在一个或多个人员库中识别出最相似的 TopK 人员,识别结果按照相似度从大到小排序。 /// /// 支持一次性识别图片中的最多 10 张人脸,支持一次性跨 100 个人员库(Group)搜索。 /// /// 单次搜索的人员库人脸总数量和人员库的算法模型版本(FaceModelVersion)相关。算法模型版本为2.0的人员库,单次搜索人员库人脸总数量不得超过 100 万张;算法模型版本为3.0的人员库,单次搜索人员库人脸总数量不得超过 300 万张。 /// /// 与[人员搜索](https://cloud.tencent.com/document/product/867/38881)及[人员搜索按库返回](https://cloud.tencent.com/document/product/867/38880)接口不同的是,本接口将该人员(Person)下的每个人脸(Face)都作为单独个体进行验证,而人员搜索及人员搜索按库返回接口 会将该人员(Person)下的所有人脸(Face)进行融合特征处理,即若某个Person下有4张 Face,本接口会将4张 Face 的特征进行融合处理,生成对应这个 Person 的特征,使搜索更加准确。 /// /// /// 本接口需与[人员库管理相关接口](https://cloud.tencent.com/document/product/867/32794)结合使用。 /// /// > /// - 公共参数中的签名方式请使用V3版本,即配置SignatureMethod参数为TC3-HMAC-SHA256。 /// /// /// public async Task SearchFaces(SearchFacesRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "SearchFaces"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 用于对一张待识别的人脸图片,在一个或多个人员库中识别出最相似的 TopK 人员,识别结果按照相似度从大到小排序。 /// /// 支持一次性识别图片中的最多 10 张人脸,支持一次性跨 100 个人员库(Group)搜索。 /// /// 单次搜索的人员库人脸总数量和人员库的算法模型版本(FaceModelVersion)相关。算法模型版本为2.0的人员库,单次搜索人员库人脸总数量不得超过 100 万张;算法模型版本为3.0的人员库,单次搜索人员库人脸总数量不得超过 300 万张。 /// /// 与[人员搜索](https://cloud.tencent.com/document/product/867/38881)及[人员搜索按库返回](https://cloud.tencent.com/document/product/867/38880)接口不同的是,本接口将该人员(Person)下的每个人脸(Face)都作为单独个体进行验证,而人员搜索及人员搜索按库返回接口 会将该人员(Person)下的所有人脸(Face)进行融合特征处理,即若某个Person下有4张 Face,本接口会将4张 Face 的特征进行融合处理,生成对应这个 Person 的特征,使搜索更加准确。 /// /// /// 本接口需与[人员库管理相关接口](https://cloud.tencent.com/document/product/867/32794)结合使用。 /// /// > /// - 公共参数中的签名方式请使用V3版本,即配置SignatureMethod参数为TC3-HMAC-SHA256。 /// /// /// public SearchFacesResponse SearchFacesSync(SearchFacesRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "SearchFaces"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 用于对一张待识别的人脸图片,在一个或多个人员库中识别出最相似的 TopK 人员,按照**人员库的维度**以人员相似度从大到小顺序排列。 /// /// 支持一次性识别图片中的最多 10 张人脸,支持跨人员库(Group)搜索。 /// /// 单次搜索的人员库人脸总数量和人员库的算法模型版本(FaceModelVersion)相关。算法模型版本为2.0的人员库,单次搜索人员库人脸总数量不得超过 100 万张;算法模型版本为3.0的人员库,单次搜索人员库人脸总数量不得超过 300 万张。 /// /// 与[人员搜索](https://cloud.tencent.com/document/product/867/38881)及[人员搜索按库返回](https://cloud.tencent.com/document/product/867/38880)接口不同的是,本接口将该人员(Person)下的每个人脸(Face)都作为单独个体进行验证,而[人员搜索](https://cloud.tencent.com/document/product/867/38881)及[人员搜索按库返回](https://cloud.tencent.com/document/product/867/38880)接口 会将该人员(Person)下的所有人脸(Face)进行融合特征处理,即若某个Person下有4张 Face,本接口会将4张 Face 的特征进行融合处理,生成对应这个 Person 的特征,使搜索更加准确。 /// /// 本接口需与[人员库管理相关接口](https://cloud.tencent.com/document/product/867/32794)结合使用。 /// /// > /// - 公共参数中的签名方式请使用V3版本,即配置SignatureMethod参数为TC3-HMAC-SHA256。 /// /// /// /// public async Task SearchFacesReturnsByGroup(SearchFacesReturnsByGroupRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "SearchFacesReturnsByGroup"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 用于对一张待识别的人脸图片,在一个或多个人员库中识别出最相似的 TopK 人员,按照**人员库的维度**以人员相似度从大到小顺序排列。 /// /// 支持一次性识别图片中的最多 10 张人脸,支持跨人员库(Group)搜索。 /// /// 单次搜索的人员库人脸总数量和人员库的算法模型版本(FaceModelVersion)相关。算法模型版本为2.0的人员库,单次搜索人员库人脸总数量不得超过 100 万张;算法模型版本为3.0的人员库,单次搜索人员库人脸总数量不得超过 300 万张。 /// /// 与[人员搜索](https://cloud.tencent.com/document/product/867/38881)及[人员搜索按库返回](https://cloud.tencent.com/document/product/867/38880)接口不同的是,本接口将该人员(Person)下的每个人脸(Face)都作为单独个体进行验证,而[人员搜索](https://cloud.tencent.com/document/product/867/38881)及[人员搜索按库返回](https://cloud.tencent.com/document/product/867/38880)接口 会将该人员(Person)下的所有人脸(Face)进行融合特征处理,即若某个Person下有4张 Face,本接口会将4张 Face 的特征进行融合处理,生成对应这个 Person 的特征,使搜索更加准确。 /// /// 本接口需与[人员库管理相关接口](https://cloud.tencent.com/document/product/867/32794)结合使用。 /// /// > /// - 公共参数中的签名方式请使用V3版本,即配置SignatureMethod参数为TC3-HMAC-SHA256。 /// /// /// /// public SearchFacesReturnsByGroupResponse SearchFacesReturnsByGroupSync(SearchFacesReturnsByGroupRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "SearchFacesReturnsByGroup"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 用于对一张待识别的人脸图片,在一个或多个人员库中识别出最相似的 TopK 人员,按照相似度从大到小排列。 /// /// 支持一次性识别图片中的最多 10 张人脸,支持一次性跨 100 个人员库(Group)搜索。 /// /// 单次搜索的人员库人脸总数量和人员库的算法模型版本(FaceModelVersion)相关。算法模型版本为2.0的人员库,单次搜索人员库人脸总数量不得超过 100 万张;算法模型版本为3.0的人员库,单次搜索人员库人脸总数量不得超过 300 万张。 /// /// 本接口会将该人员(Person)下的所有人脸(Face)进行融合特征处理,即若某个 Person 下有4张 Face ,本接口会将4张 Face 的特征进行融合处理,生成对应这个 Person 的特征,使人员搜索(确定待识别的人脸图片是某人)更加准确。而[人脸搜索](https://cloud.tencent.com/document/product/867/32798)及[人脸搜索按库返回接口](https://cloud.tencent.com/document/product/867/38882)将该人员(Person)下的每个人脸(Face)都作为单独个体进行搜索。 /// /// > /// - 公共参数中的签名方式请使用V3版本,即配置SignatureMethod参数为TC3-HMAC-SHA256。 /// - 仅支持算法模型版本(FaceModelVersion)为3.0的人员库。 /// /// /// public async Task SearchPersons(SearchPersonsRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "SearchPersons"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 用于对一张待识别的人脸图片,在一个或多个人员库中识别出最相似的 TopK 人员,按照相似度从大到小排列。 /// /// 支持一次性识别图片中的最多 10 张人脸,支持一次性跨 100 个人员库(Group)搜索。 /// /// 单次搜索的人员库人脸总数量和人员库的算法模型版本(FaceModelVersion)相关。算法模型版本为2.0的人员库,单次搜索人员库人脸总数量不得超过 100 万张;算法模型版本为3.0的人员库,单次搜索人员库人脸总数量不得超过 300 万张。 /// /// 本接口会将该人员(Person)下的所有人脸(Face)进行融合特征处理,即若某个 Person 下有4张 Face ,本接口会将4张 Face 的特征进行融合处理,生成对应这个 Person 的特征,使人员搜索(确定待识别的人脸图片是某人)更加准确。而[人脸搜索](https://cloud.tencent.com/document/product/867/32798)及[人脸搜索按库返回接口](https://cloud.tencent.com/document/product/867/38882)将该人员(Person)下的每个人脸(Face)都作为单独个体进行搜索。 /// /// > /// - 公共参数中的签名方式请使用V3版本,即配置SignatureMethod参数为TC3-HMAC-SHA256。 /// - 仅支持算法模型版本(FaceModelVersion)为3.0的人员库。 /// /// /// public SearchPersonsResponse SearchPersonsSync(SearchPersonsRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "SearchPersons"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 用于对一张待识别的人脸图片,在一个或多个人员库中识别出最相似的 TopK 人员,按照**人员库的维度**以人员相似度从大到小顺序排列。 /// /// 支持一次性识别图片中的最多 10 张人脸,支持跨人员库(Group)搜索。 /// /// 单次搜索的人员库人脸总数量和人员库的算法模型版本(FaceModelVersion)相关。算法模型版本为2.0的人员库,单次搜索人员库人脸总数量不得超过 100 万张;算法模型版本为3.0的人员库,单次搜索人员库人脸总数量不得超过 300 万张。 /// /// 本接口会将该人员(Person)下的所有人脸(Face)进行融合特征处理,即若某个 Person 下有4张 Face ,本接口会将4张 Face 的特征进行融合处理,生成对应这个 Person 的特征,使人员搜索(确定待识别的人脸图片是某人)更加准确。而[人脸搜索](https://cloud.tencent.com/document/product/867/32798)及[人脸搜索按库返回接口](https://cloud.tencent.com/document/product/867/38882)将该人员(Person)下的每个人脸(Face)都作为单独个体进行搜索。 /// > /// - 公共参数中的签名方式请使用V3版本,即配置SignatureMethod参数为TC3-HMAC-SHA256。 /// - 仅支持算法模型版本(FaceModelVersion)为3.0的人员库。 /// /// /// public async Task SearchPersonsReturnsByGroup(SearchPersonsReturnsByGroupRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "SearchPersonsReturnsByGroup"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 用于对一张待识别的人脸图片,在一个或多个人员库中识别出最相似的 TopK 人员,按照**人员库的维度**以人员相似度从大到小顺序排列。 /// /// 支持一次性识别图片中的最多 10 张人脸,支持跨人员库(Group)搜索。 /// /// 单次搜索的人员库人脸总数量和人员库的算法模型版本(FaceModelVersion)相关。算法模型版本为2.0的人员库,单次搜索人员库人脸总数量不得超过 100 万张;算法模型版本为3.0的人员库,单次搜索人员库人脸总数量不得超过 300 万张。 /// /// 本接口会将该人员(Person)下的所有人脸(Face)进行融合特征处理,即若某个 Person 下有4张 Face ,本接口会将4张 Face 的特征进行融合处理,生成对应这个 Person 的特征,使人员搜索(确定待识别的人脸图片是某人)更加准确。而[人脸搜索](https://cloud.tencent.com/document/product/867/32798)及[人脸搜索按库返回接口](https://cloud.tencent.com/document/product/867/38882)将该人员(Person)下的每个人脸(Face)都作为单独个体进行搜索。 /// > /// - 公共参数中的签名方式请使用V3版本,即配置SignatureMethod参数为TC3-HMAC-SHA256。 /// - 仅支持算法模型版本(FaceModelVersion)为3.0的人员库。 /// /// /// public SearchPersonsReturnsByGroupResponse SearchPersonsReturnsByGroupSync(SearchPersonsReturnsByGroupRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "SearchPersonsReturnsByGroup"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 给定一张人脸图片和一个 PersonId,判断图片中的人和 PersonId 对应的人是否为同一人。PersonId 请参考[人员库管理相关接口](https://cloud.tencent.com/document/product/867/32794)。 /// /// 与[人脸比对](https://cloud.tencent.com/document/product/867/32802)接口不同的是,人脸验证用于判断 “此人是否是此人”,“此人”的信息已存于人员库中,“此人”可能存在多张人脸图片;而[人脸比对](https://cloud.tencent.com/document/product/867/32802)用于判断两张人脸的相似度。 /// /// 与[人员验证](https://cloud.tencent.com/document/product/867/38879)接口不同的是,人脸验证将该人员(Person)下的每个人脸(Face)都作为单独个体进行验证,而[人员验证](https://cloud.tencent.com/document/product/867/38879)会将该人员(Person)下的所有人脸(Face)进行融合特征处理,即若某个 Person下有4张 Face,本接口会将4张 Face 的特征进行融合处理,生成对应这个 Person 的特征,使人员验证(确定待识别的人脸图片是某人员)更加准确。 /// /// > /// - 公共参数中的签名方式请使用V3版本,即配置SignatureMethod参数为TC3-HMAC-SHA256。 /// /// /// public async Task VerifyFace(VerifyFaceRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "VerifyFace"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 给定一张人脸图片和一个 PersonId,判断图片中的人和 PersonId 对应的人是否为同一人。PersonId 请参考[人员库管理相关接口](https://cloud.tencent.com/document/product/867/32794)。 /// /// 与[人脸比对](https://cloud.tencent.com/document/product/867/32802)接口不同的是,人脸验证用于判断 “此人是否是此人”,“此人”的信息已存于人员库中,“此人”可能存在多张人脸图片;而[人脸比对](https://cloud.tencent.com/document/product/867/32802)用于判断两张人脸的相似度。 /// /// 与[人员验证](https://cloud.tencent.com/document/product/867/38879)接口不同的是,人脸验证将该人员(Person)下的每个人脸(Face)都作为单独个体进行验证,而[人员验证](https://cloud.tencent.com/document/product/867/38879)会将该人员(Person)下的所有人脸(Face)进行融合特征处理,即若某个 Person下有4张 Face,本接口会将4张 Face 的特征进行融合处理,生成对应这个 Person 的特征,使人员验证(确定待识别的人脸图片是某人员)更加准确。 /// /// > /// - 公共参数中的签名方式请使用V3版本,即配置SignatureMethod参数为TC3-HMAC-SHA256。 /// /// /// public VerifyFaceResponse VerifyFaceSync(VerifyFaceRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "VerifyFace"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 给定一张人脸图片和一个 PersonId,判断图片中的人和 PersonId 对应的人是否为同一人。PersonId 请参考[人员库管理相关接口](https://cloud.tencent.com/document/product/867/32794)。 /// 本接口会将该人员(Person)下的所有人脸(Face)进行融合特征处理,即若某个Person下有4张 Face,本接口会将4张 Face 的特征进行融合处理,生成对应这个 Person 的特征,使人员验证(确定待识别的人脸图片是某人员)更加准确。 /// /// 和人脸比对相关接口不同的是,人脸验证相关接口用于判断 “此人是否是此人”,“此人”的信息已存于人员库中,“此人”可能存在多张人脸图片;而人脸比对相关接口用于判断两张人脸的相似度。 /// /// /// > /// - 公共参数中的签名方式请使用V3版本,即配置SignatureMethod参数为TC3-HMAC-SHA256。 /// - 仅支持算法模型版本(FaceModelVersion)为3.0的人员库。 /// /// /// public async Task VerifyPerson(VerifyPersonRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "VerifyPerson"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 给定一张人脸图片和一个 PersonId,判断图片中的人和 PersonId 对应的人是否为同一人。PersonId 请参考[人员库管理相关接口](https://cloud.tencent.com/document/product/867/32794)。 /// 本接口会将该人员(Person)下的所有人脸(Face)进行融合特征处理,即若某个Person下有4张 Face,本接口会将4张 Face 的特征进行融合处理,生成对应这个 Person 的特征,使人员验证(确定待识别的人脸图片是某人员)更加准确。 /// /// 和人脸比对相关接口不同的是,人脸验证相关接口用于判断 “此人是否是此人”,“此人”的信息已存于人员库中,“此人”可能存在多张人脸图片;而人脸比对相关接口用于判断两张人脸的相似度。 /// /// /// > /// - 公共参数中的签名方式请使用V3版本,即配置SignatureMethod参数为TC3-HMAC-SHA256。 /// - 仅支持算法模型版本(FaceModelVersion)为3.0的人员库。 /// /// /// public VerifyPersonResponse VerifyPersonSync(VerifyPersonRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "VerifyPerson"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } } }