获取token
# encoding:utf-8
import requests
# client_id 为官网获取的AK, client_secret 为官网获取的SK
host = 'https://aip.baidubce.com/oauth/2.0/token?grant_type=client_credentials&client_id=填入你的AK&client_secret=填入你的SK'
response = requests.get(host)
if response:
print(response.json())
进行人脸对比(即识别)
# encoding:utf-8
import requests
'''
将图片经过base64编码
'''
import base64
def img_to_base

该博客介绍了如何利用百度AI的API获取token,并进行人脸识别对比的过程,涉及图像处理和base64编码技术。
最低0.47元/天 解锁文章
592

被折叠的 条评论
为什么被折叠?



