Google Cloud Vision Service

Prev Next

1. Configure Google Cloud

  1. Go to Google Developers console https://console.developers.google.com

  2. Create a project or use an existing one by clicking Select a project.

    image49.png

  3. Search for Google Cloud Vision API service and click Enable (note, Google will ask for a payment card to confirm you are not a robot, though the trial period is free).

    image10.png

  4. Go to Credentials and create Service account key which is needed to allow Encodify access the Google Cloud Vision API.

    image33.png

  5. Select New service account, choose key type JSON and role depending on the permissions you want to give. After clicking Create the JSON file will be generated and downloaded to your local machine.

    image14.png

2. Configure Encodify system

2.1. Account configuration

Parameter

Description

Service Name

Descriptive name of the integration service. The name will be displayed in the configuration of “Send to connected service” action

Account

You can select from existing accounts or leave “Create new…” to create the new one on this step

Private Key

This field accepts a content of the JSON file, which is provided by Google and can be downloaded on your Cloud Platform Console Credentials page. Open the JSON file with a text editor and Copy-Paste its content into this field

image7.png

2.2. Service configuration

Parameter

Description

Module

A module in Encodify that will be used for storing data

Detect labels

Enables automatic label detection as a result of image processing.

Label Confidence Score

Controls filtering of the detected labels by confidence score. 


Note

  • Cloud Vision API has a confidence score threshold that is not documented, but looks like it is never under 50%. Therefore, confidence score values between 0.5 and 0 will return the same set of detected labels.

  • if no labels returned with score that is >= specified score, then field will be empty

Image properties

Enables automatic dominant colors detection as a result of image processing.

Screenshot 2024-04-15 at 11.43.12.png

2.3. Mappings

Parameter

Encodify Field Type

Description

Media Holder

File

Initial image will be uploaded to this field. Any available media holder can be selected

Label

Multiselect (text and module link)

Requires mapping when "Detect Labels" option is enabled.
Keeps the list of identified labels as a result of image analysis. 

Image Properties

Multiselect (text and module link)

Requires mapping when "Image Properties" are options is enabled.

Keeps the list of identified dominant colors as a result of image analysis-

image31.png

2.4. Actions configuration in the module

For the GoogleVision service to work, actions need to be configured in the module for which connected service was configured. 

The following events are available for the Send to connected service action:

  • Create

  • Update

  • Delete

  • Сreate and Update

  • Workflow

To create an aciton:

  1. Click Create Action in Actions menu in Module Configuration.

  2. Enter action name > select the event.

  3. Add filters if needed.

  4. Select Send to connected service in the Action field.

  5. Select the configured  google vision connected service. 

  6. Save.

Screenshot_2019-08-16_at_10.04.10.png

Please, note!

Action will be triggered only in case new file is uploaded to the mapped file field. This is valid for all type of events (except Delete). This means for example that connected service will not trigger tags generation if user updated an item without uploading new file, when connected service integration is configured for Update event.

3. Google Cloud Vision in use

Once the configuration is done, you can upload the image file (only JPG, PNG, GIF, BMP) to the mapped module field and the field mapped as Target will be filled in with tags that describe the image.

Note, for large images you will not see the result immediately as it will take some time while the image is sent to Google Cloud, analyzed and the result is returned back.

The Google service has limits regarding the number of processed images and their size. Please see this page: https://cloud.google.com/vision/quotas