Where does the test set data live when using Form Recogniser Studio?

MaxZ 0 Reputation points
2023-10-31T16:13:22.9966667+00:00

I've trained a model using the form recogniser and document intelligence APIs. I can see all training files in the Form Recogniser Studio which were used for training.

Now I'd like to upload a test set and see how the prediction did, using the APIs, not the UI. Is this at all possible?

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

1 answer

Sort by: Most helpful
  1. romungi-MSFT 46,831 Reputation points Microsoft Employee
    2023-11-01T06:24:14.41+00:00

    @MaxZ If you upload data through studio the training and test data is stored in the storage container configured for your project. You can look up the storage container details in your project settings from the studio. You can use this container to upload data and use the blob URLs to pass the document as urlSource in your REST API requests.

    If you would like to use the REST API to continue testing your model, you have to use the newly created custom model id and pass it as a parameter to the endpoint along with other required/optional parameters to analyze the document against the new custom model. Please see the API reference for details.

    The end URL will have the following format with the modelId set to your custom model id.

    https://{endpoint}/formrecognizer/documentModels/{modelId}:analyze?api-version=2023-07-31[&pages][&locale][&stringIndexType][&features][&queryFields]

    The body of the request should contain the URL source of the document to be analyzed if you want to pass the URL of the test document or the binary data of the document if you want to just pass your local document. Here is the schema for the body depending on which option you would like to use.

    {
      "description": "Document analysis parameters.",
      "type": "object",
      "properties": {
        "urlSource": {
          "description": "Content at specified URL.",
          "type": "string",
          "format": "url"
        },
        "base64Source": {
          "description": "Content represented via Base64 encoding.",
          "type": "string",
          "format": "byte"
        }
      }
    }
    
    
    

    If you want to use the SDK, you can use the studio to get the SDK code snippet from the test tab and also analyze the document after updating the required placeholders in the snippet.

    User's image

    I hope this helps!!

    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.