DETECT OBJECT ON IMAGE
=======================
ACTION DESCRIPTION
--------------------------------
DETECT OBJECT ON IMAGE from an image file returns a list of label. For each label, it returns a textual description, confidence score, and topicality (1) rating.
(1) Topicality: it is the relevancy of the ICA (Image Content Annotation) label to the image. For example, the relevancy of "tower" is likely higher to an image containing the detected "Eiffel Tower" than to an image containing a detected distant towering building, even though the confidence that there is a tower in each image may be the same.
STEP-BY-STEP SETUP
--------------------------------
The steps from 0) to 1) can be automatically performed by logging in into your Google Cloud Console, opening the Cloud Shell (top right corner of your page) and copy pasting this command and press enter:
wget -q
https://storage.googleapis.com/bubblegcpdemo/demo-assets/wiseable-gcp-vision.py && python3 wiseable-gcp-vision.py
Otherwise, follow these manual steps:
0) Set-up a project from Google Cloud Console :
https://cloud.google.com/video-intelligence/docs/common/auth#enabling_the_api - Create or select a project
- Enable the CLOUD VISION API for that project
- Create a service account
- Download a private key as JSON.
1) Open the private key JSON file with a text editor, copy/paste the following parameters from your file to the Plugin settings:
- CLIENT_EMAIL
- PROJECT_ID
- PRIVATE_KEY, including the -----BEGIN PRIVATE KEY-----\n prefix and \n-----END PRIVATE KEY-----\n suffix.
2) Set up the action "DETECT OBJECT ON IMAGE" in the workflow.
Inputs Fields :
- IMAGE : JPEG, PNG8, PNG24, GIF, Animated GIF (first frame only), BMP, WEBP, RAW, ICO, PDF, TIFF image file from the Bubble.io picture uploader, a Protocol-relative URLs (//server/image.jpg), or a HTTPS image URL (
https://server/image.jpg) or a Google Storage URL (gs://bucket/image.jpg).
- MAX RESULTS : Specify the maximum number of labels returned in the response. Default 5.
- OUTPUT TYPE : Returned type, must always be set to "RESULT (VISION)".
Output Fields :
- RESULT: Returns a list of label. For each label, it returns a textual description, confidence score, and topicality rating.
IMPLEMENTATION EXAMPLE
======================
Feel free to browse the app editor in the Service URL for an implementation example.
ADDITIONAL INFORMATION
======================
> Supported image formats :
https://cloud.google.com/vision/docs/supported-files> GOOGLE VISION service limits :
https://cloud.google.com/vision/quotasTROUBLESHOOTING
================
Any plugin related error will be posted to the the Logs tab, "Server logs" section of your App Editor.
Make sure that "Plugin server side output" and "Plugin server side output" is selected in "Show Advanced".
> Server Logs Details:
https://manual.bubble.io/core-resources/bubbles-interface/logs-tab#server-logsPERFORMANCE CONSIDERATIONS
===========================
GENERAL
-------------
This implementation posts the file data to GOOGLE VISION for non-Google Storage URLs (e.g: non-gs://).
Therefore, the maximum allowable file size depends both on the bandwidth between Bubble.io & GOOGLE VISION, the highest limit being capped by Bubble.io's Workflow Action maximum execution time to perform this transfer operation.
QUESTIONS ?
===========
Contact us at
bubble@wiseable.io for any additional feature you would require or support question.