图像识别

╰+攻爆jí腚メ 2021-11-10 19:26 542阅读 0赞

import requests
from aip import AipOcr

image = requests.get(‘https://timgsa.baidu.com/timg?image&quality=80&size=b9999\_10000&sec=1561018802199&di=a89a8bd343933040b1beea127012e9c4&imgtype=0&src=http%3A%2F%2Fgss0.baidu.com%2F-Po3dSag\_xI4khGko9WTAnF6hhy%2Fzhidao%2Fpic%2Fitem%2F342ac65c10385343705f67ac9113b07ecb8088af.jpg').content

APP_ID = ‘16149264’
API_KEY = ‘yxYg9r4OuAs4fYvfcl8tqCYd’
SECRET_KEY = ‘yWg3KMds2muFsWs7MBSSFcgMQl8Wng4s’

client = AipOcr(APP_ID, API_KEY, SECRET_KEY)
res = client.basicGeneral(image)
if ‘words_result’ in res.keys():
for item in res[‘words_result’]:
print(item[‘words’])
else:
print(res)

转载于:https://www.cnblogs.com/AlterMe/p/11058232.html

发表评论

表情:
评论列表 (有 0 条评论,542人围观)

还没有评论,来说两句吧...

相关阅读

    相关 keras图像识别

    终于抓住11月的尾部,赶在12月到来之前进行更新了,2018准备要跟我们说拜拜了,小伙伴们你们今年的目标实现了吗?,好了扯远了,今天趁着有时间更新一下博客,记录一下使用kera