An improved face attributes editing method based on DDIM

Libo He, Qingyang Chen, Yun Pang, Meijiao Wang, Yunyun Wu, Ling Liu, Zhenping QiangScientific 2024

Abstract

The main advantage of DDIM is that it guarantees the quality of the generated images while increasing the efficiency of the generation by modifying the sampling strategy in the diffusion process. DiffusionRig, which addresses the problem of maintaining identity consistency by learning the person-specific facial prior in a tiny personalized dataset, is a successful representation of the DDIM strategy. Based on DiffusionRig, in this article, we propose an improved face attributes editing method based on DDIM to improve naturalness and accuracy of editing results in complex face attribute editing tasks and the generalization ability. Our method combines DDIM and DECA together and use two-stage training strategy. To reduce DiffusionRig's limitations in handling face attribute editing tasks that require nonlinear understanding and fine-tuning, our method also introduces a channel attention mechanism and a depth-separable convolution technique in the training model. In the first stage we trained our model on the open FFHQ dataset, which consists of 30,000 high-resolution face image. In the second stage, the model was refined by using a tiny personalized dataset. Face attribute editing experiments, comparative experiment with DiffusionRig, and a series of ablation experiments have been performed. Then, the validity of our improved method is verified by qualitative and quantitative analysis.

Introduction

Face attribute editing—the process of altering a person's expression, pose, or lighting while preserving their unique identity—remains a significant challenge in computer vision. The core difficulties lie in attribute decoupling (isolating the change) and identity consistency (ensuring the person still looks like themselves).

Recent advancements like DiffusionRig attempted to solve this by learning a "person-specific facial prior" from a small set of images. However, DiffusionRig relies heavily on linear matrix operations, which often struggle to capture the complex, nonlinear relationships inherent in human facial structures. This limitation frequently results in "ghosting" artifacts, unnatural skin tones, or a loss of fine-grained details during significant edits. This paper introduces an enhanced framework that integrates nonlinear modeling capabilities and improves computational efficiency to bridge these gaps.

Methodology

The proposed method utilizes a two-stage training strategy to balance generalized facial knowledge with person-specific details.

Two-Stage Training

  1. Stage 1: Learning Generalized Priors. The model is first trained on the FFHQ (Flickr-Faces-HQ) dataset. During this phase, the model uses DECA (Detailed Expression Capture and Animation) to decompose images into a "physical buffer" containing surface normals, albedo, and Lambertian rendering. This allows the model to understand the fundamental 3D structure of human faces.
  2. Stage 2: Personalized Fine-Tuning. The model is refined using a tiny dataset of approximately 20 images of a specific individual. This stage allows the network to capture high-frequency details, such as specific wrinkles or unique skin textures, ensuring high identity fidelity.

Technical Innovations

To overcome the limitations of previous linear approaches, the authors introduced two key architectural improvements:

  • Cross-Attention (ATT Module): Instead of simple linear fusion, a cross-attention mechanism is employed. This module treats supervised features as "queries" and image features as "keys/values," allowing the network to dynamically focus on relevant facial regions during the denoising process. This provides the "nonlinear understanding" required for realistic lighting and expression interaction.
  • Depthwise Separable Convolutions: Borrowing from MobileNet architectures, standard convolutions in the jump connections were replaced with depthwise separable versions. This reduced the model's parameter footprint (from ~794MB to ~784MB) and lowered computational costs without sacrificing performance.

Experimental Results

The framework was evaluated against DiffusionRig using both qualitative and quantitative metrics across several personalized datasets, including celebrities like Barack Obama, Joe Biden, and Taylor Swift.

Qualitative comparison of face attribute editing results across different subjects, showing the source image, the extracted physical buffer (normal map), and the final edited outputs.

Quantitative Performance

The proposed method demonstrated clear superiority in lighting and expression editing:

  • FID and LPIPS: The model achieved significantly lower Fréchet Inception Distance (FID) and Learned Perceptual Image Patch Similarity (LPIPS) scores. For instance, in lighting edits for the Obama dataset, the FID dropped from 115.21 (DiffusionRig) to 72.92.
  • Identity Preservation: The system reached an Auto Face Re-ID accuracy of up to 99.18% for expression edits, confirming its ability to maintain identity consistency even under significant attribute changes.

Qualitative Improvements

Visual analysis shows that the new method produces much cleaner results with better color preservation. While previous methods often introduced noise or distorted skin tones (e.g., producing bluish backgrounds during expression changes), this approach maintains the original image's color temperature and structural clarity.

Conclusion and Future Work

By integrating cross-attention and depthwise separable convolutions into a DDIM-based framework, this research significantly improves the naturalness and accuracy of face attribute editing. While the method still relies on a small personalized dataset for the second stage of training and is constrained by the accuracy of the underlying DECA model, it represents a major step forward in nonlinear facial modeling. Future work will focus on improving pose-attribute metrics and developing more advanced facial parsing to handle extreme angles and complex illumination scenarios.

Summary updated

BibTeX
@inproceedings{he2024improved,
  author = {Libo He and Qingyang Chen and Yun Pang and Meijiao Wang and Yunyun Wu and Ling Liu and Zhenping Qiang},
  title = {{An improved face attributes editing method based on DDIM}},
  booktitle = {Scientific},
  year = {2024},
  doi = {10.1038/s41598-024-78378-3},
}
Figure