arXiv:2411.15245cs.CV2024-11被引 47

让图像中的文字可自定义字体颜色,支持多语言精准生成

AnyText2: Visual Text Generation and Editing With Customizable Attributes

  • 将文字渲染能力注入预训练模型,提升真实感与速度
  • 中文文本准确率提升3.3%,英文提升9.3%,推理速度加快19.8%
  • 适合需要精细控制图文属性的场景应用,如广告设计、界面生成

随着文本到图像(T2I)技术的发展,如何使生成的文字自然融入视觉内容成为研究热点。然而,即便文本生成准确,若无法控制字体与颜色,仍会限制实际应用,该问题尚未得到充分解决。本文提出AnyText2,一种可在自然场景图像生成与编辑中精确控制多语言文字属性的新方法。该方法包含两个核心组件:首先,提出WriteNet+AttnX架构,将文字渲染能力注入预训练T2I模型,相比前代AnyText,不仅提升了图像真实感,还实现19.8%的推理速度提升;其次,探索从场景图像中提取字体与颜色的方法,并设计文本嵌入模块,独立编码这些属性作为条件输入。作为AnyText的扩展,该方法可为每行文字定制属性,使中文与英文文本准确率分别提升3.3%和9.3%。通过全面实验验证了其先进性能。代码与模型将开源于https://github.com/tyxsspa/AnyText2。

原文摘要 · Abstract (English)

As the text-to-image (T2I) domain progresses, generating text that seamlessly integrates with visual content has garnered significant attention. However, even with accurate text generation, the inability to control font and color can greatly limit certain applications, and this issue remains insufficiently addressed. This paper introduces AnyText2, a novel method that enables precise control over multilingual text attributes in natural scene image generation and editing. Our approach consists of two main components. First, we propose a WriteNet+AttnX architecture that injects text rendering capabilities into a pre-trained T2I model. Compared to its predecessor, AnyText, our new approach not only enhances image realism but also achieves a 19.8% increase in inference speed. Second, we explore techniques for extracting fonts and colors from scene images and develop a Text Embedding Module that encodes these text attributes separately as conditions. As an extension of AnyText, this method allows for customization of attributes for each line of text, leading to improvements of 3.3% and 9.3% in text accuracy for Chinese and English, respectively. Through comprehensive experiments, we demonstrate the state-of-the-art performance of our method. The code and model will be made open-source in https://github.com/tyxsspa/AnyText2.

文本生成图像编辑多语言属性控制

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