PureDoc: Zero-Blur Document Watermark Removal via Exact Affine Physical Inversion and Whole-Page Layout Attention
Removing visible watermarks from digital and scanned documents poses four intertwined challenges: (1) extreme visual heterogeneity spanning grayscale diagonals, high-chroma multi-color emblems, tiled golden text, hollow stroke outlines, and floating oval seals; (2) stroke blurring and glyph hallucination introduced by generative or pixel-regression networks when reconstructing dense typography, mathematical formulas, and 1-pixel table borders; (3) persistent haze over text strokes ("over-text veil") caused by Porter-Duff Source-Over alpha compositing that single-parameter multiplicative models or rigid ink locking fail to invert; and (4) semantic fragmentation and severe kernel-launch latency incurred by sliding-window patch inference. We present PureDoc, an end-to-end physics-constrained whole-page document watermark removal framework grounded in two-parameter exact affine physical inversion and global layout self-attention. First, we prove that both Under-text Multiply and Over-text Alpha Blending obey a unified closed-form inverse C = P + (I - rho * P) / a parameterized by spatially smooth paper-normalized transmittance and stroke contrast slope. Paired with a one-sided ink-core lock, the neural network predicts only low-frequency optical fields without synthesizing a single high-frequency pixel—mathematically guaranteeing zero stroke blurring while completely peeling milky or colored veils off covered black and red printed text. Second, we design a 13-channel physics and 4x opponent-chroma input representation, a bijective lossless PixelUnshuffle(2) high-frequency stem, and resolution-agnostic 2D FlashAttention-2 global layout blocks at 1/32 and 1/16 scales, enabling seamless single-pass whole-page inference (1088x1536) coupled with O(1) GPU edge-guided native upsampling. Third, we derive a closed-form cross-page over-text opacity estimator for multi-page documents (BookWatermarkSolver) and train PureDoc via a strictly zero-handwriting, book-disjoint three-stream curriculum incorporating surgically stripped real vector PDF pairs, real transmittance templates, and hard-negative foregrounds (printed colored annotations and borderless shaded callout boxes). Across both a copyright-free 30-page multi-family benchmark (OpenDoc-WM-Bench) and 10 strictly held-out real-world books (including 45 pixel-exact real ground-truth pages), PureDoc achieves 41.20–43.80 dB body PSNR on real ground-truth documents, 96.4%–99.9% watermark contrast removal, 0.0000 ink-core wash-out, 0.071–0.126 / 255 MAD on printed red annotations, and 0.0% false positives on borderless gray callout boxes, while reducing watermark-zone CIELAB Delta E from 4.91 to 1.45 (3.4x lower than single-parameter patch unmixing) and running end-to-end in 144 ms/page on an RTX 4090 (1.95 GB VRAM) and 447 ms/page on a consumer laptop RTX 3060 (1.77 GB VRAM, 6.6x faster than patch inference).
Authors
- Qingshuo Wang
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-12-03
- DOI
- https://doi.org/10.5281/zenodo.24785657
- Primary Topic
- Advanced Steganography and Watermarking Techniques
- Type
- preprint