Abstract
This paper focuses on the problem of generating human face pictures from specific attributes. The existing CNN-based face generation models, however, either ignore the identity of the generated face or fail to preserve the identity of the reference face image. Here we address this problem from the view of optimization, and suggest an optimization model to generate human face with the given attributes while keeping the identity of the reference image. The attributes can be obtained from the attribute-guided image or by tuning the attribute features of the reference image. With the deep convolutional network "VGG-Face", the loss is defined on the convolutional feature maps. We then apply the gradient decent algorithm to solve this optimization problem. The results validate the effectiveness of our method for attribute driven and identity-preserving face generation.
Introduction
Generating human faces with specific attributes is a well-studied area, but most existing methods—such as early Generative Adversarial Networks (GANs) or Variational Auto-encoders (VAEs)—struggle with a critical requirement: identity preservation. When a model is tasked to "add a smile" to a specific person's photo, it often produces a generic smiling face that loses the unique characteristics of the original subject. While 3D-based "facial avatar" methods can handle this, they are often computationally expensive and can look physically unrealistic. This research treats face generation as a constrained optimization problem in a 2D deep learning framework to bridge this gap.
Methodology
Instead of training a generative model from scratch, the approach treats face generation as an optimization task performed on a pre-trained VGG-Face network. The core of the method is a loss function composed of three main terms:
- Attribute Loss: This forces the generated image to match target attributes. To define these attributes, the model references a "guided set" of images from a database that share the target attribute and are similar in pose to the reference face.
- Identity Loss: This ensures the generated face stays semantically similar to the reference face using "perceptual loss"—comparing high-level feature maps in the VGG network rather than raw pixels.
- Regularization (Total Variation): This term encourages spatial smoothness, preventing the resulting image from becoming noisy or pixelated.
Refinement Techniques
To improve visual quality and precision, two specific techniques were introduced:
- Spatial Masks: To prevent "attribute bleed" (e.g., adding glasses shouldn't change the mouth's shape), facial landmarks are used to create a mask, restricting the attribute loss to specific regions.
- Color Transformation: Since deep feature reconstruction often loses color information, a linear transform in the YCbCr color space is learned to match the generated image's palette to the original reference photo.
Experiments and Results
The researchers utilized the Labeled Faces in the Wild (LFW) dataset, containing approximately 13,000 images with 73 visual attributes. Images were aligned using 68 facial landmarks and rescaled to 224x224 pixels.
Key Insights
- Layer Selection: The authors identified a "Goldilocks zone" in the VGG-Face architecture. Lower layers (e.g.,
conv2_1) preserve exact structure but resist attribute changes, while higher layers (e.g.,conv3_2) allow for significant modification at the cost of image quality. Theconv3_1layer was found to be the optimal balance. - Semantic Similarity: The results reinforce that for identity preservation, semantic similarity (how a network perceives the face) is more critical than pixel-level similarity.
Qualitatively, the model successfully generated faces with both partial attributes (adding glasses, changing nose shapes) and global attributes (adding a smile) while maintaining the bone structure and "essence" of the reference individual.
Conclusion
This optimization-based approach effectively decouples identity from facial attributes without requiring massive training data for every new attribute. While the method is currently slower than feed-forward generative models due to its iterative nature, it provides a robust framework for high-fidelity face editing. Future work will focus on using these optimization insights to train faster, real-time generative networks.
Summary updated