question

DidrikSkantze-2693 avatar image
1 Vote"
DidrikSkantze-2693 asked Doru-2304 answered

Computer Vision API 3.0 - Get Read Result

Before getting to development, I thought I'd test the Post Read and Get Read Result via the console API.
Successfully received response from all the other computer vision API ( Analyze Image, Describe Image ... ).
When trying the same with the Read, using this example pdf https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf
I do get a success response message, but when I try to use the returned apim-request-id: e4a6a9a4-e8c0-45a5-bc46-53d62308b661
( or any other request id ), I keep getting,
"Operation ID is invalid, expired or the results matching this operationId have been deleted"

Example: Read response:
Operation-Location: https://eastus.api.cognitive.microsoft.com/vision/v3.0/read/analyzeResults/e4a6a9a4-e8c0-45a5-bc46-53d62308b661
x-envoy-upstream-service-time: 229
CSP-Billing-Usage: CognitiveServices.ComputerVision.Transaction=1
apim-request-id: e4a6a9a4-e8c0-45a5-bc46-53d62308b661
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
x-content-type-options: nosniff
Date: Tue, 30 Jun 2020 08:14:18 GMT
Content-Length: 0

GET https://eastus.api.cognitive.microsoft.com/vision/v3.0-preview/read/analyzeResults/e4a6a9a4-e8c0-45a5-bc46-53d62308b661 HTTP/1.1
Host: eastus.api.cognitive.microsoft.com
Ocp-Apim-Subscription-Key: ••••••••••••••••••••••••••••••••

Transfer-Encoding: chunked
x-envoy-upstream-service-time: 13
CSP-Billing-Usage: CognitiveServices.ComputerVision.Transaction=1
apim-request-id: b1dfcf4e-f820-4c21-8198-d15696eb12b4
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
x-content-type-options: nosniff
Date: Tue, 30 Jun 2020 08:14:49 GMT
Content-Type: application/json; charset=utf-8

{
"error": {
"code": "BadArgument",
"message": "Operation ID is invalid, expired or the results matching this operationId have been deleted."
}
}

I have tried this with both Free and Paid version, eastus and westus location, still receiving the Operation ID invalid response.
Any suggestion?

azure-cognitive-servicesazure-computer-vision
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.

ramr-msft avatar image
1 Vote"
ramr-msft answered ramr-msft edited

@DidrikSkantze-2693 I am able to execute the Computer Vision API 3.0 Read and Get Read Result via the console API using this example pdf in westus location. https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf
Can you please add more details about the API type you have created in the azure portal.


https://westus.dev.cognitive.microsoft.com/docs/services/computer-vision-v3-ga/operations/5d986960601faab4bf452005


Here is the snapshot for the same, Could you please retry once again with the key.
10954-screenshot-163.png.





screenshot-163.png (31.5 KiB)
· 1
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.

Read v3.0 of the Cognitive Services Computer Vision API entered GA. This release features a major upgrade to READ API, bringing support for new languages - English, Dutch, French, German, Italian, Spanish, and Portuguese to General Availability, major improvements to our English results, support for top global currency symbols, and auto mixed languages mode in the same document.
JFYI, in our internal benchmarking we are clearly outperforming our competition in
• BookCover
• BusinessCard
• Document
• Invoice
• Menu
• Poster
• ProductLabel
• Receipt
• Slide
• StreetView
• Table
• Handwriting


Also please see https://cazton.com/blogs/executive/handwriting-recognition-azure-aws-gcp, where we have outperformed.


0 Votes 0 ·
Doru-2304 avatar image
0 Votes"
Doru-2304 answered

I hit the same issue.
The problem was that on the website the generated code is sill using the preview urls (v3.0-preview):

https://eastus.api.cognitive.microsoft.com/vision/v3.0-preview/read/analyzeResults/e4a6a9a4-e8c0-45a5-bc46-53d62308b661

Or when you POST you used the GA url (note the v3.0):
https://eastus.api.cognitive.microsoft.com/vision/v3.0/read/analyzeResults/e4a6a9a4-e8c0-45a5-bc46-53d62308b661


In my case once I used v3.1 in both cases
/vision/v3.1/read/analyzeResults
everything worked.



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.