BLOCKS Reference

Salesforce

Einstein image recognition

This BLOCK is currently in beta and will become unavailable post official release. Please use the official version once released.

As a beta release, there is the possibility that some functions may not execute properly. We appreciate feedback from users regarding bugs or ways to improve BLOCKS.

Overview

This BLOCK performs image recognition using Salesforce Einstein Vision.

You must have a Salesforce account and an Einstein account. Refer to the Einstein accounts page from the BLOCKS Basic Guide for more information about Einstein accounts.

Properties

Property Explanation
BLOCK name Configure the name displayed on this BLOCK.
Einstein account

Select the Einstein account to use with this BLOCK.

Einstein accounts must be registered beforehand in the Einstein accounts section of the settings menu.

Model ID Designate the ID of the model that will be used for the image recognition. If left blank, the practice model provided by Einstein Vision will be used.
Input variable

Designate the variable that contains the image data to be analyzed. The image data can be binary data or Base64 encoded data.

Output variable

Designate the variable that will store the results from Einstein Vision.

Results are returned as JSON format data like the following:

{
  "probabilities": [
    {
      "label": "Egyptian cat",
      "probability": 0.8228377
    },
    {
      "label": "tabby, tabby cat",
      "probability": 0.029718548
    },
    {
      "label": "carton",
      "probability": 0.028617058
    },
    {
      "label": "tiger cat",
      "probability": 0.015309217
    },
    {
      "label": "ping-pong ball",
      "probability": 0.010554026
    }
  ],
  "object": "predictresponse"
}

The above are the results of using an image of a cat with this BLOCK. The "label" portions show what the model recognized as the subject of the image. The "probability" portion shows how confident the model is in each label being correct. The values range from 0 (low likelihood) to 1 (high likelihood).

In the above example, the model is 82% confident that the image is of an Egyptian cat.

BLOCK memos Make notes about this BLOCK.
Max number of results Configure this setting if you want to control the number of results returned.
Tag

Designate a string that will be used to tag the prediction (optional). This can be any value, and will be returned with the results.

The following example used the tag Egyptian cat:

{
  "sampleId": "Egyptian cat",
  "probabilities": [
    {
      "label": "Egyptian cat",
      "probability": 0.8228377
    },
    {
      "label": "tabby, tabby cat",
      "probability": 0.029718548
    },
    {
      "label": "carton",
      "probability": 0.028617058
    },
    {
      "label": "tiger cat",
      "probability": 0.015309217
    },
    {
      "label": "ping-pong ball",
      "probability": 0.010554026
    }
  ],
  "object": "predictresponse"
}

The tag is output as "sampleId": "tag".

この情報は役に立ちましたか?