# Marior: Margin Removal and Iterative Content Rectification for Document Dewarping in the Wild

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

## Key facts

- Cited by 16 papers in the map (data through 14 Oct 2026).
- Builds on 17 of its 49 references that are in the map.
- First posted on arXiv 23 Jul 2022.

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

- [Attention Is All You Need](https://mlsanity.com/paper/1706.03762/) (2017)
- [Adam: A Method for Stochastic Optimization](https://mlsanity.com/paper/1412.6980/) (2014)
- [Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks](https://mlsanity.com/paper/1506.01497/) (2015)
- [Encoder-Decoder with Atrous Separable Convolution for Semantic Image Segmentation](https://mlsanity.com/paper/1802.02611/) (2018)
- [CBAM: Convolutional Block Attention Module](https://mlsanity.com/paper/1807.06521/) (2018)
- [Describing Textures in the Wild](https://mlsanity.com/paper/1311.3618/) (2013)
- [Random Erasing Data Augmentation](https://mlsanity.com/paper/1708.04896/) (2017)
- [Multi-Scale Context Aggregation by Dilated Convolutions](https://mlsanity.com/paper/1511.07122/) (2015)
- [Semantic Segmentation using Adversarial Networks](https://mlsanity.com/paper/1611.08408/) (2016)
- [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)
- [DocScanner: Robust Document Image Rectification with Progressive Learning](https://mlsanity.com/paper/2110.14968/) (2021)
- [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)
- [A Gated and Bifurcated Stacked U-Net Module for Document Image Dewarping](https://mlsanity.com/paper/2007.09824/) (2020)

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

- [M6Doc: A Large-Scale Multi-Format, Multi-Type, Multi-Layout, Multi-Language, Multi-Annotation Category Dataset for Modern Document Layout Analysis](https://mlsanity.com/paper/2305.08719/) (2023)
- [DocRes: A Generalist Model Toward Unifying Document Image Restoration Tasks](https://mlsanity.com/paper/2405.04408/) (2024)
- [Visual Text Processing: A Comprehensive Review and Unified Evaluation](https://mlsanity.com/paper/2504.21682/) (2025)
- [UVDoc: Neural Grid-based Document Unwarping](https://mlsanity.com/paper/2302.02887/) (2023)
- [Deep Unrestricted Document Image Rectification](https://mlsanity.com/paper/2304.08796/) (2023)
- [Visual Text Meets Low-level Vision: A Comprehensive Survey on Visual Text Processing](https://mlsanity.com/paper/2402.03082/) (2024)
- [MataDoc: Margin and Text Aware Document Dewarping for Arbitrary Boundary](https://mlsanity.com/paper/2307.12571/) (2023)
- [DvD: Unleashing a Generative Paradigm for Document Dewarping via Coordinates-based Diffusion Model](https://mlsanity.com/paper/2505.21975/) (2025)
- [DocAligner: Annotating Real-world Photographic Document Images by Simply Taking Pictures](https://mlsanity.com/paper/2306.05749/) (2023)
- [ForCenNet: Foreground-Centric Network for Document Image Rectification](https://mlsanity.com/paper/2507.19804/) (2025)
- [Document Image Rectification Bases on Self-Adaptive Multitask Fusion](https://mlsanity.com/paper/2505.06038/) (2025)
- [D2Dewarp: Dual Dimensions Geometric Representation Learning Based Document Image Dewarping](https://mlsanity.com/paper/2507.08492/) (2025)
- [TADoc: Robust Time-Aware Document Image Dewarping](https://mlsanity.com/paper/2508.06988/) (2025)
- [Cascaded Robust Rectification for Arbitrary Document Images](https://mlsanity.com/paper/2511.23150/) (2025)
- [SyntheticDoc: A Large Synthetic Dataset for Document Unwarping and Illumination Correction](https://mlsanity.com/paper/2609.15503/) (2026)
- [Rethinking Supervision in Document Unwarping: A Self-consistent Flow-free Approach](https://mlsanity.com/paper/2610.15445/) (2026)

## Abstract (arXiv)

Camera-captured document images usually suffer from perspective and geometric deformations. It is of great value to rectify them when considering poor visual aesthetics and the deteriorated performance of OCR systems. Recent learning-based methods intensively focus on the accurately cropped document image. However, this might not be sufficient for overcoming practical challenges, including document images either with large marginal regions or without margins. Due to this impracticality, users struggle to crop documents precisely when they encounter large marginal regions. Simultaneously, dewarping images without margins is still an insurmountable problem. To the best of our knowledge, there is still no complete and effective pipeline for rectifying document images in the wild. To address this issue, we propose a novel approach called Marior (Margin Removal and Iterative Content Rectification). Marior follows a progressive strategy to iteratively improve the dewarping quality and readability in a coarse-to-fine manner. Specifically, we divide the pipeline into two modules: margin removal module (MRM) and iterative content rectification module (ICRM). First, we predict the segmentation mask of the input image to remove the margin, thereby obtaining a preliminary result. Then we refine the image further by producing dense displacement flows to achieve content-aware rectification. We determine the number of refinement iterations adaptively. Experiments demonstrate the state-of-the-art performance of our method on public benchmarks. The resources are available at https://github.com/ZZZHANG-jx/Marior for further comparison.
