This article explains about What is Einstein Vision and how Salesforce using Einstein Vision and what are the types etc.,
Einstein Vision is an API used to enable your apps with AI-powered image recognition. Leverage pre-trained classifiers, or train your own custom classifiers to solve a vast array of specialized image-recognition use cases. Easily build deep learning models for every use case, including visual search, brand detection, and object identification.
For example, Salesforce Social Studio integrates with this service to expand a marketer’s view beyond just keyword listening. You can “visually listen” to detect attributes about an image, such as detecting your brand logo or that of your competitor in a customer’s photo. You can use these attributes to learn more about your customers’ lifestyles and preferences.
Images contain contextual clues about all aspects of your business, including your customers’ preferences, your inventory levels, and the quality of your products. You can use these clues to enrich what you know about your sales, service, and marketing efforts to gain new insights about your customers and take action. The possibilities are limitless with applications that include:
Einstein Vision is part of the Einstein Platform Services technologies, and you can use it to AI-enable your apps. Leverage pre-trained classifiers or train your own custom classifiers to solve a vast array of specialized image-recognition use cases. Developers can bring the power of image recognition to CRM and third-party applications so that end users across sales, service, and marketing can discover new insights about their customers and predict outcomes that lead to smarter decisions.
Einstein Vision includes these APIs:
Get optical character recognition (OCR) models that detect alphanumeric text in an image with Einstein OCR. You access the models from a single REST API endpoint. Use the retail algorithm to create a model that’s optimized for retail execution scenarios. Please find the summer 20′ release notes.https://releasenotes.docs.salesforce.com/en-us/summer20/release-notes/rn_einstein_vision.htm
Detect Text in an Image with Einstein OCR (Generally Available)
Get optical character recognition (OCR) models that detect alphanumeric text in an image with Einstein OCR. Access the models from a single REST API endpoint. Each model has specific use cases, such as business card scanning, product lookup, and digitizing documents and tables.
Watch the below youtube video for more information from salesforce..
1.Detect Text In Image
2.Detect Text in Business Cards
3.Detect Text and Tables
First, we need to generate an Access token, and so we can make an API request after. To make that sample request, we can use it below.
HttpRequest req = new HttpRequest();
req.setMethod('POST');
req.setEndpoint('https://api.einstein.ai/v2/vision/ocr');
req.setHeader('content-type', 'multipart/form-data; charset="UTF-8"; boundary="1ff13444ed8140c7a32fc4e6451aa76d"');
req.setHeader('Authorization', 'Bearer '+access_token); //replace token with your access token
req.setHeader('Cache-Control', 'no-cache');
string form64 = '';
form64 += HttpFormBuilder.WriteBoundary();
form64 += HttpFormBuilder.WriteBodyParameter('sampleLocation', 'https://jayakrishnasfdcwordpress.com/wp-content/uploads/2018/10/untitled-design.png');
form64 += HttpFormBuilder.WriteBoundary();
form64 += HttpFormBuilder.WriteBodyParameter('modelId', 'OCRModel');
form64 += HttpFormBuilder.WriteBoundary(HttpFormBuilder.EndingType.CrLf);
blob formBlob = EncodingUtil.base64Decode(form64);
string contentLength = string.valueOf(formBlob.size());
req.setBodyAsBlob(formBlob);
req.setHeader('Connection', 'keep-alive');
req.setHeader('Content-Length', contentLength);
req.setTimeout(60*1000);
Http h = new Http();
String resp;
HttpResponse res = h.send(req);
Above I am passing the image URL and second modalId. Besides, I have used OCRModel. This modal is provided by Salesforce OOTB
here we need to specify a modelId of OCRModel
and task
parameter of contact
. Then the model returns the entity type for each text element that it detects.
In the response, we get one extra tag, “attributes,” which will help us decide the entity type.
For the images contains Tables, to return the table data for each text element, In addition to the other parameter, we need to specify the tabulatev2
model and a task
parameter value of table
.
Thanks for Reading…