DocDiff: Document Enhancement via Residual Diffusion Models

Zongyuan Yang, Baolin Liu, Yongping Xiong, Lan Yi, Guibin Wu +4 more
5/6/2023
cs.CV

Official code: Royalvice/DocDiff (353 stars, MIT, PyTorch, last commit 2024-08-22).

Abstract

Removing degradation from document images not only improves their visual quality and readability, but also enhances the performance of numerous automated document analysis and recognition tasks. However, existing regression-based methods optimized for pixel-level distortion reduction tend to suffer from significant loss of high-frequency information, leading to distorted and blurred text edges. To compensate for this major deficiency, we propose DocDiff, the first diffusion-based framework specifically designed for diverse challenging document enhancement problems, including document deblurring, denoising, and removal of watermarks and seals. DocDiff consists of two modules: the Coarse Predictor (CP), which is responsible for recovering the primary low-frequency content, and the High-Frequency Residual Refinement (HRR) module, which adopts the diffusion models to predict the residual (high-frequency information, including text edges), between the ground-truth and the CP-predicted image. DocDiff is a compact and computationally efficient model that benefits from a well-designed network architecture, an optimized training loss objective, and a deterministic sampling process with short time steps. Extensive experiments demonstrate that DocDiff achieves state-of-the-art (SOTA) performance on multiple benchmark datasets, and can significantly enhance the readability and recognizability of degraded document images. Furthermore, our proposed HRR module in pre-trained DocDiff is plug-and-play and ready-to-use, with only 4.17M parameters. It greatly sharpens the text edges generated by SOTA deblurring methods without additional joint training. Available codes: https://github.com/Royalvice/DocDiff

View on arXivView PDF

Code Implementations(1)

Royalvice/DocDiffOfficial100%
PyTorchMIT

ACM Multimedia 2023: DocDiff: Document Enhancement via Residual Diffusion Models. Also contains 1597 red seals in Chinese scenes, along with their corresponding binary masks.

35333PythonMar 19, 20232 years agoMIT
datasetdeblurringdeep-learningdiffusion-modelsdocument-binarization+11 more

Similar Papers

Cite this paper

@article{yang2023docdiff,
  title  = {DocDiff: Document Enhancement via Residual Diffusion Models},
  author = {Zongyuan Yang and Baolin Liu and Yongping Xiong and Lan Yi and Guibin Wu and Xiaojun Tang and Ziqi Liu and Junjie Zhou and Xing Zhang},
  year   = {2023},
  eprint = {2305.03892},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2305.03892v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2305.03892.svg)](https://codeofpaper.com/paper/2305.03892)

Discussion