Azure-docs: Use the custom trained model with the labeling tool for automatic analyzing

Created on 7 May 2020  Â·  7Comments  Â·  Source: MicrosoftDocs/azure-docs

Hello, first and foremost, thank you for the extensive documentation and the Form Recognizer which ich very good.

I trained a custom model with the labeling tool.
Within the Labeling Tool it works like a charm.
Got the Model ID and everything.

However, I cant seem to find a way how to use my model outside of the labeling tool, as I dont need the user interface, just need the custom trained model to do predictions.

USE CASE: I want to automatically trigger the predict feature of my custom model whenever a file (an pdf/image) is uploaded in the blob container, and all it should do is save a json in the blob with the results (with the text that I want).

The trigger I would do with either a Flow (Power Automate, or a Functio/Logic App), but in order to do that I somehow need to point to my custom made model.

Therefore I have a few Questions:

  1. Is my custom trained model which is trained with the labeling tool already saved inside of my Form Recognizer Ressource?
  2. Do I need to copy the model into my Form Recognizer Ressource in order for me to use it for automatic triggered prediction?
  3. How could I use it for my USE CASE?

Any idea or feedback would be appreciated.

Thank You very much.


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Pri2 cognitive-servicesvc cxp forms-recognizesubsvc product-question triaged

Most helpful comment

@darayavah we will review your feedback and get back to you shortly. Thanks.

All 7 comments

@darayavah we will review your feedback and get back to you shortly. Thanks.

@darayavah I'm in the exact place! I'm trying to use Azure Logic Apps, but there's so little resources over the internet! Just one page here, that basically doesn't work with me, even if I update the model ID...
And if I try to train the model every single time I receive, as the doc suggests, then I get the message that that training data cannot be greater than a certain number of images
https://docs.microsoft.com/en-us/azure/cognitive-services/form-recognizer/tutorial-form-recognizer-with-logic-apps

@darayavah the following document demonstrates how to use form recognizer with logic apps. You simply provide the model id when when configuring logic apps to use the Form Recognizer Analyze Form operation.

@emelus can you please share at what point are you receiving the error, are you following the tutorial using the sample data provided, can you provide a screenshot of the error? Thanks.

Thank you very much.
That will certainly help me.
But still, do I need to train the model every time the logic app is triggered anew?
Where is the trained model saved? In the Ressource Group? Or somewhere locally? Or somewhere in the cloud.

Hello @darayavah, it won't train the model each time the logic app is triggered, rather it would use the model you've already trained trained to analyze the data and provide results. Furthermore, it seems there's no way to access the model directly other than manually storing the model id for use in other API operations or applications. Hope this helps. Thanks.

Thank you. It seems that the current logic app is for v1, is that correct?
In order to address this shortcoming, I am able to make a custom connector to the point that I can trigger the request to make it analyze a form over the internet (with AnalyzeForm (POST) and GetFormResults (GET)). But I cannot find a way I could connect it to a whole set of files in the internet, for example, a blob. Is there something I need to do to the custom connector, or link an additional connector to it in the Logic App e.g. HTTP? This is where I am stuck right now

Hello @darayavah, it won't train the model each time the logic app is triggered, rather it would use the model you've already trained trained to analyze the data and provide results. Furthermore, it seems there's no way to access the model directly other than manually storing the model id for use in other API operations or applications. Hope this helps. Thanks.

Here, you're referring to the use of the GetModel (GET) request, instead of the TrainModel (GET) request? (Because the TrainModel (GET) request does not require a model ID)

@emelus yes logic app currently uses Form Recognizer v1. If you're using Form Recognizer v2 with logic app, to avoid the size limit and to train a model with labels or any of the other new features, you need to create a custom logic app connector. We are planning on updating the connector but do not yet have a release date. Regarding data connection, you can share a file on a blob SAS url as source. Hope this helps. Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JeffLoo-ong picture JeffLoo-ong  Â·  3Comments

DeepPuddles picture DeepPuddles  Â·  3Comments

varma31 picture varma31  Â·  3Comments

behnam89 picture behnam89  Â·  3Comments

Ponant picture Ponant  Â·  3Comments