# MataDoc: Margin and Text Aware Document Dewarping for Arbitrary Boundary

arXiv: https://arxiv.org/abs/2307.12571 · HTML: https://mlsanity.com/paper/2307.12571/

## Key facts

- Cited by 4 papers in the map (data through 14 Oct 2026).
- Builds on 21 of its 50 references that are in the map.
- First posted on arXiv 24 Jul 2023.

## Builds on (most cited first, 21 of 21)

- [Attention Is All You Need](https://mlsanity.com/paper/1706.03762/) (2017)
- [Deep Residual Learning for Image Recognition](https://mlsanity.com/paper/1512.03385/) (2015)
- [End-to-End Object Detection with Transformers](https://mlsanity.com/paper/2005.12872/) (2020)
- [Encoder-Decoder with Atrous Separable Convolution for Semantic Image Segmentation](https://mlsanity.com/paper/1802.02611/) (2018)
- [Pre-Trained Image Processing Transformer](https://mlsanity.com/paper/2012.00364/) (2020)
- [PubLayNet: largest dataset ever for document layout analysis](https://mlsanity.com/paper/1908.07836/) (2019)
- [FUNSD: A Dataset for Form Understanding in Noisy Scanned Documents](https://mlsanity.com/paper/1905.13538/) (2019)
- [ICDAR2019 Competition on Scanned Receipt OCR and Information Extraction](https://mlsanity.com/paper/2103.10213/) (2021)
- [StrucTexT: Structured Text Understanding with Multi-Modal Transformers](https://mlsanity.com/paper/2108.02923/) (2021)
- [DocTr: Document Image Transformer for Geometric Unwarping and Illumination Correction](https://mlsanity.com/paper/2110.12942/) (2021)
- [Document Rectification and Illumination Correction using a Patch-based CNN](https://mlsanity.com/paper/1909.09470/) (2019)
- [Multiview Rectification of Folded Documents](https://mlsanity.com/paper/1606.00166/) (2016)
- [Geometric Representation Learning for Document Image Rectification](https://mlsanity.com/paper/2210.08161/) (2022)
- [DocScanner: Robust Document Image Rectification with Progressive Learning](https://mlsanity.com/paper/2110.14968/) (2021)
- [Revisiting Document Image Dewarping by Grid Regularization](https://mlsanity.com/paper/2203.16850/) (2022)
- [Fourier Document Restoration for Robust Document Dewarping and Recognition](https://mlsanity.com/paper/2203.09910/) (2022)
- [Dewarping Document Image By Displacement Flow Estimation with Fully Convolutional Network](https://mlsanity.com/paper/2104.06815/) (2021)
- [Document Dewarping with Control Points](https://mlsanity.com/paper/2203.10543/) (2022)
- [Can You Read Me Now? Content Aware Rectification using Angle Supervision](https://mlsanity.com/paper/2008.02231/) (2020)
- [Marior: Margin Removal and Iterative Content Rectification for Document Dewarping in the Wild](https://mlsanity.com/paper/2207.11515/) (2022)
- [TextFormer: A Query-based End-to-End Text Spotter with Mixed Supervision](https://mlsanity.com/paper/2306.03377/) (2023)

## Built on by (most cited first, 4 of 4)

- [ForCenNet: Foreground-Centric Network for Document Image Rectification](https://mlsanity.com/paper/2507.19804/) (2025)
- [D2Dewarp: Dual Dimensions Geometric Representation Learning Based Document Image Dewarping](https://mlsanity.com/paper/2507.08492/) (2025)
- [Cascaded Robust Rectification for Arbitrary Document Images](https://mlsanity.com/paper/2511.23150/) (2025)
- [Rethinking Supervision in Document Unwarping: A Self-consistent Flow-free Approach](https://mlsanity.com/paper/2610.15445/) (2026)

## Abstract (arXiv)

Document dewarping from a distorted camera-captured image is of great value for OCR and document understanding. The document boundary plays an important role which is more evident than the inner region in document dewarping. Current learning-based methods mainly focus on complete boundary cases, leading to poor document correction performance of documents with incomplete boundaries. In contrast to these methods, this paper proposes MataDoc, the first method focusing on arbitrary boundary document dewarping with margin and text aware regularizations. Specifically, we design the margin regularization by explicitly considering background consistency to enhance boundary perception. Moreover, we introduce word position consistency to keep text lines straight in rectified document images. To produce a comprehensive evaluation of MataDoc, we propose a novel benchmark ArbDoc, mainly consisting of document images with arbitrary boundaries in four typical scenarios. Extensive experiments confirm the superiority of MataDoc with consideration for the incomplete boundary on ArbDoc and also demonstrate the effectiveness of the proposed method on DocUNet, DIR300, and WarpDoc datasets.
