Python API人脸身份证比对
ZHW_AI课题组 人气:01.作者介绍
钱文浩,男,西安工程大学电子信息学院,2021级研究生
研究方向:机器视觉与人工智能
电子邮件:2414712362@qq.com
刘帅波,男,西安工程大学电子信息学院,2021级研究生,张宏伟人工智能课题组
研究方向:机器视觉与人工智能
电子邮件:1461004501@qq.com
2.调用腾讯人脸SFZ比对的知识介绍
2.1 应用场景
3.调用腾讯云API步骤
3.1微信扫码登录
3.2鼠标选择云产品,并找到人脸核身
3.3进入人脸核身界面
3.4编辑参数
3.5查看自己的api
4.完整代码展示与结果
4.1完整代码
import json from tencentcloud.common import credential from tencentcloud.common.profile.client_profile import ClientProfile from tencentcloud.common.profile.http_profile import HttpProfile from tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException from tencentcloud.faceid.v20180301 import faceid_client, models try: cred = credential.Credential("你获取的SecretId", "你获取的SecretKey") httpProfile = HttpProfile() httpProfile.endpoint = "faceid.tencentcloudapi.com" clientProfile = ClientProfile() clientProfile.httpProfile = httpProfile client = faceid_client.FaceidClient(cred, "ap-beijing", clientProfile) req = models.ImageRecognitionRequest() params = { "IdCard": "************************", "Name": "****", "ImageBase64": "***************" } req.from_json_string(json.dumps(params)) resp = client.ImageRecognition(req) print(resp.to_json_string()) except TencentCloudSDKException as err: print(err)
4.2实验结果
加载全部内容