Google Vision API
This plugin sends your images to Google's Cloud Vision API on upload, and sets appropriate metadata in pre-configured fields based on what has been recognised in the image.
The plugin can be found under the 'Asset processing' category
The plugin options page requires the following information to be provided:-
|Google API key||You must add the API key and ensure you have set up a Google billing account - see the Google Vision API quick start guide for more information|
|Field for suggested keywords||Select the metadata field that will store keywords suggested by Google Vision. This should be a Dynamic keywords list.|
|Field for landmarks||Select the metadata field that will store landmark information suggested by Google Vision. This should be a text field|
|Field for extracted text||Select the metadata field that will store extracted text. This should be a Text box.|
|Enabled resource types||Select the resource types that will be processed by Google Vision|
|Enabled feature detection||Select the feature detection options you require|
|Automatically set the title to the highest ranking keyword||Set to TRUE if you want to automatically populate the resource title field|
Facial detection (V9.0+)
|Field to store face detection data in (optional)||Select a field to enable and store face detection data (must be a large text multi-line text field)|
|Select a metadata field that will be hidden when facial recognition data field is empty (optional)||This can be useful if you want to force users to update a field e.g. 'people in photo' should faces be detected
Please note: as Google Vision processing utilises low resolution preview files enabling this will override settings that normally prevent preview generation at upload e.g. $enable_thumbnail_creation_on_upload and $offline_job_queue
|If storing face data, detect full faces and not just skin area||See this link for more information|
|Store verbose face detection data (includes all face data, locations of facial features and emotion detection information)||Facial recognition produces a lot of data that you may not require. Set to TRUE if you want to store ALL the data returned from the Google Vision API|
From version 8.6 Google Vision can also leverage AI automated tagging of your existing assets (in addition to new uploads).
Process existing collection resources
Google Vision plugin has a script which allows to process existing resources that have not been previously processed. From version 9.0 it will allow administrators to process exsiting resources found in collections.
To do this, all the administrator needs to do is run the script (once in the [webroot]/plugins/google_vision/pages) specifying the ID of the collection(s) using the "c" or "collection" options. Examples for collection #82 and #1:
php process_existing.php -c82 # short option php process_existing.php --collection=82 # long option php process_existing.php -c82 -c1 # multiple collections which works in both short and long option
Multilingual translation of keywords (9.3+)
The Google Vision API only returns English keywords. However, the separate translation API can be used to translate these to other languages. Ensure the Translation API is enabled in the Google console.
With a valid API entered and the translation API enabled you must then enter at least one language code. Multiple codes can be entered and keywords for different languages will be automatically retrieved.
You can optionally choose to keep the original English keywords, or replace those with the translated keywords.
These options can be different for certain user groups by using user group level configuration, for example one group could have the following in the group's config override:
...whereas another group could have different settings: