question

ShanSudarshan-8434 avatar image
0 Votes"
ShanSudarshan-8434 asked ramr-msft commented

Form recognizer labelling tool (FOTT preview site) - Unable to train model after successfully labeling forms

Hi Team,

I was following the instructions here: https://docs.microsoft.com/en-us/azure/cognitive-services/form-recognizer/quickstarts/label-tool?tabs=v2-1
(using the FOTT preview site that's found under "Try it out")

Steps taken:
- Setup free tier subscription
- Setup form recognizer service resource
- Setup storage (blob) and created a main folder and two subfolders (train and test) where I put my .JPG files
- SAS URL is pointing to the main folder where I supplied the train folder as a sourceFilter
- Tested the service via PostMan (formrecognizer/v2.1/preview.3/custom/models, get custom models, analyze custom models) - working fine
- in FOTT, setup a new project and was able to see all the images in train folder and was able to create labels
- Attempted to train the model as the next step - ERROR: Training Failed: "Authorization was rejected by the user-provided resource"
- Attempted to train the custom model using the API (postman) using the model ID FOTT displayed - ERROR:

"trainResult": {
"averageModelAccuracy": 0.0,
"errors": [
{
"code": "Forbidden",
"message": "Authorization was rejected by the user-provided resource."
}
]


I checked everything stated in the prereqs, enabled CORS and made sure SAS has all the rights available but I am not able to figure out what's going on.

Please help!

azure-cognitive-servicesazure-form-recognizer
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

ramr-msft avatar image
0 Votes"
ramr-msft answered ramr-msft commented

@ShanSudarshan-8434 Thanks for the question. Can you please add more details about the Form Recognizer resource that you have created and please share the input sample documents that you are trying. We are able to train the custom model successfully as shown below. Here are the steps to configure CORS.
95291-image.png



image.png (49.5 KiB)
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi ramr, the form recognizer resource: https://shanformrecog.cognitiveservices.azure.com/. I've also attached a sample. I had setup CORS exactly how it is said in the link you provided for blob, file, queue and table tabs.



95328-2.jpg


0 Votes 0 ·
2.jpg (914.8 KiB)

Also as a follow up note, I tried the FOTT v2.0 with the same model and labels I mapped using the v2.1 but when I tried to train the model, it said it found 0 input forms when minimum 5 needed (as opposed to the "Authorization was rejected by the user-provided resource" error on v2.1). I had mapped 6 sample docs prior to attempting the training.

It seems like the program is able to access the documents in train folder fine for labeling but not able to access the same for Training the model for some reason.

0 Votes 0 ·

@ShanSudarshan-8434 Thanks for the update. we would recommend to raise a Azure support desk ticket from Help+Support blade from Azure portal for your resource if you have a support plan for your subscription. This will help you to share the details securely and work with an engineer who can provide more insights about the issue that if it can be replicated.

0 Votes 0 ·