HairEditor: Diffusion-Guided Supervision for StyleGAN-Based Hair Editing in Real-World Portraits
摘要
With the rapid advancement of social media and virtual reality technologies, the demand for personalized hair editing has significantly increased. However, achieving high-fidelity and real-time hair editing in practical applications remains challenging due to the lack of diverse high-quality portrait datasets and the computational constraints of existing editing frameworks. To tackle these challenges, we propose HairEditor, a novel framework designed for efficient and high-quality hair modifications in real-world scenarios. First, we leverage the generative capabilities of Stable Diffusion to construct a large-scale dataset comprising real portraits, bald images, and the corresponding hairstyle and hair color exemplars, addressing the issue of data scarcity. Second, we design a lightweight yet powerful editing network based on the StyleGAN latent space, enabling precise hair manipulation with minimal computational cost. Furthermore, we extend hair editing beyond standard aligned headshots to loosely aligned upper-body portraits, significantly enhancing its applicability in diverse real-world settings. Extensive experiments using real human portraits as users and AI-generated images as hairstyle references demonstrate that HairEditor outperforms existing methods in visual quality, identity preservation, and editing precision, while maintaining high efficiency. We will release our code to support future research in this field.