Skip to main content
QUICK REVIEW

[Paper Review] Deep Unrestricted Document Image Rectification

Hao Feng, Shaokai Liu|arXiv (Cornell University)|Apr 18, 2023
Handwritten Text Recognition TechniquesComputer Science3 citations
TL;DR

This paper proposes DocTr++, a novel deep learning framework for unrestricted document image rectification that works on any distorted document image—regardless of whether it contains complete, partial, or no document boundaries. By introducing a hierarchical encoder-decoder architecture, reformulating pixel-wise mapping for unrestricted inputs, and proposing a real-world test set with new metrics, DocTr++ achieves state-of-the-art performance on both benchmark and in-the-wild datasets, significantly improving OCR accuracy and generalization across complex distortions.

ABSTRACT

In recent years, tremendous efforts have been made on document image rectification, but existing advanced algorithms are limited to processing restricted document images, i.e., the input images must incorporate a complete document. Once the captured image merely involves a local text region, its rectification quality is degraded and unsatisfactory. Our previously proposed DocTr, a transformer-assisted network for document image rectification, also suffers from this limitation. In this work, we present DocTr++, a novel unified framework for document image rectification, without any restrictions on the input distorted images. Our major technical improvements can be concluded in three aspects. Firstly, we upgrade the original architecture by adopting a hierarchical encoder-decoder structure for multi-scale representation extraction and parsing. Secondly, we reformulate the pixel-wise mapping relationship between the unrestricted distorted document images and the distortion-free counterparts. The obtained data is used to train our DocTr++ for unrestricted document image rectification. Thirdly, we contribute a real-world test set and metrics applicable for evaluating the rectification quality. To our best knowledge, this is the first learning-based method for the rectification of unrestricted document images. Extensive experiments are conducted, and the results demonstrate the effectiveness and superiority of our method. We hope our DocTr++ will serve as a strong baseline for generic document image rectification, prompting the further advancement and application of learning-based algorithms. The source code and the proposed dataset are publicly available at https://github.com/fh2019ustc/DocTr-Plus.

Motivation & Objective

  • To address the limitation of existing document image rectification methods that require complete document boundaries in input images.
  • To develop a unified deep learning framework capable of rectifying any distorted document image, including those with partial or no visible boundaries.
  • To improve rectification quality in real-world scenarios involving shadows, noise, and complex deformations.
  • To contribute a new real-world test set and robust evaluation metrics tailored for unrestricted document image rectification.
  • To demonstrate the effectiveness of DocTr++ as a strong baseline for future research in geometric correction of document images.

Proposed method

  • Adopting a hierarchical encoder-decoder structure to extract multi-scale representations from distorted document images.
  • Reformulating the pixel-wise mapping between unrestricted distorted images and their distortion-free counterparts to enable end-to-end training without boundary constraints.
  • Using a learnable query-based decoder mechanism inspired by DETR to predict displacement fields for geometric un-warping.
  • Training the model using a self-supervised signal derived from the reformulated mapping, enabling supervision without ground-truth rectified images.
  • Introducing a novel loss function that combines perceptual and structural consistency to enhance visual quality and geometric accuracy.
  • Contributing a real-world test set with diverse distortion types and proposing new metrics (MSSIM-M and LD-M) that are robust to black regions and background noise.

Experimental results

Research questions

  • RQ1Can a deep learning model achieve high-quality document image rectification without requiring complete document boundaries in the input?
  • RQ2How can a unified framework effectively handle the full spectrum of document distortions, including partial and no boundaries, shadows, and noise?
  • RQ3What are the key architectural and training components that enable robust performance on unrestricted document images?
  • RQ4How do the proposed evaluation metrics outperform standard metrics like MSSIM and LD in assessing rectification quality for real-world images?
  • RQ5To what extent does geometric correction with DocTr++ improve downstream OCR and multimodal model performance?

Key findings

  • DocTr++ achieves a 50.89% character error rate (CER) on the DocUNet benchmark, which is reduced to 16.95% after rectification, demonstrating a significant improvement in OCR robustness.
  • On the proposed UDIR benchmark, the CER drops from 39.86% to 22.88% after rectification, confirming the method’s effectiveness on real-world distortions.
  • The proposed metrics MSSIM-M and LD-M are more robust than standard MSSIM and LD, as they effectively distinguish between high-quality and degraded rectified outputs in the presence of black regions.
  • DocTr++ produces consistently neat rectified images with straight textlines even on handwriting and complex background images, showing strong generalization and robustness.
  • The model improves text detection rates and enables accurate multimodal understanding in Qwen-VL, confirming its value as a preprocessing step for downstream vision and language tasks.
  • Extensive ablation studies validate the effectiveness of the hierarchical architecture, the reformulated mapping, and the new loss components in boosting rectification quality.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.