Seeing Straight: Document Orientation Detection for Efficient OCR
Suranjan Goswami 1, Abhinav Ravi 2, Raja Kolla 2, Ali Faraz 2, Shaharukh Khan 2 · 2025
Read Seeing Straight: Document Orientation Detection for Efficient OCR by Suranjan Goswami 1, Abhinav Ravi 2, Raja Kolla 2, Ali Faraz 2, Shaharukh Khan 2 (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2511-04161.txt.
Introduction
Suranjan Goswami is the lead author among eight authors on detecting document orientation before optical character recognition. Scanned and photographed pages often arrive rotated, usually from camera handling, and character recognition fails badly on sideways text, making rotation correction a critical real-world preprocessing step.
A new benchmark covers rotated English documents and a multilingual set spanning eleven Indic languages with limited resources. Their fast classifier, built on a vision encoder with dynamic cropping and fine-tuned for four rotation classes, reached near-perfect accuracy on both sets, in the mid-ninety and low-ninety percent ranges. Placed before recognition, the module substantially boosted downstream OCR performance in the reported tests.
Catalog record
| CREATOR | Suranjan Goswami 1, Abhinav Ravi 2, Raja Kolla 2, Ali Faraz 2, Shaharukh Khan 2 |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 50 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2511-04161
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Seeing Straight: Document Orientation Detection for Efficient OCR Suranjan Goswami 1, Abhinav Ravi 2, Raja Kolla 2, Ali Faraz 2, Shaharukh Khan 2 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. 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). 1 Introduction Recent advancements in Vision Language Models (VLMs) 5 ; 10 ; 38 ; 8 ; 2 ; 61 ; 59 have demonstrated impressive capabilities in general purpose visual-linguistic understanding. Models such as DocOwl series ( 20 ; 21 ) , DocLLM ( 57 ) and Donut 29 have significantly advanced document understanding tasks. One of the key applications of such systems is Optical Character Recognition (OCR), which transforms scanned or photographed document images into machine-readable text. However, OCR pipelines often rely on clean inputs without dedicated mechanisms to ensure robust orientation handling. Figure 1 illustrates the impact of rotation misalignment on OCR performance for both an English as well as a Bengali script document. In the absence of rotation correction, the model exhibits recognition errors such as repetitions and hallucinations. The same OCR model produces accurate and coherent text, effectively mitigating these issues when provided with upright images. Even the benchmark evaluations are typically conducted on curated datasets like RVL-CDIP 18 , FUNSD 25 , and DocVQA 40 , inter alia , where documents are upright and well aligned. Orientation is usually assumed or corrected as a pre-processing step, limiting their robustness in practical scenarios. In contrast, real-world documents such as receipts, forms, handwritten notes, and IDs are often captured via mobile phones or scanners under uncontrolled conditions, resulting in unintended rotations. These misalignments can significantly degrade OCR and information extraction accuracy. Furthermore, existing evaluation datasets are heavily skewed toward English or Latin-script documents, with limited insights for multilingual settings, especially for Indian languages. Resources like Wikisource 1 1 1 https://wikisource.org/ , an open-access repository of digitized literary works, present a promising avenue for constructing large-scale multilingual OCR benchmarks. However, the lack of standardized, rotation-diverse, and multilingual datasets remains a bottleneck in evaluating and improving generalization of current OCR engines. To address these gaps, we propose a lightweight rotation classification module that operates as a pre-processing step to OCR in noisy, real-world settings. Specifically, we fine-tune the vision encoder of Phi-3.5-Vision-Instruct 1 as a standalone module for this task, improving OCR robustness. We formulate orientation correction as a four-class classification task over canonical angles, following prior works ( 56 ) , effective for most documents which are typically scanned or captured in vertical or horizontal orientations. Our method is efficient, accurate, and generalizes across languages and scripts, enabling reliable alignment of rotated document images before text recognition. In addition, we further introduce a novel multilingual OCR benchmark spanning 11 mid- to low-resource Indic languages, constructed from high-quality document-text pairs sourced from Wikisource. To complement this, we incorporate two standard English OCR datasets, transformed with controlled rotations to simulate real-world misalignment scenarios. Together, these form a comprehensive benchmark for evaluating OCR robustness to rotation. We evaluate our rotation correction module alongside state-of-the-art OCR models and demonstrate consistent improvements in performance across both English and Indic scripts. Our key contributions could be summarized as: • We propose a real-time, lightweight rotation classification method based on a standard vision encoder, deployable across diverse document pipelines as a pre-processing step. • We present OCR-Rotation-Bench (ORB), a novel benchmark for evaluating OCR robustness to practical image rotation scenarios. ORB consists of two subsets: (i) ORB-En, derived from rotated versions of 2 standard English datasets, and (ii) ORB-Indic, a curated set of 328 rotated real-world document images with OCR ground truth (GT) annotation across 11 Indic languages. • We conduct an exhaustive evaluation of downstream OCR performance, demonstrating significant gains in accuracy when a correction module is integrated. • We will publicly release our trained models and evaluation datasets and code to support reproducibility and community benchmarking. Hindi Bengali Tamil Malayalam Telugu Marathi Kannada Gujarati Punjabi Oriya Assamese 30 30 30 30 30 29 30 30 30 29 30 Table 1: Distribution of Indian languages represented in the ORB-Indic benchmark. 2 Related Work Rotation Correction in Document Pre-processing: Orientation correction is a fundamental step in OCR pipelines, particularly for documents captured via mobile devices or scanners. Classical methods such as projection profiles, Hough transforms, and connected component analysis estimate dominant text skew using low-level visual features 7 . al. 7 . While effective on clean, structured inputs, these approaches degrade under noise, script diversity, or low resolution. 56 formalized rotation into four canonical classes: 0^{\circ} , 90^{\circ} , 180^{\circ} , and 270^{\circ} ( -90^{\circ} in our work for clarity) 22 explored symmetry-based textual analysis in natural scenes, illustrating the effectiveness of spatial text patterns for orientation detection. While recent deep learning based approaches have explored implicit orientation correction 65 , they remain limited to English language. In contrast, our work isolates and enhances the rotation step, enabling language-agnostic benchmarking and seamless integration into existing OCR workflows. Optical Character Recognition (OCR): OCR systems have progressed from traditional rule-based engines like Tesseract 49 to deep learning models that integrate visual and sequential components. Modern approaches such as docTR 34 , and TrOCR 33 demonstrate strong performance on both printed and handwritten text in English, leveraging transformer-based visual encoders and pretrained language decoders. However, these models typically assume upright inputs, and even minor rotations can significantly degrade recognition accuracy, highlighting the need for explicit orientation correction. On the other hand, recent multilingual OCR systems, such as the closed-source Chitrapathak, GPT-4o, Gemini-2.5 Flash and Gemini-2.5 Pro 2 2 2 https://ai-labs.olakrutrim.com/ https://platform.openai.com/docs/models/gpt-4o/ https://deepmind.google/models/gemini/ have broadened language support. Recently released open-source solution like Nanonets 41 claims to provide industrial-grade OCR pipelines, utilizing fine-tuned Qwen-VL backbones 6 , effectively bridging foundational vision-language models with document-specific applications in the multi-lingual setting. We benchmark the performance of these models on both structured and free form generations with our trained module. VLMs for Document Understanding: Recent VLMs such as the LLaVA family ( 36 ; 35 ) have advanced multimodal