Abstract
TiGAN (Text-based Interactive GAN) is a novel framework designed for multi-round, interactive image generation and editing using natural language. By integrating the high-quality synthesis capabilities of StyleGAN2 with the semantic understanding of CLIP, TiGAN allows users to refine images through successive feedback. This approach maintains visual consistency and avoids unwanted changes to previously established attributes, addressing a key limitation in existing text-to-image models.
Introduction
Most contemporary text-to-image (T2I) models operate in a single-round fashion, where a user provides a prompt and the model generates a corresponding image. However, if the result requires refinement, providing a new prompt often leads to a completely different image, discarding the desirable aspects of the initial generation. While some multi-round models exist, they are frequently trained on static, predefined sequences of instructions that do not accurately reflect real-world human interaction.
TiGAN addresses two core challenges in interactive image synthesis: creating a precise mapping between sequence-based natural language and 2D pixel arrays, and ensuring consistency across editing rounds. The goal is to allow a user to specify a change (e.g., "make the hair long") without inadvertently altering other established attributes like gender or eye color.
Methodology
TiGAN utilizes the StyleGAN2 architecture as a powerful unconditional backbone, transforming it into a text-conditional model through several key innovations.
Text Injection via CLIP
The framework employs a pre-trained CLIP (Contrastive Language-Image Pre-training) model to encode natural language feedback. Rather than simple concatenation, TiGAN introduces "Proposed Modules" that replace the standard affine transformations in StyleGAN2. These modules inject CLIP text features directly into the style space ($S$-space), which is highly disentangled and ideal for attribute-specific manipulation.
Contrastive Loss Functions
To improve text-image alignment, the authors introduce two specialized losses:
- $\mathcal{L}_{CLIP}$: This loss encourages the generator to produce images with high semantic similarity to the input text within CLIP’s joint embedding space.
- $\mathcal{L}_{CD}$ (Contrastive Discriminator): This trains the discriminator to distinguish between real and fake images while simultaneously ensuring the image matches the specific text description provided.
Selective Manipulation Mechanism
Consistency is maintained through a selective update mechanism. When new feedback is received, TiGAN identifies specific dimensions of the style vector most relevant to the requested change. By calculating the direction of semantic change in CLIP space, the model updates only the dimensions of the image's style vector that align with that direction, preserving other attributes.
Experimental Evaluation
The model was evaluated on three diverse datasets: MS-COCO 2014 for complex scenes, UT Zappos50k for attribute-specific shoe editing, and Multi-modal CelebA-HQ for fine-grained facial manipulation.
Key Results
- State-of-the-Art Generation: On MS-COCO, TiGAN achieved a Fréchet Inception Distance (FID) of 8.90, outperforming the previous state-of-the-art, XMC-GAN (9.33).
- Superior Face Synthesis: On CelebA-HQ, TiGAN reached an FID of 11.35, a significant improvement over TediGAN's 27.39.
- Interaction Efficiency: In simulations, TiGAN required an average of 4.9 rounds to reach a target image, compared to 6.2 for SeqAttnGAN and 5.7 for TediGAN.
- Human Preference: Amazon Mechanical Turk studies showed that users consistently preferred TiGAN for its realism, text-matching accuracy, and consistency across rounds.
Conclusion
TiGAN demonstrates that performing edits in the disentangled $S$-space and utilizing directional semantic updates allows for effective, additive image editing. While the model shows state-of-the-art performance, it remains dependent on the threshold parameters for style updates and is subject to the inherent biases of the pre-trained CLIP model. Future work will focus on improving consistency in complex, multi-object scene editing.
Summary updated