Abstract
DeepFaceEditing is a structured disentanglement framework designed to provide users with decoupled, intuitive control over facial geometry and appearance. By decomposing the face into local components and utilizing sketches as a shared geometric representation, the system facilitates high-fidelity face synthesis, style transfer, and real-time interactive editing.
Introduction: The Challenge of Entanglement
While generative models like StyleGAN produce hyper-realistic results, they often lack granular control. Modifying a specific feature—such as adding wrinkles or reshaping a nose—frequently alters unrelated attributes like skin tone or lighting. This occurs because geometry (shape) and appearance (texture) are "entangled" within the model's latent space. DeepFaceEditing addresses this by providing a "local-to-global" framework that treats these attributes as independent, mixable variables.
Methodology
The architecture consists of two primary stages: Local Disentanglement and Global Fusion.
Local Disentanglement (LD) Modules
The facial structure is partitioned into five key components: the left eye, right eye, nose, mouth, and background. Each component is processed by a dedicated LD module.
Each LD module includes:
- Geometry Encoder: Maps images or sketches into a shared geometry latent space.
- Appearance Encoder: Uses Global Average Pooling to isolate style (color, lighting) from spatial information.
- Image Synthesis Generator: Combines these features via Adaptive Instance Normalization (AdaIN) to produce local image patches.
Global Fusion (GF) Module
To ensure the final output is not a disjointed collection of parts, the GF module integrates feature maps from all LD modules. This encoder-decoder structure uses residual blocks to create seamless boundaries and maintain global consistency.
Key Insights
Sketches as a Geometric Bridge
A pivotal innovation is the use of sketches as a "shared space" for geometry. This allows the model to process a reference image and a hand-drawn sketch identically, enabling a seamless transition between image-based editing and freehand drawing.
Spatial-less Appearance
By employing global average pooling, the appearance encoder is effectively "blinded" to spatial positioning. This ensures it captures only the "what" (texture/color) rather than the "where," preventing appearance features from leaking into the geometric structure.
Training and Datasets
The model was trained on the FFHQ (Flickr-Faces-HQ) dataset, using 32.2k image-sketch pairs generated via Photoshop filters and simplification algorithms. A swapping strategy combined with cycle-consistency loss was employed: the model creates a hybrid face from the geometry of Image A and the appearance of Image B, then attempts to reconstruct the original inputs to ensure true attribute separation.
Results and Performance
DeepFaceEditing demonstrates superior performance in style transfer compared to StyleGAN2 and WCT2, better preserving identity while adopting reference styles. User studies indicate a strong preference for this method due to its simultaneous geometric faithfulness and appearance similarity. Furthermore, the system supports real-time interactive editing, allowing users to draw features that the model instantly renders with photorealistic textures.
Limitations
While powerful, the model currently struggles with extreme head rotations and significant occlusions. Additionally, it does not yet fully disentangle lighting direction from skin color, and semantic ambiguity in sketches (e.g., hair vs. neck) can occasionally produce edge artifacts. Future work may involve incorporating semantic masks for even more granular material control.
Summary updated