Page MenuHomePhabricator

Implement a Google Cloud Vision labeling provider handler
Closed, ResolvedPublic

Description

We need a handler for Google Cloud Vision's image labeling API. Note that there is an official client library that we should probably use:

https://cloud.google.com/vision/docs/libraries#client-libraries-install-php

Related:
https://cloud.google.com/vision/docs/detecting-labels
https://cloud.google.com/vision/docs/supported-files

Note that ultimately this will have to deal with the Google->Wikidata concept mapping that is yet to be created (T229678). Still, we can get the basic pieces in place now.

Event Timeline

From https://cloud.google.com/vision/docs/detecting-labels:

Note: Cloud Vision now supports offline asynchronous batch image annotation for all features. This asynchronous request supports up to 2000 image files and returns response JSON files that are stored in your Google Cloud Storage bucket. For more information about this feature, refer to Offline batch image annotation.

@Ramsey-WMF Do we have an org-level Cloud Storage bucket? This is probably the optimal way to go.

Mholloway raised the priority of this task from Medium to High.Aug 19 2019, 10:05 PM

Change 531514 had a related patch set uploaded (by Mholloway; owner: Michael Holloway):
[mediawiki/extensions/MachineVision@master] Implement Google Cloud Vision label request handler

https://gerrit.wikimedia.org/r/531514

Change 531514 merged by jenkins-bot:
[mediawiki/extensions/MachineVision@master] Implement Google Cloud Vision label request handler

https://gerrit.wikimedia.org/r/531514