Form Recognizer Custom Template Reusability

Gurpreet Chawla 0 Reputation points
2024-03-08T06:33:38.3533333+00:00

Hi, I am looking for a solution to reuse a custom extraction template.

I created a template by drawing bounding boxes over a document and now I want to apply this template to all similar looking documents. I see that the documentation asks to use Batch layout, but it only helps to analyze the whole batch (running layout model underneath). But I need to reuse the labeled template from labels.json.

I tried re-using the first manually created labels.json for all the new documents by cloning the json & renaming it to attach to the new document, also I need to hit Run Layout button each time to generate ocr.json.

Is there's any other better way than this somewhat hack that I discovered?

Azure AI Document Intelligence
Azure AI Document Intelligence
An Azure service that turns documents into usable data. Previously known as Azure Form Recognizer.
1,535 questions
{count} votes

1 answer

Sort by: Most helpful
  1. santoshkc 6,955 Reputation points Microsoft Vendor
    2024-03-08T08:43:27.0433333+00:00

    Hi @Gurpreet Chawla,

    Thank you for reaching out to Microsoft Q&A forum!

    To reuse a custom extraction template in Azure Form Recognizer, you can use the REST API to extract data from similar-looking documents with the existing custom model. You can use the analyze API with the model-id parameter to specify the ID of the custom model you want to use. This will apply the same layout and field extraction rules to the new documents as the original model.

    Here is the documentation: Analayze Document.

    Here is the repro screenshots for POST and GET requests: User's image User's image

    Is this the precise information you were seeking, tailored to your specific needs and preferences?

    Thank you for your understanding!

    0 comments No comments