是否有 Google 的愿景 API 会 return 的潜在标签的完整列表?

Is there a full list of potential labels that Google's Vision API will return?

我一直在测试 Google 的 Vision API 以将标签附加到不同的图像。

对于给定的图像,我会返回这样的信息:

"google_labels": {
            "responses": [{
                "labelAnnotations": [{
                    "score": 0.8966763,
                    "description": "food",
                    "mid": "/m/02wbm"
                }, {
                    "score": 0.80512983,
                    "description": "produce",
                    "mid": "/m/036qh8"
                }, {
                    "score": 0.73635191,
                    "description": "juice",
                    "mid": "/m/01z1kdw"
                }, {
                    "score": 0.69849229,
                    "description": "meal",
                    "mid": "/m/0krfg"
                }, {
                    "score": 0.53875387,
                    "description": "fruit",
                    "mid": "/m/02xwb"
                }]
            }]
        }

--> 我的问题是:

  1. 有人知道 Google 是否发布了他们的完整标签列表 (['produce', 'meal', ...]) 以及我在哪里可以找到它吗?
  2. 这些标签是否以任何方式构建? - 例如例如,是否知道 'food' 是 'produce' 的超集。

我猜是 'No' 和 'No',因为我找不到任何东西,但也许找不到。谢谢!

有一个 API 可以搜索它们,称为 Google 知识图 API:

https://developers.google.com/knowledge-graph/reference/rest/v1/

他们 link 它位于 Google 愿景的底部 API 文档 :

https://cloud.google.com/vision/docs/labels


编辑:更多信息

好的,以 /g/ 开头的 mids 是 google 实体,以 /m/ 开头的 mids 是 Freebase 标识符,但是 google kgraph API 不是 returns 他们总是。

这个数据是public,可以下载,但是数据库中的记录太多了,Google还没有公布他们使用了哪些。

视觉中返回的 MID 示例 api 和维基数据中的记录:

{
    desc: "institution",
    mid: "/m/01r28c",
    score: 72.29216694831848,
    confidence: 0,
    locations: [ ],
    properties: [ ]
},

https://www.wikidata.org/wiki/Q178706


最后的 freebase 转储可以在这里下载:

https://developers.google.com/freebase/

虽然我无法验证数据库的完整性,但 Google Open Images 项目有一个大约 20k 分类的列表。

如果您浏览到 download page you are able to download the list with those descriptions as CSV

我检查了 CloudVision 中的一些参考图像并得到了以下结果:

ID / CloudVision Classification / OpenImages Classification
1. 01ssh5 / Shoulder / Shoulder (Body Part)
2. 09cx8 / Finger / Finger
3. 068jd / Photograph / Photograph
4. 01k74n / Facial expression / Facial expression
5. 04hgtk / Head / Human Head

我能够在 CSV 中找到所有具有相同含义的 ID - 因此作为基本列表这应该足够了。请注意,您应该始终按 ID 进行匹配,而不是按分类进行匹配,因为有一些细微的变化。

如果您在 CloudVision 中找到任何 ID 但不在列表中,我很想在评论中知道!