AAAI 2026 · Oral Presentation Proceedings Vol. 40, No. 12 · pp. 9702–9710 DOI: 10.1609/aaai.v40i12.37933

Axis-Aligned Document Dewarping

Harnessing the inherent axis-aligned geometry of planar document feature lines across UV-space training ($\mathcal{L}_{\mathrm{AL}}$), self-contained inference preprocessing ($\mathrm{AP}$), and geometric evaluation ($\mathrm{AAD}$).

Chaoyun Wang1 I-Chao Shen2 Takeo Igarashi2 Caigui Jiang1*
1National Key Laboratory of Human-Machine Hybrid Augmented Intelligence, National Engineering Research Center of Visual Information and Applications, and Institute of Artificial Intelligence and Robotics, Xi'an Jiaotong University · 2The University of Tokyo · *Corresponding Author
DocUNet DocUNet #1_1 · Curved Magazine Fold AP = [0.06]
AAD 0.0747 · LD 5.01 · MS 0.5295
Distorted input document
AADD rectified document
↔
Distorted Input AADD Full
−34.5% AAD
vs. prior SOTA on DIR300 (0.057 vs. 0.087)
−23.1% AAD
vs. UVDoc on UVDoc benchmark (0.040 vs. 0.052)
−18.2% AAD
vs. prior SOTA on DocUNet (0.099 vs. 0.121)
8.0M Params
Single-model iterative AP · In-browser ONNX
01 · Abstract & Key Insight

Geometric Axis Alignment Across the Entire Pipeline

Document dewarping is crucial for modern digitization and OCR workflows. However, existing learning-based methods rely heavily on supervised regression with annotated datasets without fully leveraging the intrinsic geometric structure of physical documents. Our core insight is that a well-dewarped document is defined by its axis-aligned feature lines—horizontal text baselines, vertical column rules, and orthogonal page borders that match the discrete UV sampling grid of planar documents. Harnessing this geometric trait without additional external annotations or auxiliary networks, we introduce three synergistic contributions across training ($\mathcal{L}_{\mathrm{AL}}$), inference ($\mathrm{AP}$), and evaluation ($\mathrm{AAD}$), achieving state-of-the-art geometric accuracy and OCR readability across DocUNet, DIR300, and UVDoc while improving AAD by 18.2% to 34.5%.

At a Glance

  • Zero Extra Labels: $\mathcal{L}_{\mathrm{AL}}$ turns canonical UV grid straightness into a differentiable regularizer on predicted grids.
  • No Extra Alignment Net: $\mathrm{AP}$ extracts a rotated bounding box from the model's own coarse boundary to eliminate tilt and clutter.
  • Interpretable Metric: $\mathrm{AAD}$ decomposes SIFT-flow along horizontal/vertical gradient saliency without global affine-fit sensitivity.
Research motivation and three axis-aligned contributions Click to zoom
Figure 1 — Core Geometric Insight. Rectified planar documents map curved text lines and page margins back onto orthogonal axis-aligned coordinates. We embed this principle consistently into training ($\mathcal{L}_{\mathrm{AL}}$), inference ($\mathrm{AP}$), and evaluation ($\mathrm{AAD}$).
02 · Methodology & Formulations

Three Synergistic Axis-Aligned Components

Training · Axis-Aligned Loss

UV-Space Geometric Constraint

Maps predicted 2D grid coordinates back into canonical UV space using differentiable linear RBF interpolation and penalizes row-wise vertical spread ($\sigma_y$) and column-wise horizontal spread ($\sigma_x$).

$$\mathcal{L}_{\mathrm{AL}} = \frac{1}{H}\sum_{i=1}^{H}\sigma_y(V_i) + \frac{1}{W}\sum_{j=1}^{W}\sigma_x(U_{\cdot,j})$$
Inference · Self-Contained AP

Axis-Alignment Preprocessing

Fits a minimum-area rotated rectangle around the coarse 2D grid boundary, de-rotates and tight-crops with margin ratio $r$ (1 pass `0.06` on DocUNet; 2 passes `0.01, 0.03` on DIR300/Real), then maps refined points back.

$$\tilde{g}_{\mathrm{orig}} = M^{-1}\!\left(\mathcal{F}_{\theta}(\mathrm{Crop}_r(R \cdot I))\right)$$
Evaluation · Metric Design

Axis-Aligned Distortion (AAD)

Decomposes dense SIFT-flow displacements weighted by normalized Sobel edge energy so residual horizontal curvature ($\mathrm{AAD}_H$) and vertical skew ($\mathrm{AAD}_V$) decouple cleanly from benign margin/scale shifts.

$$\mathrm{AAD} = \sqrt{\mathrm{AAD}_H^2 + \mathrm{AAD}_V^2}$$
Axis-Aligned Geometric Constraint Loss pipeline Click to zoom
Figure 2 — Training Constraint ($\mathcal{L}_{\mathrm{AL}}$). Predicted image-space 2D grid coordinates are interpolated onto ground-truth UV anchors via linear RBF, directly penalizing wavy rows and tilted columns during training.
Axis-Alignment Preprocessing AP illustration Click to zoom
Figure 3 — Self-Contained Preprocessing ($\mathrm{AP}$). Coarse grid boundaries yield an oriented crop without an extra detector, stabilizing small-target & rotated inputs.
Axis-Aligned Distortion AAD metric pipeline Click to zoom
Figure 4 — $\mathrm{AAD}$ Flow Decomposition. Row-wise vertical flow spread ($v_y \odot G_y$) and column-wise horizontal spread ($v_x \odot G_x$) capture perceptible line distortion.
AD vs AAD sensitivity comparison Click to zoom
Figure 5 — Perceptual Robustness ($\mathrm{AD}$ vs. $\mathrm{AAD}$). Global affine-fit $\mathrm{AD}$ over-penalizes minor aspect/padding differences, whereas $\mathrm{AAD}$ isolates actual physical warp errors.
03 · Qualitative Inspection Showcase

12 Benchmark Cases with Live SIFT-Flow AAD Heatmaps

DocUNet DocUNet #1_1 · Curved Magazine Fold AP = [0.06]
Input vs. Dewarped Output
Distorted document input
AADD output
↔
Distorted Input AADD Full
MS-SSIM ↑
--
LD ↓
--
AD ↓
--
AAD ↓ (H / V)
--
Qualitative comparison on DocUNet and DIR300 Click to zoom
Figure 6 — Paper Qualitative Comparison. Visual results and AAD heatmaps across perspective, fold, and curved cases on DocUNet & DIR300.
Qualitative ablation study Click to zoom
Figure 7 — Visual Ablation. Adding $\mathcal{L}_{\mathrm{AL}}$ aligns interior lines while $\mathrm{AP}$ eliminates rotation and background framing distortion.
04 · Interactive Inference Studio

Try AADD Live in Browser (ONNX) or GPU Server

Ready · In-Browser ONNX Runtime (WASM, Zero Server Needed)
Upload / Drop Document Image PNG, JPG, WEBP — or click a sample card on the right →
INPUT DOCUMENT --
Loading default sample...
DEWARPED OUTPUT --
Click "Run AADD Dewarping" or click Run on any right-side sample.
Tip: Click any of the 12 samples on the right panel to auto-load its recommended AP setting and test live inference.
05 · Quantitative Benchmarks & Ablation

State-of-the-Art Results Across Three Benchmarks

Method DocUNet Benchmark (130 images) DIR300 Benchmark (300 images)
MS↑ LD↓ AD↓ AAD↓ ED↓ CER↓ MS↑ LD↓ AD↓ AAD↓ ED↓ CER↓
DewarpNet (ICCV 2019) 0.4748.3620.3980.164824.50.225 0.49213.9440.3320.1471076.80.336
DDCP* (ICDAR 2021) 0.4728.9820.4280.1591124.70.280 0.55211.0200.3570.132739.30.257
DocTr (ACM MM 2021) 0.5097.7730.3690.151708.60.185 0.6167.1890.2550.107698.40.211
PaperEdge (SIGGRAPH 2022) 0.4737.9670.3680.121731.40.183 0.5847.9680.2550.091447.40.177
DocGeoNet (ECCV 2022) 0.5047.7170.3810.158695.00.187 0.6386.4030.2410.106672.50.206
FTDR (CVPR 2023) 0.4978.4160.3770.151688.30.176 0.6077.6800.2430.108639.40.198
LADoc† (ICCV 2023) 0.5256.7060.3000.121689.80.180 0.6525.7020.1950.087495.40.173
UVDoc (SIGGRAPH Asia 2023) 0.5456.8270.3160.125754.20.193 0.6217.7300.2190.101614.00.237
Ours (Baseline, w/o AL, AP) 0.5386.8970.3220.124638.10.167 0.6157.6910.2150.100633.00.243
Ours (+ AL only) 0.5496.5660.2910.105718.00.183 0.6297.8800.1760.076498.90.206
Ours (+ AP only) 0.5366.7670.3080.120628.50.165 0.6944.3030.1520.069541.60.153
Ours (Full, AL+AP) 0.5436.2490.2780.099603.10.150 0.7024.2610.1310.057405.80.132
Improvements vs. SOTA -0.4%+6.8%+7.3%+18.2%+12.4%+14.8% +7.7%+25.3%+32.8%+34.5%+9.3%+23.7%
Headless C++ SIFT-Flow Verification (OpenCV 4.12.0 · No MATLAB Required): Open-source PyTorch release reproduces the paper's full Table 1 accuracy end-to-end.
DocUNet: MS 0.544 · LD 6.143 · AD 0.278 · AAD 0.099 · ED 590.1 · CER 0.148 DIR300: MS 0.702 · LD 4.286 · AD 0.133 · AAD 0.057
06 · Citation, Resources & Related Work

BibTeX, Code & Official Artifacts

@inproceedings{wang2026aadd,
  title     = {Axis-Aligned Document Dewarping},
  author    = {Wang, Chaoyun and Shen, I-Chao and Igarashi, Takeo and Jiang, Caigui},
  booktitle = {Proceedings of the AAAI Conference on Artificial Intelligence},
  volume    = {40},
  number    = {12},
  pages     = {9702--9710},
  year      = {2026},
  doi       = {10.1609/aaai.v40i12.37933},
  url       = {https://ojs.aaai.org/index.php/AAAI/article/view/37933}
}
Acknowledgments: This work was supported by the National Natural Science Foundation of China (Grant No. 62495092), the Natural Science Basic Research Plan of Shaanxi Province, China (No. 2025SYS-SYSZD-023), and the China Scholarship Council (No. 202406280284). Evaluation and backbone implementations build upon UVDoc and Ce Liu's SIFT-flow.