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.
