Skip to content

Fetch google vision

image analysis3rd party APIintegrationmodel

Analyze images given their URL using the Google Vision API.

Labels and categorizes images to indicate whether they contain violent, parodic, adult, medical or racy elements.

API integration

To use this step your team needs to have the Google Vision integration configured in Graphext. The corresponding credentials are required to connect to a third-party API. You can configure API integrations following the INTEGRATIONS or ADD INTEGRATION link in the top-left corner of your Team's page, selecting API keys, and then the name of the desired third-party service.

To enable the Google Vision integration in particular you will need access to Google's Vision service. Follow the instructions shere to create the required API key.

Usage


The following are the step's expected inputs and outputs and their specific types.

Step signature
fetch_google_vision(target_col: url, {
    "param": value
}) -> (
    labels: list[category],
    violence: category,
    spoof: category,
    adult: category,
    medical: category,
    racy: category
)

where the object {"param": value} is optional in most cases and if present may contain any of the parameters described in the corresponding section below.

Example

The step has no configuration parameters, so it's simply

Example call (in recipe editor)
fetch_google_vision(ds.image_url) -> (
  ds.image_labels,
  ds.image_contains_violence,
  ds.image_is_spoof,
  ds.image_has_adult_content,
  ds.image_has_medical_content,
  ds.image_is_racy
)

Inputs


target_col: column:url

Direct URLs to the images to analyze, e.g. https://upload.wikimedia.org/wikipedia/commons/c/c7/Madrid_-_El_Oso_y_el_Madro%C3%B1o.jpg.

Outputs


labels: column:list[category]

Lists of entities identified in the picture.


violence: column:category

Indicates whether the image contains violence.


spoof: column:category

Indicates whether the image is a spoof (parody).


adult: column:category

Indicates whether the image features adult content.


medical: column:category

Indicates whether the image features medical content.


racy: column:category

Indicates whether the image features racy content.

Parameters


integration: string

ID of the integration you'd like to use.