- 基本情報
- フレームワーク コンポーネント
- ML パッケージ
- パイプライン
- データ マネージャー (Data Manager)
- OCR サービス
- OCR サービス
- Automation Suite にデプロイされた Document Understanding
- AI Center スタンドアロンにデプロイされた Document Understanding
- ディープ ラーニング
- ライセンス
- 参照
- UiPath.Abbyy.Activities
- UiPath.AbbyyEmbedded.Activities
- UiPath.DocumentUnderstanding.ML.Activities
- UiPath.DocumentUnderstanding.OCR.LocalServer.Activities
- UiPath.IntelligentOCR.Activities
- UiPath.OCR.Activities
- UiPath.OCR.Contracts
- UiPath.DocumentProcessing.Contracts
- UiPath.OmniPage.Activities
- UiPath.PDF.Activities
OCR サービスについて
OCR サービスは以下の目的で使用されます。
- Data Manager にドキュメントをインポートする際、データをラベル付けするとき。この手順で使用できるエンジンは、UiPath Document OCR、Google Cloud Vision OCR、Microsoft Read OCR です。
- 実行時に RPA ワークフローからモデルを呼び出すとき。このステップで利用可能なエンジンは、上記をはじめとする UiPath RPA プラットフォームに統合されているすべてのエンジンと、Abbyy Finereader、Microsoft OCR (レガシ)、Microsoft Project Oxford OCR、Tesseract です。
In production, we recommend calling the OCR using the Digitize Document activity in your workflow and passing the Document Object Model as input to the activity calling the ML model. For this purpose, you need to use the Machine Learning Extractor activity (Official feed).
テストをすばやく簡単に実施するために AI Center ([設定] ウィンドウ) で OCR を直接設定することもできますが、これは運用環境のデプロイでは推奨されません。
要件
このセクションでは、OCR エンジンをインストールする場合のハードウェア要件とソフトウェア要件を詳しく説明します。
ハードウェア要件
- 必要なマシン: クラウド内の仮想マシン/オンプレミス ボックス/ノート PC
- オペレーティング システム: Windows (Windows 10)/Linux (Ubuntu/RedHat)
- コンピューティング エンジン: CPU/GPU
- OCR: UiPath Document OCR CPU/UiPath Document OCR GPU
| CPU コア | RAM (GB) | ビデオ RAM (GB) | HDD (GB) | |
|---|---|---|---|---|
| UiPath CPU | 4 | 4 | 50 | |
| UiPath GPU | 1 | 4 | 8 | 50 |
ソフトウェア要件
Linux オペレーティング システム
クラウドの仮想マシンに製品をインストールする場合は、次のオペレーティング システムがサポートされます。
| Software | バージョン |
|---|---|
| Ubuntu | 20.04 LTS 18.04 LTS 16.04 LTS |
| RHEL | 7.x |
オンプレミスのデータセンターにあるマシンに製品をインストールする場合は、次のオペレーティング システムがサポートされます。
| ソフトウェア | バージョン |
|---|---|
| Ubuntu | 20.04 LTS 18.04 LTS 16.04 LTS |
| RHEL | 7.x |
Windows オペレーティング システム
See the official Docker website for the list of Windows operating systems supported.
Windows では、マシンで仮想化が有効化されている必要があります。ノート PC やデスクトップ ワークステーションのような物理マシンでのみ仮想化を有効化することを強く推奨します。入れ子の仮想化を使用する仮想マシン (クラウドまたはデータセンター) の Windows 上での Docker の実行はサポートされていません。
ブラウザー
| ソフトウェア | バージョン |
|---|---|
| Google Chrome | 50 以上 |
ネットワーク構成
- Data Manager は OCR エンジン (
<IP>:<port_number>) にアクセスできる必要があります。オンプレミスの UiPath Document OCR、Google Cloud Vision OCR、Microsoft Read Azure、オンプレミスの Microsoft Read などの OCR エンジンが使用できます。 - ロボットが OCR (
<IP>:<port_number>) にアクセスできる必要があります。上記と同じ OCR オプションを使用します。 - OCR エンジンは、Azure 内で UiPath がホストするライセンス サーバー (ポート 443) にアクセスできる必要があります。
最小トライアルまたは概念実証の設定
トレーニング済みのすぐに使用できるモデルだけを提供する場合は、Windows 10 のノート PC で OCR エンジンを実行できます。Docker Desktop で 8G の RAM が利用可能であることを確認してください。
少量のデータ (100 件以下のドキュメント) のデモとしてカスタム モデルのトレーニングを試す場合は、4GB の RAM を上限とする環境で OCR エンジンを実行できます。このような少量のデータの場合は、OCR エンジンに対応する GPU が不要になる可能性があります。
前提条件
OCR エンジンは、Docker 上で実行されるコンテナー化されたアプリケーションです。OCR エンジンをオンプレミスの AI Center と同じマシンで実行することはできません。別々のマシンで実行するために、以下の前提条件インストーラー コマンドを使用して Docker を設定し、任意で NVIDIA ドライバーを設定できます。これらのスクリプトは、AI Center をインストールするマシンで実行しないでください。
Docker イメージのファイル サイズ (GB) は非常に大きくなる可能性があるため、Linux 上で Docker のファイルを保存するために使用するフォルダーは、スペースが不足しないように十分な大きさのパーティションに作成する必要があります。既定では、常にルート パーティションに作成されます。
ルート パーティションの大きさを確認するには、ターミナルで以下を入力し、右端の列で / を含む行を探します。
df -h
df -h
If the size of that partition is smaller than the minimal storage requirements, then see the Configuring the Docker Data Folder section.
Docker をインストールする
Linux
Follow instructions in the official Docker documentation, or run this command:
curl -fsSL https://raw.githubusercontent.com/UiPath/Infrastructure/master/ML/du_prereq_installer.sh | sudo bash -s -- --env cpu
curl -fsSL https://raw.githubusercontent.com/UiPath/Infrastructure/master/ML/du_prereq_installer.sh | sudo bash -s -- --env cpu
If this command fails, then you have an incompatible Linux operating system and you need to request your IT to install Docker on the machine following the instructions in the official Docker documentation.
Azure VM
Azure の VM にインストールする場合は、以下のコマンドを使用します。
curl -fsSL https://raw.githubusercontent.com/UiPath/Infrastructure/master/ML/du_prereq_installer.sh | sudo bash -s -- --env cpu --cloud azure
curl -fsSL https://raw.githubusercontent.com/UiPath/Infrastructure/master/ML/du_prereq_installer.sh | sudo bash -s -- --env cpu --cloud azure
Windows 10
Download and install Docker Desktop. On recently updated versions of Windows 10, you will need WSL2 installed. So when presented with a dialog saying "WSL 2 Installation is Incomplete" please click the Restart button.
Data Manager を実行するときは、各 Docker コンテナーに対して作業フォルダー (Data Manager ではたとえば workdir という名前のフォルダー) を作成し、そのフォルダーのパスを docker run コマンドの -v フラグの後に含める必要があります。 この操作を Windows 上で行うと、Docker Desktop で以下のようなメッセージが表示されます。続行するには、[Share it] をクリックします。
Docker のデータ フォルダーを構成する (Linux のみ)
Docker のファイルを保持するフォルダーのパスを入力し、このコマンドを実行した後、再起動します。
curl -fsSL https://raw.githubusercontent.com/UiPath/Infrastructure/master/ML/du_prereq_installer.sh | sudo bash -s -- --change-mount </path/to/folder>
curl -fsSL https://raw.githubusercontent.com/UiPath/Infrastructure/master/ML/du_prereq_installer.sh | sudo bash -s -- --change-mount </path/to/folder>
Docker のチート シート
Docker は、ソフトウェアを Docker イメージで配布するのに役立ちます。イメージの実行中インスタンスをコンテナーと呼びます。イメージが利用可能な限り、必要な回数だけコンテナーを停止、削除、再開できます。
イメージをいったん削除すると、元に戻すことはできません。イメージを回復するには、元のレジストリから再度取得するしかありません (レジストリにまだ存在する場合)。
A running container is analogous to a small Virtual Machine, in that it has an internal filesystemand network interfaces, which are separate from the host machine filesystem and network. Folders and ports can be mapped from the container to the host using –v and –p arguments, respectively.
以下の表に、Docker コマンド ラインで使用する一般的なコマンドのリストを示します。
Click here for the full list of base Docker commands.
| コマンド | 説明 |
|---|---|
docker login <registry name> -u <username> -p <password> | レジストリにログインします。 |
docker pull <registry name>/<image name>:<image tag> | レジストリからイメージをダウンロードします。最新バージョンのイメージを参照するには、一般に latest タグを使用します。 |
docker run –d -p 5000:80 <registry name>/<image name>:<image tag>OR docker run –d –p 5000:80 <image id> | Run an image in detached mode, while mapping port 80 from inside the container to port 5000 on the host machine, and <container folder> to <host folder>. Detached mode means the container does not block the terminal, so you can perform other operations on the same terminal. |
docker images | システムに存在するイメージのリストを取得します。 |
docker ps –a | すべてのコンテナーのリストを取得します (実行中のものと停止されているものの両方)。 たとえば、コンテナーを停止または削除する必要がある場合に対象のコンテナーを参照するには、container id を使用します。 |
docker stop <container id> | コンテナーを停止します。 このコマンドではコンテナーは削除されません。ただし、削除する前にコマンドを実行する必要があります。 |
「docker rm <container id>」 | コンテナーを削除します。 コンテナーは事前に停止する必要があります。 |
docker logs <container id> | コンテナーのログを表示します。 |
docker rmi <image id> | 1 つまたは複数のイメージをシステムから削除します。 イメージは多くのスペースを占有する可能性があるため、これでストレージ スペースを節約できます。 |
Docker container prune -f | 停止したコンテナーをすべて削除します。 |
Linux ターミナルのチート シート
| コマンド | 説明 |
|---|---|
sudo <any_command> | 管理者としてコマンドを実行します。Permission Denied エラーが発生する場合は、必ずこれを試してください。 |
ifconfig | システム内のネットワーク インターフェイスに関する情報を表示します。eth0 または docker0 のいずれかのセクションでマシンの IP を確認します。 |
pwd | 現在のフォルダーへのパスを表示します。 |
ls | ディレクトリの内容のリストを取得します。 |
cd <folder_name> | 別のフォルダーに移動します。 |
mkdir <folder_name> | 新しいフォルダーを作成します。 |
(任意) GPU マシンのインストール
Linux
以下のコマンドを実行します。
curl -fsSL https://raw.githubusercontent.com/UiPath/Infrastructure/master/ML/du_prereq_installer.sh | sudo bash -s -- --env gpu
curl -fsSL https://raw.githubusercontent.com/UiPath/Infrastructure/master/ML/du_prereq_installer.sh | sudo bash -s -- --env gpu
一部のシステムでは、コマンドを 2 回実行するかシステムを再起動しなければ、すべての要件をインストールできない可能性があります。
Azure Specific: To use the NV-series virtual machines you need to either install the NVIDIA driver before executing the above command, or you can use a Driver Extension from Azure to install the necessary NVIDIA driver according to that tier GPU model.
Azure VM
Azure の VM にインストールする場合は、以下のコマンドを使用します。
curl -fsSL https://raw.githubusercontent.com/UiPath/Infrastructure/master/ML/du_prereq_installer.sh | sudo bash -s -- --env gpu --cloud azure
curl -fsSL https://raw.githubusercontent.com/UiPath/Infrastructure/master/ML/du_prereq_installer.sh | sudo bash -s -- --env gpu --cloud azure
インストール
UiPath Document OCR
UiPath Document OCR は UiPath 独自の OCR テクノロジであり、ラテン文字の言語、すなわち英語、フランス語、ドイツ語、イタリア語、ポルトガル語、ルーマニア語、スペイン語で使用される文字をサポートしています。他の言語のテキストは、アクセント記号なしで認識されます。たとえば、ポーランド語の「Ł」は「L」と認識されます。UiPath Document OCR を使用して処理されたページは、Document Understanding の Enterprise ライセンスとともに購入されるページ クォータには含まれません。したがって、UiPath Document OCR は無料で使用できます。
UiPath Document OCR は、以下の種類のデプロイで利用可能です。
- cloud public URLs - more details on the Public Endpoints page
- オンプレミス (エアギャップ環境を含む) で UiPath.DocumentUnderstanding.OCR.LocalServer アクティビティ パッケージを使用 (インターネット アクセスは不要)
- オンプレミスの標準のスタンドアロン Docker コンテナー (インターネット アクセスが必要)
- オンプレミスのエアギャップ環境のスタンドアロン Docker コンテナー (インターネット アクセスは不要)
- AI Center の標準デプロイでの ML スキルとしてのオンプレミス (インターネット アクセスが必要)
- AI Center のエアギャップ環境のデプロイでの ML スキルとしてのオンプレミス (インターネット アクセスは不要)
-
UiPath Document OCR のスタンドアロン Docker コンテナーをインストールするには、以下のコマンドを実行します。
docker login aiflprodweacr.azurecr.io -u *** -p **docker pull aiflprodweacr.azurecr.io/uipath-ocr:latestdocker login aiflprodweacr.azurecr.io -u *** -p **docker pull aiflprodweacr.azurecr.io/uipath-ocr:latest -
CPU を使用して実行します。
docker run -d -p 5000:80 aiflprodweacr.azurecr.io/uipath-ocr:latest LicenseAgreement=acceptdocker run -d -p 5000:80 aiflprodweacr.azurecr.io/uipath-ocr:latest LicenseAgreement=accept -
GPU を使用して実行します。
docker run -d -p 5000:80 --gpus all aiflprodweacr.azurecr.io/uipath-ocr:latest LicenseAgreement=acceptdocker run -d -p 5000:80 --gpus all aiflprodweacr.azurecr.io/uipath-ocr:latest LicenseAgreement=accept -
AI Center で新しい ML パッケージを作成する場合は、画面下部に任意の OCR 設定セクションがあります。このセクションで、サーバー側の OCR エンジンの種類、OCR URL、および OCR キーを定義できます。OCR キーは、Automation Cloud アカウントの [ライセンス] セクションから取得する API キーです。この OCR 設定は、[サーバー側の OCR を使用] ボックスをチェックした場合に [マシン ラーニング抽出器] アクティビティによって使用されます。既定では、このボックスはオフになっています。その場合、抽出器は [ドキュメントをデジタル化] アクティビティで OCR を使用します。
重要:UiPath Document OCR コンテナーをオンプレミスの AI Center と同じマシンで実行することはできません。
Google Cloud OCR
The endpoint can be obtained from the Google Cloud Platform documentation. The ApiKey can be obtained from your Google Cloud Platform Console if you have a Google Cloud Vision service in your subscription.
Microsoft Read
Azure とオンプレミスの両方のコンテナー エンドポイントに適用できます。
Azure サービスの場合は、エンドポイントと API キーの両方を入力する必要があります。
オンプレミスのコンテナー エンドポイントの場合、API キーは必要ありません。
Data Manager および AI Center Document Understanding ML パッケージで OCR サービスを構成する
以下の表に、サポートされている 6 種類の OCR エンジンを Data Manager と AI Center の両方で設定する方法を示します。
| OCR エンジン | OCR メソッド | OCR キー | OCR の URL |
|---|---|---|---|
| UiPath | UiPath Document OCR | UiPath Automation Cloud Document Understanding の API キー Enterprise プラン | http://<IP_addr>:<port_number> |
| Google Cloud Vision OCR | GCP コンソールの API キー | https://vision.googleapis.com/v1/images:annotate | |
| Microsoft Read 2.0 On-Prem | Microsoft Read OCR | なし | http://<IP_addr>:<port_number>/vision/v2.0/read/core/Analyze |
| Microsoft Read 2.0 Azure | Microsoft Read OCR | Azure Portal からのリソースに対応する API キー | <Azure_resource_Endpoint>/vision/v2.0/read/core/asyncBatchAnalyze |
| Microsoft Read 3.2 On-Prem | Microsoft Read OCR | なし | http://<IP_addr>:<port_number>/vision/v3.2/read/analyze |
| Microsoft Read 3.2 Azure | Microsoft Read OCR | Azure Portal からのリソースに対応する API キー | <Azure_resource_Endpoint>/vision/v3.2/read/analyze |
- OCR サービスについて
- 要件
- ハードウェア要件
- ソフトウェア要件
- ネットワーク構成
- 最小トライアルまたは概念実証の設定
- 前提条件
- Docker をインストールする
- Docker のデータ フォルダーを構成する (Linux のみ)
- Docker のチート シート
- Linux ターミナルのチート シート
- (任意) GPU マシンのインストール
- インストール
- UiPath Document OCR
- Google Cloud OCR
- Microsoft Read
- Data Manager および AI Center Document Understanding ML パッケージで OCR サービスを構成する