# Using Yandex OCR

## **Using the Yandex Vision OCR Engine in Projects**

When creating Robot scripts that need to recognize scanned copies, photographs (in JPEG, PDF, TIFF, or other formats), you can choose one of the five OCR engines built into the Sherpa RPA Platform. The OCR engines recognize text in images and return it as blocks of text, lines, and words.

<figure><img src="https://3199517203-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4mXXYsqBuhj7RyX6Y4Yw%2Fuploads%2Fgit-blob-08737b91423266f54625eaf5bd39d852999926d2%2F%D0%A0%D0%B0%D1%81%D0%BF%D0%BE%D0%B7%D0%BD%D0%B0%D1%82%D1%8C.png?alt=media" alt=""><figcaption></figcaption></figure>

One of the best OCR engines in terms of recognition quality is Yandex Vision.

{% embed url="<https://cloud.yandex.ru/docs/vision/>" %}

## **Requirements for Using Yandex Vision in Robots**

Yandex Vision is a cloud-based computer vision service for image analysis, requiring an internet connection. Security policies must allow outgoing calls from the Robot to Yandex Vision:

{% embed url="<https://iam.api.cloud.yandex.net/iam/v1/tokens>" %}

{% embed url="<https://vision.api.cloud.yandex.net/vision/v1/batchAnalyze>" %}

## **Cost of Yandex Vision**

For testing and your experiments, Sherpa RPA provides a free limit of 100 pages. This means that initially, you only need to select this engine, and the recognition will occur automatically (i.e., through the Sherpa RPA account).

For ongoing use of Yandex Vision, you need to arrange payment for the service. You can choose one of the following methods:

1. Pay for page credits through us. Sherpa Robotics, as a partner of Yandex, will offer you a contract. The current cost of recognition is 0.13 rubles per page (i.e., 13 kopecks).
2. Create your own account in Yandex Cloud and specify your account token in the robot settings.

## **Setup Instructions**

1. An account for Yandex Vision must be created for your company.

{% embed url="<https://cloud.yandex.ru/services/vision>" %}

![](https://sherparpa.ru/wp-content/uploads/2023/04/izobrazhenie_2023-04-24_164623935.png)

2. Link the Yandex Vision cloud to your payment account:

![](https://sherparpa.ru/wp-content/uploads/2023/04/izobrazhenie_2023-04-24_164836138.png)

3. A list of servers that must be accessible (i.e., outgoing requests must go to these three domains):

{% embed url="<https://iam.api.cloud.yandex.net/>" %}

{% embed url="<https://vision.api.cloud.yandex.net/>" %}

{% embed url="<http://sherpa.wiregeo.com/>" %}

4. On the Sherpa RPA side (in settings), you need to fill in two parameters: as shown in the screenshot — this is filled in by the developer after they receive the relevant data.

<figure><img src="https://3199517203-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4mXXYsqBuhj7RyX6Y4Yw%2Fuploads%2Fgit-blob-504c844f1f086e4365fb2d0ec7ee6eb5f744b5e6%2Fimage%20(142).png?alt=media" alt=""><figcaption></figcaption></figure>

5. To obtain the PasswordOauthToken (from the Yandex account — from the Cloud Console), go to the address highlighted in the address bar and then click on the highlighted link, where this token will be specified.

![](https://sherparpa.ru/wp-content/uploads/2023/04/izobrazhenie_2023-04-24_165118115.png)

6. Obtaining the FolderId is described in this article:

{% embed url="<https://cloud.yandex.ru/docs/resource-manager/operations/folder/get-id>" %}

An example from our account:

![](https://sherparpa.ru/wp-content/uploads/2023/04/screenshot_1.jpg)

More details on connecting third-party services:

{% embed url="<https://docs.sherparpa.ru/sherpa-robot-i-sherpa-assistant/podklyuchenie-storonnikh-servisov>" %}

## **Yandex Cloud Security**

Yandex Cloud implements measures to protect personal data (PD), as specified in Resolution No. 1119 and Order No. 21 of the FSTEC, in accordance with the requirements for Level 1 security (UZ-1).

When a client places personal data on Yandex Cloud resources, for which they act as the operator, they entrust Yandex with the processing of this personal data. Yandex Cloud is committed to maintaining the confidentiality of PD, ensuring their security during processing, and complying with all legal requirements for the protection of processed PD.
