Abstract
Recently, Generative Adversarial Networks (GANs) have been widely used for portrait image generation. However, in the latent space learned by GANs, different attributes, such as pose, shape, and texture style, are generally entangled, making the explicit control of specific attributes difficult. To address this issue, we propose a SofGAN image generator to decouple the latent space of portraits into two subspaces: a geometry space and a texture space. The latent codes sampled from the two subspaces are fed to two network branches separately, one to generate the 3D geometry of portraits with canonical pose, and the other to generate textures. The aligned 3D geometries also come with semantic part segmentation, encoded as a semantic occupancy field (SOF). The SOF allows the rendering of consistent 2D semantic segmentation maps at arbitrary views, which are then fused with the generated texturemaps and stylized to a portrait photo using our semantic instance-wise module. Through extensive experiments, we show that our system can generate high-quality portrait images with independently controllable geometry and texture attributes. The method also generalizes well in various applications, such as appearance-consistent facial animation and dynamic styling.
Introduction
While Generative Adversarial Networks (GANs) like StyleGAN produce stunningly realistic faces, they suffer from a major flaw: attribute entanglement. In a standard latent space, attributes like age, hair color, or the presence of eyeglasses are often intertwined. Modifying one attribute can lead to unintended changes in others. Furthermore, existing conditional image synthesis methods typically require perfectly aligned image-segmentation pairs, which are difficult to acquire at scale. Traditional 3D facial priors also struggle to capture non-rigid "decorative" attributes like complex hairstyles or clothing.
Methodology
SofGAN addresses these challenges by decoupling the generation process into two distinct subspaces: geometry and texture.
The Geometry Space (SOF)
Instead of a simple 3D mesh, SofGAN utilizes a Semantic Occupancy Field (SOF). This neural representation describes the probability of a 3D point belonging to a specific semantic class (e.g., eyes, lips, hair). A hyper-network generates the weights for this field based on a geometric latent code. A custom ray-marching renderer projects this 3D field into a 2D segmentation map from any viewpoint, ensuring 3D consistency during pose changes.
The Texture Space (SIW-StyleGAN)
The rendered 2D segmentation map is processed by the Semantic Instance-Wise (SIW) module. Unlike standard StyleGAN, which applies a global style, the SIW module uses the segmentation map to apply different style codes to different regions. This is achieved through a specialized "SIW Conv" layer that modulates convolution kernels based on the local semantic class, preventing style "leakage" between regions.
Key Insights
- Semantic Occupancy as a Bridge: By extending occupancy fields to include semantics, the authors created a representation that is both 3D-consistent and semantically aware.
- Regional Demodulation: Treating each semantic part as an independent "instance" allows for precise regional styling, ensuring that changing hair style does not affect skin texture.
- Unpaired Training: The system is trained on unpaired data—geometry from 3D scans and textures from real-world photos (FFHQ, CelebAMask-HQ)—bypassing the need for perfectly labeled image-segmentation pairs.
Results and Performance
SofGAN outperforms state-of-the-art models like StyleGAN2, SPADE, and SEAN in both quality and diversity. On the FFHQ dataset, SofGAN achieved a lower FID score (~12.7) compared to SEAN (~16.4) and StyleGAN2 (~34.2), indicating superior image quality. Qualitatively, the model enables "interactive styling," where users can draw rough segmentation maps to generate photorealistic images on-the-fly while maintaining consistency across rotations and expressions.
Limitations and Future Work
Despite its performance, SofGAN faces challenges with symmetry (e.g., asymmetrical gazes in extreme profiles) and highly structured textures like logos. Backgrounds can also appear blurry compared to the hyper-realistic foreground faces. Future research will explore region-based discriminators to better capture fine-grained, structured details within specific semantic areas.
Summary updated