Abstract
Virtual hair manipulation, such as "trying on" new colors or styles, is a high-demand application in the beauty industry. However, existing datasets often lack the resolution, scale, and detailed metadata required for realistic results. We present K-Hairstyle, a massive dataset of 500,000 high-resolution (4K) images specifically curated for hair editing and classification. By providing expert-annotated attributes and precise segmentation masks, K-Hairstyle enables significantly more realistic virtual hair dyeing and style transfer than previous benchmarks.
Introduction
Deep learning models for virtual hair manipulation are fundamentally limited by the quality of their training data. Existing datasets typically suffer from low resolution (e.g., 250x250 pixels), small scale, and a lack of critical metadata like segmentation masks or detailed attribute labels (length, curl, color). These deficiencies often result in "plastic-looking" virtual edits that fail to capture the fine-grained texture of individual hair strands.
To address these gaps, the K-Hairstyle dataset introduces a "big" and "high-fidelity" resource tailored to the nuances of popular Korean hairstyles. This dataset provides the necessary detail for models to learn complex editing tasks and generalize across diverse styles.
Dataset Characteristics
The K-Hairstyle dataset comprises 500,000 images at a resolution of 4032×3024. The data was curated through a structured approach:
- Expert Collection: 400,000 images were captured by 300 expert hairstylists using high-end cameras, providing multi-view perspectives from various vertical and horizontal angles.
- Crowdsourcing: 100,000 images were gathered via crowdsourcing to increase demographic and stylistic variety.
- Detailed Annotation: Expert stylists labeled images across 31 hairstyle types and 63 additional attributes, including age, gender, and curl strength.
- Privacy Preservation: All faces are blurred to ensure anonymity while maintaining the utility of the hair data.
Compared to incumbents like Figaro 1k (1,050 images) or Hairstyle 30k (30,000 images at 128x128), K-Hairstyle offers a significant leap in both quantity and quality.
Methodology and Technical Insights
A key insight of this work is that simple binary segmentation is insufficient for realistic hair editing. The authors emphasize the importance of Alpha Matting to handle the semi-transparent edges of hair strands.
As shown in the pipeline above, the process involves generating a predicted segmentation mask, which is then refined into a "trimap." Using k-nearest-neighbor matting, an alpha matte is produced, allowing for natural-looking color transitions during the hair dyeing process. Furthermore, the multi-view nature of the dataset allows models to learn how hair volume and shape change in 3D space, a critical factor for realistic virtual try-ons.
Experimental Results
The dataset was validated across three core tasks: segmentation, hairstyle transfer, and classification.
- Segmentation: Using the Pyramid Attention Network (PAN), the dataset achieved a mean Intersection over Union (mIoU) of 0.9187, demonstrating high learnability.
- Hairstyle Transfer: Models trained on K-Hairstyle, such as StarGAN v2, successfully transferred styles with a Fréchet Inception Distance (FID) score of 14.67, indicating high image quality and diversity.
- Hair Dyeing: The high-resolution masks and alpha matting enable seamless color changes across various base styles.
The results in the figure above highlight the model's ability to maintain hair texture while applying vibrant, realistic colors. In classification tasks, the inclusion of demographic attributes (age, gender) was found to significantly improve the model's ability to identify fine-grained hairstyle categories.
Conclusion and Future Work
K-Hairstyle sets a new benchmark for virtual hair editing by providing the first large-scale, 4K resolution dataset with comprehensive annotations. While the current focus is on Korean hairstyles and textures, future work aims to expand this high-fidelity approach to a global variety of hair types. Additionally, optimizing model architectures to handle 4K images in real-time remains a key challenge for future research.
Summary updated