If you're using version 2 of the Azure AI Vision Read OCR container, use this article to learn how to upgrade your application to use version 3.x of the container.
API changes
The Read v3.2 container uses version 3 of the Azure AI Vision API and has the following endpoints:
/vision/v3.2/read/analyzeResults/{operationId}
/vision/v3.2/read/analyze
/vision/v3.2/read/syncAnalyze
See the Azure AI Vision v3 REST API migration guide for detailed information on updating your applications to use version 3 of the Read API. Synchronous operations are only supported in containers.
Configuration changes
ReadEngineConfig:ResultExpirationPeriod is no longer supported. The Read OCR container has a built Cron job that removes the results and metadata associated with a request after 48 hours.
Cache:Redis:Configuration is no longer supported. The Cache isn't used in the v3.x containers, so you don't need to set it.
Memory requirements
The requirements and recommendations are based on benchmarks with a single request per second, using a 523-KB image of a scanned business letter that contains 29 lines and a total of 803 characters. The following table describes the minimum and recommended allocations of resources for each Read OCR container.
Container
Minimum
Recommended
Read 3.2 2022-04-30
4 cores, 8-GB memory
8 cores, 16-GB memory
Each core must be at least 2.6 gigahertz (GHz) or faster.
Core and memory correspond to the --cpus and --memory settings, which are used as part of the docker run command.
Storage implementations
Note
MongoDB is no longer supported in 3.x versions of the container. Instead, the containers support Azure Storage and offline file systems.
Implementation
Required runtime argument(s)
File level (default)
No runtime arguments required. /share directory will be used.
For added redundancy, the Read v3.x container uses a visibility timer to ensure requests can be successfully processed if a crash occurs when running in a multi-container setup.
Set the timer with Queue:Azure:QueueVisibilityTimeoutInMilliseconds, which sets the time for a message to be invisible when another worker is processing it. To avoid pages from being redundantly processed, we recommend setting the timeout period to 120 seconds. The default value is 30 seconds.
Azure's AI Vision service uses advanced algorithms to process images and return information based on the visual features you're interested in. This module teaches you how to use the Azure AI Vision Image Analysis OCR feature.