Introduction
Generating realistic images of faces and fashion is a complex task due to the inherent "one-to-many" mapping problem. A single spatial layout—such as a specific silhouette or facial structure—can correspond to a vast array of individuals with different attributes like hair color, skin tone, or clothing textures. Traditional Conditional GANs (cGANs) often struggle with spatial precision, while image-to-image translation models like Pix2Pix or SPADE tend to be overly deterministic, failing to capture the stylistic diversity required for creative applications.
Spatially Constrained Generative Adversarial Networks (SCGAN) address these challenges by decoupling image synthesis into three independent, controllable dimensions: spatial layout, specific attributes, and latent variations. This framework ensures strict structural integrity while allowing for significant stylistic variety.
The SCGAN Architecture
The core innovation of SCGAN lies in its decoupled architecture, which processes inputs in a sequential, hierarchical manner rather than mixing them simultaneously. The process follows three distinct steps:
- Spatial Geometry: The generator ($G$) first processes a semantic segmentation map to establish the image's geometry.
- Latent Details: A latent vector is injected to handle unregulated details such as lighting and background.
- Attribute Injection: Finally, attribute labels (e.g., gender, hair color) are applied to define the specific "what" of the image.
To enforce spatial constraints, SCGAN introduces a Segmentor network ($S$). This pre-trained network attempts to reconstruct the segmentation map from the generated image, providing a spatial loss that forces the generator to respect input boundaries. Additionally, the Discriminator ($D$) utilizes an auxiliary classifier to ensure that requested attributes are accurately reflected in the final output.
Experimental Evaluation
The model was evaluated on two major benchmarks: CelebA (faces) and DeepFashion (clothing). For CelebA, the authors utilized the Dlib landmark detector to generate 6-region semantic masks, while DeepFashion utilized a subset of 79,000 images with 18-class color attributes.
SCGAN demonstrated superior performance compared to state-of-the-art models like Pix2Pix, CycleGAN, and SPADE:
- Image Quality: On CelebA, SCGAN achieved a Fréchet Inception Distance (FID) of 10.2, significantly outperforming SPADE (18.5) and Pix2Pix (20.4).
- Spatial Accuracy: The model achieved a 79.11% mean Intersection over Union (mIoU) on CelebA, confirming that generated faces align precisely with input masks.
- Diversity: By varying the latent vector $z$, SCGAN can produce a wide array of distinct outputs from the same spatial and attribute constraints.
Key Insights and Future Work
By separating spatial constraints from attributes, SCGAN avoids "feature conflict," where competing requests (like a "long hair" attribute vs. a "short hair" mask) might otherwise degrade image quality. Furthermore, the model allows for smooth physical transitions—such as "NoSmile2Smile"—by interpolating the segmentation masks themselves, rather than just the latent space.
While SCGAN provides impressive control and quality, future work may explore adapting the framework to high-resolution architectures like StyleGAN and incorporating natural language descriptions for even finer attribute control.
Summary updated