Share via

Very high response time OCR Read API

NeuranceAI Technologies 11 Reputation points
2022-01-31T10:20:41.667+00:00

We are using OCR read API ( "vision/v3.2/read/analyze") to get the OCR results for a given image.

We were expecting a response time of less then 4 sec, however we are getting a response time of about 30 sec at an average.

we are using S1 pricing tier and we are sending 1 image at a time in a loop.

Code we are using is as below

with open(file_name, "rb") as image_stream:
data=image_stream.read()
response = requests.post(url,headers=headers,data=data)
analysis1 = {}

print("ocr-start",datetime.now())
while not "analyzeResult" in analysis1:
response_final = requests.get(response.headers["Operation-Location"], headers=headers)
analysis1 = response_final.json()
time.sleep(0.1)

Please help us, what are we doing wrong ..

Foundry Tools
Foundry Tools

Formerly known as Azure AI Services or Azure Cognitive Services is a unified collection of prebuilt AI capabilities within the Microsoft Foundry platform

Azure Vision in Foundry Tools

1 answer

Sort by: Most helpful
  1. Ramr-msft 17,836 Reputation points
    2022-02-01T05:40:03.4+00:00

    @NeuranceAI Technologies Thanks for the question. We have a storage connection issue happened on 1/25 on CentralUS region.

    or This is highly related to the complexity of document. Can you try using the preview model? Add this query parameter "model-version=2021-09-30-preview" to Read POST, and it will target to newer model, which has latency improvement.

    ------------------------------

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators

    Was this answer helpful?


Your answer

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