arXiv:2410.21721cs.CV2024-10被引 6

用扩散模型+精修掩码实现更自然的场景文字移除

DiffSTR: Controlled Diffusion Models for Scene Text Removal

  • 将文字移除视为修复任务,用控制网络扩散模型生成图像
  • 在两个数据集上优于现有方法,减少边界伪影和纹理不一致
  • 适合关注隐私保护与图像编辑的开发者使用

为防止图像中文本被滥用,场景文字移除(STR)成为关键任务。其目标是自动移除文本并替换为自然、无文字的背景,同时保留纹理、色彩和对比度等重要细节。尽管对隐私保护至关重要,现有方法仍面临边界伪影、纹理颜色不一致及阴影失真等问题。多数方法依赖文本区域掩码训练模型,通过图像翻译或修复生成无文字图像,因此生成质量受限于掩码精度与生成器能力。本文利用扩散模型在生成高质量一致性图像方面的优势,提出一种基于ControlNet的扩散模型框架,将STR视为修复任务。为提升鲁棒性,设计了掩码预训练流程:先用盒状掩码与粗略笔画掩码训练掩码自编码器(MAE),再通过新颖的基于分割的掩码精炼框架进行微调。该框架迭代优化初始掩码,结合SLIC与分层特征选择(HFS)算法进行分割,生成精确文本掩码,有效利用自然场景图像中的丰富纹理信息。在SCUT-EnsText和SCUT-Syn数据集上的实验表明,本方法显著优于当前最先进技术。

原文摘要 · Abstract (English)

To prevent unauthorized use of text in images, Scene Text Removal (STR) has become a crucial task. It focuses on automatically removing text and replacing it with a natural, text-less background while preserving significant details such as texture, color, and contrast. Despite its importance in privacy protection, STR faces several challenges, including boundary artifacts, inconsistent texture and color, and preserving correct shadows. Most STR approaches estimate a text region mask to train a model, solving for image translation or inpainting to generate a text-free image. Thus, the quality of the generated image depends on the accuracy of the inpainting mask and the generator's capability. In this work, we leverage the superior capabilities of diffusion models in generating high-quality, consistent images to address the STR problem. We introduce a ControlNet diffusion model, treating STR as an inpainting task. To enhance the model's robustness, we develop a mask pretraining pipeline to condition our diffusion model. This involves training a masked autoencoder (MAE) using a combination of box masks and coarse stroke masks, and fine-tuning it using masks derived from our novel segmentation-based mask refinement framework. This framework iteratively refines an initial mask and segments it using the SLIC and Hierarchical Feature Selection (HFS) algorithms to produce an accurate final text mask. This improves mask prediction and utilizes rich textural information in natural scene images to provide accurate inpainting masks. Experiments on the SCUT-EnsText and SCUT-Syn datasets demonstrate that our method significantly outperforms existing state-of-the-art techniques.

图像修复扩散模型文字移除

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。