client = AipFace(APP_ID, API_KEY, SECRET_KEY)
import base64
f=open(r'F:\python\人工智能\2百度识别\人脸识别\sxg.png','rb') #二进制方式打开图文件
image=base64.b64encode(f.read()) #读取文件内容,转换为base64编码
f.close()
imageType = "BASE64"
""" 调用人脸检测 """
result=client.detect(image,imageType)
print(result)
#######3
错误
C:\Users\sxg\AppData\Local\Programs\Python\Python37\python.exe F:/python/人工智能/2百度识别/人脸识别/1.截取人脸特征.py
Traceback (most recent call last):
File "F:/python/人工智能/2百度识别/人脸识别/1.截取人脸特征.py", line 15, in
result=client.detect(image,imageType)
收藏
点赞
0
个赞
请登录后评论
TOP
切换版块