Google Cloud Vision Web检测API仅返回10个响应 [英] Google cloud vision web detection API returns only 10 responses

查看:135
本文介绍了Google Cloud Vision Web检测API仅返回10个响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Google cloud vision网络检测API来检测图像的使用位置.但是,即使对于Google的徽标,我也总是最多得到10条回复.是API的限制,还是我丢失了一些东西,因为文档中没有提及.

I am using Google cloud vision web detection API for detecting where the images have been used. But I always get 10 responses maximum even for Google's logo. Is it limit of the API or I am missing something because there is nothing mentioned in documentation.

推荐答案

Cloud Vision API请求返回的默认结果数是10(以限制响应的大小),因此只有十个最准确的标识是回来.但是,您可以指定maxResults参数以便检索更大的结果列表.在这里,您有几个API调用示例,这些示例返回默认的10个实体,如果使用maxResults参数指定,则返回更多.您可以自己运行这些查询并查看结果:

The default number of results returned from Cloud Vision API requests is 10 (in order to limit the size of the responses), so only then ten most exact identifications are returned. However, you can specify the maxResults parameter in order to retrieve a larger list of results. Here you have a couple of examples of API calls that return the default 10 entities, or more if specified with the maxResults parameter. You can run these queries yourself and see the results:

  • First query without the maxResults parameter, returning 10 entities by default.
  • Second query with "maxResults": 30, returning 30 entities.

因此,要从此API调用中获得更多结果,唯一的区别是必须在features条目中添加以下额外参数:

So the only difference in order to obtain more results from this API call is that you must add this extra parameter in the features entry:

"features": [
    {
     "type": "WEB_DETECTION",
     "maxResults": 30
    }
   ]


还要注意,Google Cloud Vision的网络检测功能API仍在开发中,并且某些功能仍处于测试阶段.还有一个针对Web检测应用程序的具有更多功能的公共功能请求,您可以在以下公开发行版中进行跟踪跟踪器帖子.


Also note that the Web Detection functionality of Google Cloud Vision API is still under development and there are some features that are still in beta. There is also a public feature request with more functionalities for the web detection application that you can track in the following Public Issue Tracker post.

这篇关于Google Cloud Vision Web检测API仅返回10个响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆