Guide for OCR Modes Available with Private AI DEID Container
info
If you are using the Private AI container, the OCR system is configured through environment variables. For detailed instructions, refer to the sections on Environment Variables and the Guide for Integrating Private AI DEID container with Azure OCR. You can configure more than one OCR systems.
Once configured, the OCR system can be selected either via environment variables or directly in the REST request.
This guide outlines the different Optical Character Recognition (OCR) modes available for processing documents and images. Each mode has its unique application, depending on the document's nature and the specific requirements for text extraction.
Table of contents:
Standard OCR
Attribute | Rating |
---|---|
Accuracy | Medium |
Speed | High |
Cost | Low |
Standard OCR is built into the container and is the default OCR engine. It's designed for high-performance text recognition in images and digital documents, focusing on efficiency and accuracy for standard printed text.
The control flow for Standard OCR mode is depicted in the following flow chart:
When to choose Standard OCR?
- Most cost efficient OCR solution is needed.
Azure Computer Vision OCR
Attribute | Rating |
---|---|
Accuracy | High |
Speed | High |
Cost | Medium |
Azure Computer Vision OCR uses Microsoft's Computer Vision API to analyze and extract text from a wide range of document types. It's particularly effective for complex documents, including those with handwriting, images, and various fonts, layouts, rotations, and Japanese characters.
To use this OCR mode, set PAI_OCR_SYSTEM=azure_computer_vision
as an environment variable at container startup or specify it directly in the request parameters. Check out our Guide for Integrating Private AI DEID container with Azure OCR for setup information.
The control flow is similar to the Standard OCR mode.
When to choose Azure Computer Vision OCR?
- Handwriting support is needed.
- Rotated document support is needed.
- Enhanced language support is needed.
- Wide range of supported languages, such as Japanese. See Azure OCR Language support for more details.
Azure Document Intelligence
Attribute | Rating |
---|---|
Accuracy | High |
Speed | High |
Cost | High |
Azure Document Intelligence uses Microsoft's Document Intelligence API. On top of what Azure Computer Vision OCR already offers, Document Intelligence provide advanced features for complex layouts like tables and forms.
To use this OCR mode, set PAI_OCR_SYSTEM=azure_computer_vision
as an environment variable at container startup or specify it directly in the request parameters. Check out our Guide for Integrating Private AI DEID container with Azure OCR for setup information.
The control flow is similar to the Standard OCR mode.
When to choose Azure Document Intelligence?
- Need advanced features for complex layouts like tables and forms.
- Handwriting support is needed.
- Rotated document support is needed.
- Enhanced language support is needed.
- Wide range of supported languages. See Azure OCR Language support for more details.
Hybrid OCR
Attribute | Rating |
---|---|
Accuracy | Medium |
Speed | High |
Cost | Medium |
The Hybrid OCR mode combines Azure Computer Vision OCR and Standard OCR to optimize text extraction and the cost for PDF documents. This mode uses Azure Computer Vision OCR for pages containing graphics and switches to Standard OCR for other pages. The choice between OCR modes is made on a page by page basis.
The setup of OCR in hybrid mode is the same as Azure Computer Vision OCR mode. Simply follow our Guide for Integrating Private AI DEID container with Azure OCR & use PAI_OCR_SYSTEM=hybrid
either as an environment variable or specify it in the request parameters, instead of PAI_OCR_SYSTEM=azure_computer_vision
.
The control flow for Hybrid OCR mode is depicted in the following flow chart:
When to choose Hybrid OCR?
- Need a mix of performance and cost effectiveness.
- Need to process mainly PDFs. For other document types the Hybrid OCR will work just like the Standard OCR.