Abstract
We introduce Hair-GANs, an architecture of generative adversarial networks, to recover the 3D hair structure from a single image. The goal of our networks is to build a parametric transformation from 2D hair maps to 3D hair structure. The 3D hair structure is represented as a 3D volumetric field which encodes both the occupancy and the orientation information of the hair strands. Given a single hair image, we first align it with a bust model and extract a set of 2D maps encoding the hair orientation information in 2D, along with the bust depth map to feed into our Hair-GANs. With our generator network, we compute the 3D volumetric field as the structure guidance for the final hair synthesis. The modeling results not only resemble the hair in the input image but also possesses many vivid details in other views. The efficacy of our method is demonstrated by using a variety of hairstyles and comparing with the prior art.
Introduction
3D hair modeling is a notorious "final boss" in digital avatar creation. Hair is incredibly complex, consisting of tens of thousands of individual strands with diverse geometries, including curly, straight, and braided textures. While multi-view systems can capture this complexity, they require expensive studio setups and controlled environments. Single-view modeling is the "holy grail" for consumer applications, but it remains an ill-posed problem: determining the structure of the back of the head from a single frontal selfie is inherently ambiguous.
Previous data-driven methods relied on massive databases of hair "exemplars" to fill in these missing regions. However, these database-heavy approaches require significant storage, are slow to search, and often result in "cookie-cutter" hairstyles that fail to perfectly match the unique nuances of the input image. Hair-GANs aims to replace these clunky databases with a generative model that "understands" hair structure and can hallucinate realistic 3D details directly from 2D cues.
Methodology
The Hair-GANs framework utilizes a conditional Generative Adversarial Network (GAN) specifically designed for the 2D-to-3D transition. The process is divided into several key stages:
- Input Preparation: The system processes a raw photo to extract a 2D orientation map (representing hair flow), a confidence map, and a bust depth map. The depth map acts as a geometric "anchor," ensuring the hair is positioned correctly relative to the head.
- The Generator and Dimensional Expansion: The heart of the system is a generator that employs "Dimensional Expansion Layers." These layers aggregate 2D convolutional features and project them into a 3D tensor. The generator outputs a 3D volumetric field (128 × 128 × 96) encoding both hair occupancy and orientation.
- Adversarial Training: To ensure realism, a discriminator compares the generated 3D volume against ground-truth synthetic data. A hybrid loss function, incorporating Style and Content losses adapted for the 3D domain, encourages the generator to produce sharp, consistent hair textures.
- Synthesis: Once the 3D volume is generated, the system uses a marching cubes algorithm to define the rough shape and then "grows" individual hair strands following the orientation field.
Training Data
The model was trained using a synthetic dataset of 300 high-quality 3D hair models. Through data augmentation (random rotations and flips), the authors generated 3,636 training pairs. Each pair consists of a rendered 2D image with its derived maps and the corresponding 3D volumetric ground truth.
Key Results and Insights
Hair-GANs demonstrates significant improvements in both visual fidelity and computational efficiency. Unlike standard CNNs that tend to produce blurry, averaged results, the GAN’s adversarial nature forces the model to pick a "sharp" interpretation of the hair structure, leading to vivid details in the 3D volume.
- Visual Fidelity: The system produces 3D models that more closely resemble the input image's contour and texture compared to previous state-of-the-art methods like AutoHair or HairNet.
- Efficiency: Once trained, the generator produces a 3D volume in approximately 1 second. The entire pipeline—from 2D image to a fully synthesized strand-level model—takes less than 35 seconds on a standard consumer GPU (GTX 1080Ti).
- Generalization: The model successfully handles a wide variety of hairstyles, including short, long, straight, and curly hair, without needing to store a database of those styles at runtime.
Conclusion and Future Work
While Hair-GANs represents a major step forward, it currently faces limitations regarding frontal bias and fixed resolution. The 128 × 128 × 96 grid limits the fineness of the hair structure for extremely complex or "frizzy" styles. Additionally, the current model excludes complex topologies like braids and buns. Future work will focus on expanding the training data to include these complexities and exploring higher-resolution data structures like sparse voxels to capture even finer details.
Summary updated