如何致电Google Vision Legacy模型?
我想使用旧版 text_detection
和 document_text_detection
模型。 (请参阅:)
我使用功能
以这种方式尝试:
import io
from google.cloud import vision
vision_client = vision.ImageAnnotatorClient()
with io.open("/mnt/d/snap.png", 'rb') as image_file:
content = image_file.read()
image = vision.Image(content=content)
response = vision_client.document_text_detection(image=image)
# print(response) --> uses stable models, works fine
feature = vision.Feature(model="builtin/legacy")
response = vision_client.document_text_detection(image=image, features=feature)
# print(response) --> throws error show below
我会收到以下错误:
TypeError: dict() got multiple values for keyword argument 'features'
我在做什么错?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试以下操作:
Try this: