Table of Contents
Fetching ...

Seeing Straight: Document Orientation Detection for Efficient OCR

Suranjan Goswami, Abhinav Ravi, Raja Kolla, Ali Faraz, Shaharukh Khan, Akash, Chandra Khatri, Shubham Agarwal

TL;DR

This work tackles the practical challenge of document orientation in OCR by introducing OCR-Rotation-Bench (ORB), a multilingual benchmark with ORB-En (English) and ORB-Indic (11 Indic languages) to evaluate rotation robustness. It proposes a lightweight 4-class rotation classifier built on the Phi-3.5-Vision backbone with dynamic cropping, achieving approximately 96.8% and 92.7% accuracy on ORB-En and ORB-Indic, respectively, and demonstrating substantial downstream OCR improvements when used as a pre-processing step. The study reveals that state-of-the-art VLMs struggle with basic rotation tasks, while the proposed module yields significant gains across both structured and free-form OCR across languages, underscoring the importance of task-focused benchmarks and modular preprocessing for robust document understanding. Overall, the combination of ORB and the rotation classifier provides a practical, scalable solution for real-world OCR pipelines and invites future work on arbitrary-angle rotation, skew correction, and layout-aware OCR for diverse scripts.

Abstract

Despite significant advances in document understanding, determining the correct orientation of scanned or photographed documents remains a critical pre-processing step in the real world settings. Accurate rotation correction is essential for enhancing the performance of downstream tasks such as Optical Character Recognition (OCR) where misalignment commonly arises due to user errors, particularly incorrect base orientations of the camera during capture. In this study, we first introduce OCR-Rotation-Bench (ORB), a new benchmark for evaluating OCR robustness to image rotations, comprising (i) ORB-En, built from rotation-transformed structured and free-form English OCR datasets, and (ii) ORB-Indic, a novel multilingual set spanning 11 Indic mid to low-resource languages. We also present a fast, robust and lightweight rotation classification pipeline built on the vision encoder of Phi-3.5-Vision model with dynamic image cropping, fine-tuned specifically for 4-class rotation task in a standalone fashion. Our method achieves near-perfect 96% and 92% accuracy on identifying the rotations respectively on both the datasets. Beyond classification, we demonstrate the critical role of our module in boosting OCR performance: closed-source (up to 14%) and open-weights models (up to 4x) in the simulated real-world setting.

Seeing Straight: Document Orientation Detection for Efficient OCR

TL;DR

This work tackles the practical challenge of document orientation in OCR by introducing OCR-Rotation-Bench (ORB), a multilingual benchmark with ORB-En (English) and ORB-Indic (11 Indic languages) to evaluate rotation robustness. It proposes a lightweight 4-class rotation classifier built on the Phi-3.5-Vision backbone with dynamic cropping, achieving approximately 96.8% and 92.7% accuracy on ORB-En and ORB-Indic, respectively, and demonstrating substantial downstream OCR improvements when used as a pre-processing step. The study reveals that state-of-the-art VLMs struggle with basic rotation tasks, while the proposed module yields significant gains across both structured and free-form OCR across languages, underscoring the importance of task-focused benchmarks and modular preprocessing for robust document understanding. Overall, the combination of ORB and the rotation classifier provides a practical, scalable solution for real-world OCR pipelines and invites future work on arbitrary-angle rotation, skew correction, and layout-aware OCR for diverse scripts.

Abstract

Despite significant advances in document understanding, determining the correct orientation of scanned or photographed documents remains a critical pre-processing step in the real world settings. Accurate rotation correction is essential for enhancing the performance of downstream tasks such as Optical Character Recognition (OCR) where misalignment commonly arises due to user errors, particularly incorrect base orientations of the camera during capture. In this study, we first introduce OCR-Rotation-Bench (ORB), a new benchmark for evaluating OCR robustness to image rotations, comprising (i) ORB-En, built from rotation-transformed structured and free-form English OCR datasets, and (ii) ORB-Indic, a novel multilingual set spanning 11 Indic mid to low-resource languages. We also present a fast, robust and lightweight rotation classification pipeline built on the vision encoder of Phi-3.5-Vision model with dynamic image cropping, fine-tuned specifically for 4-class rotation task in a standalone fashion. Our method achieves near-perfect 96% and 92% accuracy on identifying the rotations respectively on both the datasets. Beyond classification, we demonstrate the critical role of our module in boosting OCR performance: closed-source (up to 14%) and open-weights models (up to 4x) in the simulated real-world setting.

Paper Structure

This paper contains 27 sections, 2 equations, 3 figures, 8 tables.

Figures (3)

  • Figure 1: OCR workflow comparison with and without rotation correction on sample English and Indic documents. Errors due to misalignment such as repetitions and hallucinations (in red) are mitigated by our module, yielding accurate outputs (in green).
  • Figure 2: Sample images from the ORB-Indic dataset along with their predicted rotation classes and corresponding ground truth OCR outputs. Each row presents an input document image, the predicted orientation label, and the correct OCR result. The rotation classification model accurately predicted the orientation for all examples shown.
  • Figure 3: We show failure cases from the ORB-Indic (a), ORB-En-SynthDog (b) and ORB-En-SROIE datasets (c), discussed in Section \ref{['sec:results']}.