Skip to main content
QUICK REVIEW

[論文レビュー] Improving Diffusion Models for Scene Text Editing with Dual Encoders

Jiabao Ji, Guanhua Zhang|arXiv (Cornell University)|Apr 12, 2023
Generative Adversarial Networks and Image Synthesis被引用数 6
ひとこと要約

本稿では、綴りの正確性を高めるための文字エンコーダと、スタイル制御のための指示エンコーダを統合したデュアルエンコーダー拡散モデル、DiffSteを提案する。指示微調整を経て訓練された本モデルは、未学習のフォント、混合フォントスタイル、自然言語によるスタイル記述に対しゼロショット一般化を達成し、5つのデータセットにおいて、テキストの正確性、画像の自然さ、スタイル制御性の面で先行手法を上回る性能を発揮する。

ABSTRACT

Scene text editing is a challenging task that involves modifying or inserting specified texts in an image while maintaining its natural and realistic appearance. Most previous approaches to this task rely on style-transfer models that crop out text regions and feed them into image transfer models, such as GANs. However, these methods are limited in their ability to change text style and are unable to insert texts into images. Recent advances in diffusion models have shown promise in overcoming these limitations with text-conditional image editing. However, our empirical analysis reveals that state-of-the-art diffusion models struggle with rendering correct text and controlling text style. To address these problems, we propose DIFFSTE to improve pre-trained diffusion models with a dual encoder design, which includes a character encoder for better text legibility and an instruction encoder for better style control. An instruction tuning framework is introduced to train our model to learn the mapping from the text instruction to the corresponding image with either the specified style or the style of the surrounding texts in the background. Such a training method further brings our method the zero-shot generalization ability to the following three scenarios: generating text with unseen font variation, e.g., italic and bold, mixing different fonts to construct a new font, and using more relaxed forms of natural language as the instructions to guide the generation task. We evaluate our approach on five datasets and demonstrate its superior performance in terms of text correctness, image naturalness, and style controllability. Our code is publicly available. https://github.com/UCSB-NLP-Chang/DiffSTE

研究の動機と目的

  • 既存の拡散モデルがシーンテキスト編集において正確でスタイルの整ったテキストを生成する能力に欠けるという問題に取り組む。
  • Stable Diffusionなどの最先端の拡散モデルにおけるテキストの可読性の低さと、スタイル制御の弱さを克服する。
  • イタリックや太字などの未学習のフォント変種や、混合フォントスタイルに対しゼロショット一般化を可能にする。
  • 「緑の色で」や「燃える地獄のように」などの柔軟な自然言語指示によるスタイル制御を可能にする。
  • レイアウトや向きを保持したまま、任意の形状のマスク内にテキストをレンダリングする能力を向上させる。

提案手法

  • 文字レベルでターゲットテキストを処理する文字エンコーダと、Stable Diffusionの元のテキストエンコーダをもとにした指示エンコーダを備えたデュアルエンコーダー・アーキテクチャを導入する。
  • 画像生成中に、文字レベルの埋め込みと指示埋め込みの両方にクロスアテンション機構を適用する。
  • 文字埋め込みと指示埋め込みを統合し、正しい綴りと指定されたスタイルを持つテキストの生成を拡散モデルがガイドできるようにする。
  • 自然言語記述から視覚的テキスト外観へのマッピングを学習できるように、ペアド指示-画像データ上でモデルを微調整する指示微調整フレームワークを採用する。
  • Stable Diffusionなどの事前学習済み拡散モデルをベースとし、最小限のアーキテクチャ変更で適応させる。
  • マスク領域とテキスト指示の両方に条件付けた生成プロセスを採用することで、任意のマスク形状をサポートし、レイアウトに配慮したテキスト配置を実現する。
Figure 1: Text editing results by GAN-based Mostel , diffusion model SD , and our method DiffSte . A reference Rendered image with desired content and style is fed to Mostel as style guidance. SD and our method are prompted by instruction Write a grass-colored word “DiffSTE” in BadScript font .
Figure 1: Text editing results by GAN-based Mostel , diffusion model SD , and our method DiffSte . A reference Rendered image with desired content and style is fed to Mostel as style guidance. SD and our method are prompted by instruction Write a grass-colored word “DiffSTE” in BadScript font .

実験結果

リサーチクエスチョン

  • RQ1デュアルエンコーダー設計は、拡散ベースのシーンテキスト編集におけるテキストの可読性と綴りの正確性を向上させることができるか?
  • RQ2指示微調整により、イタリックや太字などの未学習のフォントスタイルに対しゼロショット一般化が可能になるか?
  • RQ3自然言語プロンプトを用いて、2つの既知のフォントを混合して新しいフォントコンビネーションを生成できるか?
  • RQ4「ラベンダー」や「燃える地獄」のような多様な自然言語による色やスタイル記述を正確に解釈し、適切なテキストレンダリングが可能か?
  • RQ5複雑で非長方形のマスク内でも、適切なレイアウトと向きを保ったテキスト生成が可能か?

主な発見

  • DiffSteは、COCOText、ICDAR13、TextOCRを含む5つのベンチマークデータセットにおいて、テキストの正確性、画像の自然さ、スタイル制御性の面で優れた性能を発揮する。
  • フォントの外挿(例:イタリック、太字)に関する定性的な結果から、未学習のフォントスタイルに対し高い忠実度でゼロショット一般化が達成されていることが示された。
  • 「Font1とFont2のフォントで書く」といったシンプルな自然言語プロンプトを用いて、2つの既知のフォントをブレンドしたハイブリッドフォントを成功裏に生成した。
  • 「マンゴー色」や「深海ブルー」のような多様な自然言語スタイル記述を正確に解釈し、意味的変動に対しても強固であることが実証された。
  • 「The five」や「boxing」の例から、非常に曲がって不規則なマスク内でも、適切なレイアウトと向きを保ったテキスト生成が可能であることが示された。
  • 指示微調整フレームワークにより、明示的なスタイルラベルを必要とせず、自然言語指示から視覚的テキスト外観へのマッピングを学習できるようになった。
Figure 3: Model structure of DiffSte with dual-encoder design. The input text instruction and the target text spelling are first processed by our instruction encoder $\textsc{Enc}_{\textrm{inst}}$ and character encoder $\textsc{Enc}_{\textrm{char}}$ , respectively. Both encodings are attended to the
Figure 3: Model structure of DiffSte with dual-encoder design. The input text instruction and the target text spelling are first processed by our instruction encoder $\textsc{Enc}_{\textrm{inst}}$ and character encoder $\textsc{Enc}_{\textrm{char}}$ , respectively. Both encodings are attended to the

より良い研究を、今すぐ始めましょう

論文の読解から最終レビューまで、研究時間を劇的に削減しましょう。

クレジットカード登録不要

このレビューはAIが作成し、人間の編集者が確認しました。