是否有完整的潜在标签列表,Google的Vision API将返回?

Hil*_*ers 17 python google-app-engine google-cloud-vision

我一直在测试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"
                }]
            }]
        }
Run Code Online (Sandbox Code Playgroud)

- >我的问题是:

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

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

Jam*_*ron 10

While I can't verify the completeness of the database, the Google Open Images project has a list of around 20k classifications.

If you browse to the download page you are able to download the list with those descriptions as CSV.

I checked a few reference images within CloudVision and had the following results:

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
Run Code Online (Sandbox Code Playgroud)

I was able to find all IDs with the same meaning in the CSV - so as a base list this should be sufficient. Be aware that you should always match by ID, not by classification, as there are a few slight changes.

If you find any IDs in CloudVision but not in the list, I'd be interested to know in the comments!


Wil*_*iam 5

有一个 API 可以搜索它们,称为Google Knowledge Graph API:

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

他们将其链接到Google Vision API 文档的底部:

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


编辑:更多信息

好吧,以 /g/ 开头的 mids 是 google 实体,以 /m/ 开头的 mids 是 Freebase 标识符,但 google kgraph API 并不总是返回它们。

这些数据是公开的,可以下载,但数据库中的记录太多,谷歌尚未公布他们使用了哪些记录。

Vision api 中返回的 MID 和 Wikidata 中的记录示例:

{
    desc: "institution",
    mid: "/m/01r28c",
    score: 72.29216694831848,
    confidence: 0,
    locations: [ ],
    properties: [ ]
},
Run Code Online (Sandbox Code Playgroud)

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


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

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