Abstract
Document shadow removal is a crucial task in the field of document image enhancement. However, existing methods tend to remove shadows with constant color background and ignore color shadows. In this paper, we first design a diffusion model in latent space for document image shadow removal, called DocShaDiffusion. It translates shadow images from pixel space to latent space, enabling the model to more easily capture essential features. To address the issue of color shadows, we design a shadow soft-mask generation module (SSGM). It is able to produce accurate shadow mask and add noise into shadow regions specially. Guided by the shadow mask, a shadow mask-aware guided diffusion module (SMGDM) is proposed to remove shadows from document images by supervising the diffusion and denoising process. We also propose a shadow-robust perceptual feature loss to preserve details and structures in document images. Moreover, we develop a large-scale synthetic document color shadow removal dataset (SDCSRD). It simulates the distribution of realistic color shadows and provides powerful supports for the training of models. Experiments on three public datasets validate the proposed method's superiority over state-of-the-art. Our code and dataset will be publicly available.
Abstract (translated)
文档阴影去除是文档图像增强领域中的一个重要任务。然而,现有的方法倾向于移除具有恒定颜色背景的阴影,并忽视了彩色阴影的存在。在本文中,我们首次设计了一个用于文档图像去阴影处理的潜在空间扩散模型,命名为DocShaDiffusion。该模型能够将含有阴影的图像从像素空间转换到潜在空间,从而使得模型更容易捕捉到关键特征。为了解决彩色阴影的问题,我们设计了一种名为影子软掩码生成模块(SSGM)的方法,它能够准确地生成影子掩码,并在影子区域特别添加噪声。通过影子掩码的引导,我们提出了一个影子掩码感知指导扩散模块(SMGDM),该模块可以在文档图像中去除阴影并通过监督扩散和去噪过程实现这一目标。此外,为了保持文档图像中的细节和结构信息不受损失,我们还提出了一种抗阴影的感知特征损失函数。同时,我们开发了一个大规模合成的文档彩色阴影去除数据集(SDCSRD),该数据集模拟了实际颜色阴影的分布情况,并为模型训练提供了强有力的支持。在三个公开的数据集上的实验验证了所提方法优于当前最先进的技术。我们的代码和数据集将公开发布。
URL
https://arxiv.org/abs/2507.01422