UiPath Documentation
document-understanding
2024.10
false
Importante :
A localização de um conteúdo recém-publicado pode levar de 1 a 2 semanas para ficar disponível.
UiPath logo, featuring letters U and I in white

Guia do usuário do Document Understanding.

Última atualização 6 de abr de 2026

Faturas retreinadas com um campo adicional

Importante:

The aim of this page is to help first time users get familiar with Document UnderstandingTM.

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

Este início rápido mostra como retreinar o modelo de ML de Faturas predefinido para extrair mais um campo.

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

Para fazer isso, precisamos executar as seguintes etapas em nosso fluxo de trabalho:

  1. Modifique a taxonomia
  2. Adicione um classificador
  3. Adicione um Machine Learning Extrator
  4. Rotule os dados
  5. Retreine o modelo de ML de faturas

1. Modifique a taxonomia

Nesta etapa, precisamos modificar a taxonomia para adicionar o tipo de documento de fatura.

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. Adicione um classificador

Nesta etapa, precisamos adicionar um classificador para que possamos processar recibos e faturas com nosso fluxo de trabalho.

Since our workflow now supports two document types, Receipts and Invoices, we need to add the classifier to differentiate between different document types coming in as input:

  1. Add a Classify Document Scope after the Digitize Document activity and provide the DocumentPath, DocumentText, DocumentObjectModel, and Taxonomy as input arguments and capture the ClassificationResults in a new variable. We need this variable to check what document(s) we are processing.
  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. Configure o classificador habilitando-o para ambos os tipos de documento.
  5. Depending on your usecase, you might want to validate the classification. You can do that using the Present Classification Station or the Create Document Classification Action and Wait For Document Classification Action And Resume activities.

3. Adicione um Machine Learning Extractor

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.

O procedimento é exatamente o mesmo do antigo Receipts Machine Learning Extractor adicionado anteriormente:

  1. Adicione uma atividade Machine Learning Extractor com Receipts Machine Learning Extractor.

  2. Provide the Invoices public endpoint, namely https://du.uipath.com/ie/invoices, and an API key to the extractor.

  3. Configure o extrator para trabalhar com faturas mapeando os campos criados no Gerenciador de Taxonomia para os campos disponíveis no modelo de ML:

    Captura de tela descrevendo a caixa de diálogo Configurar Extractors.

  4. Do not forget to use the ClassificationResults variable outputted by the Classify Document Scope as input to the Data Extraction Scope, instead of specifying a DocumentTypeId. You should end up with something like this:

    Captura de tela descrevendo a caixa de diálogo Escopo de Extração de Dados.

  5. Execute o fluxo de trabalho para testar se funciona corretamente com faturas.

4. Rotule os dados

Precisamos rotular os dados antes de treinar novamente o modelo de ML base Faturas para que ele seja compatível com o novo campo 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. Gain access to an instance of Document Manager either on premises or in AI Center in the Cloud. Make sure you have the permissions to use Document Manager.
  3. Crie um projeto do AI Center e vá para Data Labeling > UiPath Document Understanding e crie uma sessão de Rotulagem de Dados.
  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.

Em seguida, iremos criar, retreinar e implantar nosso modelo.

5. Retreine o modelo de ML de faturas

Agora que nosso fluxo de trabalho suporta o processamento de faturas, precisamos extrair o IBAN de nossas faturas, que é um campo que não é selecionado por padrão pelo modelo de ML de Faturas predefinido. Isso significa que precisamos retreinar um novo modelo, começando pelo modelo básico.

  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. If the evaluation results are satisfactory, go to the ML Skills view and create an ML Skill using the new minor version of the ML Package. If you want to use this to do prelabeling in Document Manager, you need to select the Modify Current Deployment button at the top right of the ML Skill view and toggle on the Make ML Skill Public.
  5. After creating the ML skill, we now need to consume it in Studio. The easiest way to do that is to make the ML Skill public as described here. Then, the only thing left to do is simply replace the Invoices ML model public endpoint that we’ve initially added to the Machine Learning Extractor in our workflow with the public endpoint of the ML Skill.
  6. Execute o fluxo de trabalho e você deve observar o campo IBAN recém-adicionado sendo extraído junto aos campos de faturas padrão.

Baixe o exemplo

Download this sample project using this link. You need to change the Machine Learning Extractor for Invoices from Endpoint mode to your trained ML Skill.

Esta página foi útil?

Conectar

Precisa de ajuda? Suporte

Quer aprender? Academia UiPath

Tem perguntas? Fórum do UiPath

Fique por dentro das novidades