UiPath Documentation
document-understanding
2023.4
false
Document Understanding ガイド
重要 :
このコンテンツの一部は機械翻訳によって処理されており、完全な翻訳を保証するものではありません。 新しいコンテンツの翻訳は、およそ 1 ~ 2 週間で公開されます。

請求書のフィールドを 1 つ追加して再トレーニングする

重要:

このページは、Document Understanding TM を初めて使用するユーザーに Document Understanding TM の機能を分かりやすく紹介するためのページです。

For scalable production deployments, we strongly recommend using the Document Understanding Process available in UiPath® Studio under the Templates section.

このクイックスタート チュートリアルでは、すぐに使える Invoices (請求書) ML モデルに抽出フィールドを 1 つ追加する再トレーニングの方法について説明します。

Let’s use the same workflow we used for the receipts in the previous quickstart and modify it so it can support invoices.

そのためには、ワークフローで以下の手順を実行する必要があります。

  1. タクソノミーを変更する
  2. 分類器を追加する
  3. マシン ラーニング抽出器を追加する
  4. データをラベル付けする
  5. Invoices (請求書) ML モデルを再トレーニングする

1. タクソノミーを変更する

この手順では、タクソノミーを変更しドキュメントの種類として請求書を追加する必要があります。

To do so, open Taxonomy Manager and create group named Semi Structured Documents, a category named Finance, a document type named Invoices. Create the listed fields with user friendly names along with respective data types.

  • name - Text
  • vendor-addr - Address
  • billing-name - Text
  • billing-address - Address
  • shipping-address - Address
  • invoice-no - Text
  • po-no - Text
  • vendor-vat-no - Text
  • date - Date
  • tax - Number
  • total - Number
  • payment-terms - Text
  • net-amount - Number
  • due-date - Date
  • discount - Number
  • shipping-charges - Number
  • payment-addr - Address
  • description - Text
  • items - Table
    • description - Text
    • quantity - Number
    • unit-price - Number
    • line-amount - Number
    • item-po-no - Text
    • line-no - Text
    • part-no - Text
    • billing-vat-no - Text

2. 分類器を追加する

この手順では、ワークフローで領収書と請求書の両方を処理できるように分類器を追加する必要があります。

ワークフローで「Receipts (領収書)」と「Invoices (請求書)」の 2 つのドキュメントの種類を処理できるようにするためには、分類器を追加して入力データとして使用されるドキュメントの種類を区別できるようにする必要があります。

  1. [ ドキュメントをデジタル化] アクティビティの後に [ ドキュメント分類スコープ] を追加し、入力引数として[ドキュメント パス]、[ ドキュメント テキスト]、[ ドキュメント オブジェクト モデル]、および[タクソノミー] を指定し、 分類結果を 新しい変数に保存します。この変数は、処理するドキュメントの種類を確認するために必要です。

  2. We also need to specify one or more classifiers. In this example, we are using the Intelligent Keyword Classifier. Add it to the Classify Document Scope activity.

    This page helps you take an educated decision on what classification method you should use in different scenarios.

  3. Train the classifier as described here.

  4. 両方のドキュメントの種類に対して分類器を有効化します。

  5. ユースケースに応じて、分類結果を検証します。[ 分類ステーションを提示 ] アクティビティ、または [ドキュメント分類アクションを作成 ] アクティビティと [ ドキュメント分類アクション完了まで待機し再開] アクティビティを使用します。

3. マシン ラーニング抽出器を追加する

In this step, we need to add a Machine Learning Extractor to the Data Extraction Scope activity and connect it to the Invoices public endpoint.

手順は、Receipts (領収書) のマシン ラーニング抽出器を追加した手順とまったく同じです。

  1. Receipts (領収書) の [マシン ラーニング抽出器] アクティビティの横に [マシン ラーニング抽出器] アクティビティをもう 1 つ追加します。

  2. Invoices (請求書) のパブリック エンドポイント (https://du.uipath.com/ie/invoices) と、抽出器の API キーを指定します。

  3. 請求書のデータを抽出できるように、タクソノミー マネージャーで作成したフィールドを ML モデルで使用可能なフィールドにマッピングして、抽出器の設定を行います。

  4. [データ抽出スコープ] の入力として、[ドキュメントの種類の ID] を指定するのではなく [ドキュメント分類スコープ] によって出力される ClassificationResults 変数を使用します。

    最終的に画面は次のようになります。

  5. ワークフローを実行して、請求書のデータが正しく抽出されるかをテストします。

4. データをラベル付けする

Invoices (請求書) ML モデルで新しい IBAN フィールドが処理されるようにするには、ベース モデルを再トレーニングする前にデータをラベル付けする必要があります。

  1. Collect the requirements and sample invoice documents in sufficient volume for the complexity of the usecase you need to solve. Label 50 pages, as explained on this documentation page.

  2. オンプレミスまたはクラウド上の AI Center の Document Manager インスタンスにアクセスします。Document Manager を使用する権限が付与されていることを確認してください。

  3. AI Center プロジェクトを作成し、 [データのラベル付け] > [UiPath Document Understanding] に移動して、データのラベル付けセッションを作成します。

  4. Configure an OCR Engine as described here, try importing a diverse set of your production documents and make sure that the OCR engine reads the text you need to extract.

    More suggestions in this section. Only proceed to next step after you have settled on a OCR engine.

  5. Create a fresh Document Manager session, and import a Training set and an Evaluation set, while making sure to check the Make this a Test set checkbox when importing the Evaluation set. More details about imports here.

  6. Create and configure the IBAN field as described here. More advanced guidelines are available in this section.

  7. Label a Training dataset and an Evaluation dataset as described here. The prelabeling feature of Document Manager described here can make the labeling work a lot easier.

  8. Export first the Evaluation set and then the Training set to AI Center by selecting them from the filter dropdown at the top of the Document Manager view. More details about exports here.

次に、モデルを作成し、再トレーニングしてデプロイします。

5. Invoices (請求書) ML モデルを再トレーニングする

ワークフローで請求書を処理できるようになったため、次は請求書から IBAN を抽出できるようにする必要があります。IBAN フィールドは、すぐに使える Invoices (請求書) ML モデルでは既定で抽出されません。つまり、ベース モデルを使用して再トレーニングを行う必要があります。

  1. Create an ML Package as described here. If your document type is different from the ones available out-of-the-box, then choose the DocumentUnderstanding ML Package. Otherwise, use the package closest to the document type you need to extract.
  2. Create a Training Pipeline as described here using the Input dataset which you exported in the previous section from Document Manager.
  3. When the training is done and you have package minor version 1, run an Evaluation Pipeline on this minor version and inspect the evaluation.xlsx side by side comparison. Use the detailed guidelines here.
  4. 評価結果に問題がなければ、ML スキル ビューに移動し、ML パッケージの新しいマイナー バージョンを使用して ML スキルを作成します。このスキルを使用して Document Manager で事前ラベル付けを行う場合は、ML スキル ビューの右上にある [現在のデプロイを変更] ボタンを選択し、[ML スキルを公開] トグルをオンにする必要があります。
  5. ML スキルを作成したら、Studio で使用できるようにする必要があります。最も簡単なのは、こちらの手順に従って ML スキルを公開する方法です。最後に、ワークフローの [マシン ラーニング抽出器] アクティビティに最初に追加した Invoices (請求書) ML モデルのパブリック エンドポイントを、使用する ML スキルのパブリック エンドポイントで置き換えれば完了です。
  6. ワークフローを実行します。請求書の既定のフィールドに加えて、新たに追加した IBAN フィールドが抽出されることが確認できます。

サンプルをダウンロードする

このサンプル プロジェクトはこちらからダウンロードできます。 Invoices (請求書) の [マシン ラーニング抽出器] アクティビティを、エンドポイント モードからトレーニング済みの ML スキルに変更する必要があります。

このページは役に立ちましたか?

接続

ヘルプ リソース サポート

学習する UiPath アカデミー

質問する UiPath フォーラム

最新情報を取得