Convert Form Recognizer Custom Model Json results to csv

FiremanderAI 96 Reputation points
2021-10-19T20:41:20.473+00:00

There is a great quick start document on how to parse the json results using prebuilt models here that print the results to screen. I modified the sample to write the results to CSVs and it works. I am looking to do the same using Custom Models (with or without labels). Unfortunately, I cannot find any code samples that extract custom model data aside from the scripts that generate value confidence levels. These are good as they give the row and column indexes of each value.

But modifying the script by removing the confidence level information and writing json to csv using pandas (from this example) and other means is proving to be difficult and I haven't found many other examples. I am possibly looking in the wrong places? Have others created similar scripts or do I have to build my own? Any help is appreciated! Thank you in advance!

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

1 additional answer

Sort by: Most helpful
  1. romungi-MSFT 42,116 Reputation points Microsoft Employee
    2021-10-20T08:52:36.177+00:00

    @FiremanderAI There is an option to directly download the CSV file from an analyze operation with the form recognizer labeling tool.
    If you have not used the tool before the setup is pretty simple, you can follow this quickstart to setup a project with a blob container and create a custom model to analyze.

    141930-image.png

    I believe the script to extract the csv file from the analyze operation with REST API is created for API version 2.1 but this could possibly change with newer versions with the 3.0 preview. I think the newer version offers a single analyze API with an option to use custom and prebuilt model ids as parameters and the response should be easier to parse irrespective of the parameters passed. With the current v2.1 though, I have not come across an option to use a custom script to create a CSV file for custom model analyze operation other than the option to down the result from the labeling tool.

    If an answer is helpful, please click on 130616-image.png or upvote 130671-image.png which might help other community members reading this thread.

    0 comments No comments