欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Python調用騰訊API實現人臉身份證比對功能

 更新時間:2022年04月04日 09:24:57   作者:ZHW_AI課題組  
這篇文章主要介紹了Python調用騰訊API進行人臉身份證比對,簡單介紹了調用騰訊云API步驟,通過完整代碼展示與結果,需要的朋友可以參考下

1.作者介紹

錢文浩,男,西安工程大學電子信息學院,2021級研究生
研究方向:機器視覺與人工智能
電子郵件:2414712362@qq.com

劉帥波,男,西安工程大學電子信息學院,2021級研究生,張宏偉人工智能課題組
研究方向:機器視覺與人工智能
電子郵件:1461004501@qq.com

2.調用騰訊人臉身份證比對的知識介紹

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實驗結果

到此這篇關于Python調用騰訊API進行人臉身份證比對的文章就介紹到這了,更多相關Python人臉身份證比對內容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關文章希望大家以后多多支持腳本之家!

相關文章

最新評論