Is there a complete list of potential labels that the Google Vision API will return?

I tested the Google Vision API for tagging various images.

For this image, I will return something like this:

"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" }] }] } 

-> My questions:

  • Does anyone know if Google published its complete list of shortcuts ( ['produce', 'meal', ...] ) and where could I find this?
  • Are these labels structured in any way? - eg. it is known that "food" is, for example, a superset of the "product".

I assume "No" and "No" because I could not find anything, but maybe not. Thanks!

+16
python google-app-engine google-cloud-vision
source share
2 answers

There is an API for searching by the name of the Google Knowledge Graph API :

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

They link it at the bottom of the Google Vision API Documentation :

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


Edit : more info

Well, averages starting with / g / are google objects, averages starting with / m / are Freebase identifiers, but the Google Maps API does not always return them.

This data is publicly available and can be downloaded, but there are too many records in the database, and Google has not published which of them they use.

MID example returned in vision api and Wikipedia entry:

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

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


The latest dump of the free base can be downloaded here:

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

+1
source share

Although I cannot verify the completeness of the database, the Google Open Images project has a list of approximately 20,000 classifications.

If you go to the download page, you can download a list with descriptions such as CSV .

I checked several reference images in CloudVision and got 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 

I managed to find all identifiers with the same value in CSV - so this should be enough as a base list. Keep in mind that you should always match by identifier, not by classification, as there are a few minor changes.

If you find any identifiers in CloudVision, but not in the list, I would be interested to know in the comments!

0
source share

All Articles