Abstract
Hair editing has made tremendous progress in recent years. Early hair editing methods use well-drawn sketches or masks to specify the editing conditions. Even though they can enable very fine-grained local control, such interaction modes are inefficient for the editing conditions that can be easily specified by language descriptions or reference images. Thanks to the recent breakthrough of cross-modal models (e.g., CLIP), HairCLIP is the first work that enables hair editing based on text descriptions or reference images. However, such text-driven and reference-driven interaction modes make HairCLIP unable to support fine-grained controls specified by sketch or mask. In this paper, we propose HairCLIPv2, aiming to support all the aforementioned interactions with one unified framework. Simultaneously, it improves upon HairCLIP with better irrelevant attributes (e.g., identity, background) preservation and unseen text descriptions support. The key idea is to convert all the hair editing tasks into hair transfer tasks, with editing conditions converted into different proxies accordingly. The editing effects are added upon the input image by blending the corresponding proxy features within the hairstyle or hair color feature spaces. Besides the unprecedented user interaction mode support, quantitative and qualitative experiments demonstrate the superiority of HairCLIPv2 in terms of editing effects, irrelevant attribute preservation and visual naturalness.
Introduction
Digital hair editing is a notoriously difficult task in computer vision. The intricate geometry, high-frequency textures, and complex occlusions (e.g., hair covering ears or forehead) make it challenging to modify hair without affecting the subject's identity or the background. While the original HairCLIP model introduced powerful text- and image-driven editing capabilities, it lacked the fine-grained spatial control offered by sketches and masks. Furthermore, many existing GAN-based methods suffer from "attribute leakage," where hair modifications inadvertently change facial features.
HairCLIPv2 addresses these challenges by unifying all interaction modes—text, sketch, mask, and reference image—into a single framework. By reimagining hair editing as a "proxy feature blending" task, the model achieves superior decoupling of hair from other facial attributes, ensuring high-fidelity results that preserve the original subject's identity.
Methodology: Proxy Feature Blending
The core innovation of HairCLIPv2 is the shift from direct latent manipulation to a three-step proxy-based transfer process.
1. The Bald Proxy
To prevent artifacts in regions previously covered by hair, the system first generates a "bald" version of the source image. A specialized HairMapper inpaints these areas, providing a clean canvas for the new hairstyle.
2. Multi-Modal Proxy Generation
Depending on the user input, the system generates a hair "proxy" that embodies the desired attributes:
- Text Proxies: Optimized using CLIP loss. Unlike previous methods, optimization starts from a random point near the "mean face" to allow for more diverse and radical hairstyle changes.
- Sketch Proxies: A dedicated
sketch2hairinverter translates user-provided line drawings into realistic hair structures.
3. Seamless Feature Blending in F-Space
Rather than blending 1D latent vectors ($w$), HairCLIPv2 operates on 3D feature maps ($F$-space) within StyleGAN. By targeting specific layers—the 7th block for hairstyle (geometry) and the 14th block for color—the model can independently control shape and hue. This spatial blending also enables precise local edits via masking.
Results and Evaluation
HairCLIPv2 demonstrates significant improvements over state-of-the-art models like HairCLIP, TediGAN, and MichiGAN.
Quantitative Performance
In evaluations using the CelebA-HQ dataset, HairCLIPv2 achieved an Identity Similarity (IDS) score of 0.84, a massive improvement over HairCLIP's 0.45. This confirms the model's ability to preserve the subject's identity while performing drastic hair changes. It also leads in PSNR and SSIM metrics for non-hair regions, indicating better background preservation.
Qualitative Naturalness
The model produces highly realistic results even for complex or "unseen" text prompts. The separation of geometry and color allows for vibrant, natural-looking transformations.
Efficiency
Sketch and mask-based interactions are nearly instantaneous, operating at approximately 0.04s. While text-based editing requires an optimization loop (approx. 35s), the quality and flexibility of the results represent a new benchmark for the field.
Conclusion
HairCLIPv2 successfully unifies diverse hair editing interactions into a single, robust framework. By treating editing as a proxy-based transfer task and leveraging spatial feature blending, it overcomes the limitations of previous latent-manipulation methods. While currently limited to human head hair and static images, it sets the stage for more versatile and identity-preserving digital grooming tools.
Summary updated