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
翻译:从文档图像中去除退化因素不仅能提升其视觉质量和可读性,还能增强众多自动化文档分析与识别任务的性能。然而,现有基于回归的方法虽针对像素级失真降低进行了优化,但往往会出现高频信息的显著损失,导致文本边缘模糊变形。为弥补这一主要缺陷,我们提出了DocDiff,这是首个专为多种具有挑战性的文档增强问题设计的扩散模型框架,涵盖文档去模糊、去噪以及水印和印章去除。DocDiff由两个模块组成:粗预测器(CP)负责恢复主要的低频内容,而高频残差细化(HRR)模块则采用扩散模型来预测真实图像与CP预测图像之间的残差(高频信息,包括文本边缘)。得益于精心设计的网络架构、优化的训练损失目标以及短时间步的确定性采样过程,DocDiff是一个紧凑且计算高效的模型。大量实验表明,DocDiff在多个基准数据集上达到了最先进(SOTA)性能,并能显著提升退化文档图像的可读性和可识别性。此外,我们提出的HRR模块在预训练好的DocDiff中即插即用,且仅需4.17M参数。它无需额外的联合训练即可显著锐化SOTA去模糊方法生成的文本边缘。可用代码:https://github.com/Royalvice/DocDiff