Abstract
Text-driven image editing has seen significant progress with the integration of StyleGAN and CLIP. However, existing methods like StyleCLIP often require a manually defined "neutral" reference text to determine the editing direction, leading to sensitivity and reduced usability. We present StyleCLIP-FEU (Fast and Easy-to-Use), a robust framework that adaptively explores editing directions by training a Support Vector Machine (SVM) on retrieved image samples in the CLIP latent space. This data-driven approach eliminates the need for reference prompts and produces more natural results, especially for complex instructions. Our method maintains high inference speeds and demonstrates superior performance in human evaluations.
1. Introduction
Text-driven image editing allows for intuitive modification of visual content using natural language. StyleCLIP emerged as a powerful tool by combining StyleGAN’s generative capabilities with CLIP’s semantic understanding. Despite its success, the "global direction" approach in StyleCLIP faces a major usability hurdle: the requirement of a "neutral text" ($t_0$) to define the starting point of an edit. The quality of the resulting image is highly dependent on this prompt, often requiring tedious trial-and-error tuning.
2. Problem Statement
The reliance on a neutral text creates a discrepancy when the reference does not align well with the input image. For instance, using "male face" as a reference for a female input image can lead to unnatural artifacts or failure to apply the requested attribute. Furthermore, StyleCLIP struggles with complex, detailed captions where a simple neutral counterpart is hard to define. Tuning these prompts is a manual process that limits the accessibility of the technology for non-expert users.
3. Methodology
StyleCLIP-FEU introduces an adaptive mechanism to discover editing directions without manual text references. Instead of a static text-based vector, it uses a dynamic, data-driven boundary discovered on the fly.
The process involves three main steps:
- Image Retrieval: Given a target text instruction ($t$), the system automatically retrieves 100 "positive" images (most similar to $t$) and 100 "negative" images (least similar) from an unlabeled corpus like FFHQ.
- SVM Training: A linear Support Vector Machine (SVM) is trained to classify these images within the CLIP latent space. The normal vector of the resulting SVM hyperplane represents the "edit direction" ($\Delta t$).
- StyleGAN Mapping: This direction is then mapped into StyleGAN’s disentangled $S$ space using the standard StyleCLIP architecture to apply the changes to the specific input image.
By deriving the direction from actual image distributions rather than text-to-text subtraction, the method captures the visual essence of attributes more robustly.
4. Experiments and Results
The method was evaluated using the FFHQ (Flickr-Faces-HQ) dataset for retrieval and Multi-Modal-CelebA-HQ for validation.
Key findings from subjective human evaluations include:
- Naturalness: StyleCLIP-FEU achieved a 95.7% naturalness score, significantly outperforming the best StyleCLIP configuration (82.0%).
- Accuracy: On gender-specific edits, the proposed method reached 87.5% accuracy, slightly higher than StyleCLIP’s 86.6%.
- Efficiency: Training the SVM is extremely lightweight, taking less than 0.01 seconds. The total inference time remains nearly identical to the original StyleCLIP (approx. 0.37s on a Tesla T4).
Qualitatively, StyleCLIP-FEU avoids the "excessive editing" often seen in baseline methods, maintaining the identity and structure of the original face more effectively even when hyperparameters are high.
5. Conclusion and Future Work
StyleCLIP-FEU significantly improves the usability and robustness of text-driven image editing by replacing manual prompt engineering with an adaptive SVM-based direction discovery. While highly effective for faces, future work will explore making the sparsity hyperparameter ($\beta$) adaptive and extending the approach to more diverse image domains beyond human portraits.
Summary updated