TL;DR
This paper introduces DynamicFace, a novel diffusion-based method for high-quality and temporally consistent face swapping in both images and videos. It achieves this by leveraging disentangled 3D facial priors to control identity, expression, pose, and background, and by introducing a FusionTVO module to mitigate flickering artifacts.
What Problem Does This Paper Address?
Face swapping, the process of transferring a source face's identity to a target face while preserving the target's attributes like expression and pose, has numerous applications in areas like film production and virtual reality. While recent methods have shown impressive results, they often struggle with two key challenges: 1) balancing the preservation of the source identity with the accurate capture of the target's motion, and 2) providing precise control over non-identity attributes to maintain temporal consistency, especially in video. Existing approaches can inadvertently transfer identity information from the target, compromise expression details, or fail to maintain smooth transitions across video frames, leading to flickering or unnatural results.
Methods
DynamicFace builds upon the powerful Stable Diffusion model and incorporates temporal attention mechanisms for video processing. Its core innovation lies in a new conditioning mechanism that decomposes the face into four fine-grained, disentangled conditions derived from 3D facial priors:
- Background: The background is preserved as is, with the model focusing on the facial region.
- Shape-Aware Normal Map: This condition captures both the shape of the source face and the pose/expression of the target face, ensuring accurate alignment.
- Expression-Related Landmark: This condition uses 2D landmarks to represent expression, with efforts made to remove identity-specific details.
- Identity-Removed UV Texture Map: This condition provides illumination information without carrying identity-specific facial geometry.
To inject identity, DynamicFace uses two modules: Face Former for high-level identity injection using semantic embeddings, and ReferenceNet for fine-grained identity preservation by leveraging a trainable replica of Stable Diffusion's UNet. To address temporal flickering in videos, the FusionTVO (Fusion Total Variation Optimizer) module is introduced. This module combines segment-aware latent fusion with temporal Total Variation regularization to ensure smooth transitions between video segments and suppress flickering artifacts.
Datasets
- Training: VGGFace2, VFHQ, and a private dataset were used for training.
- Evaluation: The FF++ dataset was used for evaluation.
Key Insights and Ideas
- Disentangled 3D Priors are Key: The paper highlights that decomposing facial attributes into distinct, controllable conditions (background, shape, expression, illumination) derived from 3D priors is crucial for precise and flexible face swapping.
- Identity vs. Motion Trade-off Mitigation: By carefully designing conditions and using specialized identity injection modules (Face Former, ReferenceNet), the method effectively balances preserving source identity with accurately capturing target motion.
- Temporal Consistency is Achievable: The FusionTVO module demonstrates that temporal flickering, a common issue in diffusion-based video generation, can be significantly reduced through latent fusion and TV regularization.
- Diffusion Models for Video Face Swapping: The work shows that diffusion models, when augmented with appropriate conditioning and temporal modules, can be effectively adapted for high-quality video face swapping, overcoming limitations of previous GAN-based approaches.
Key Results
- State-of-the-Art Performance: DynamicFace achieves state-of-the-art results on the FF++ dataset, outperforming existing methods in identity retrieval, pose, expression, mouth, and eye motion accuracy.
- High Identity Preservation: The method demonstrates superior identity preservation, with an ID Retrieval score of 99.20% and ID Similarity of 0.574.
- Improved Temporal Consistency: The FusionTVO module significantly improves video quality metrics, with consistency and aesthetic scores of 99.04% and 3.51 respectively.
- Qualitative Superiority: Qualitative comparisons show that DynamicFace generates high-fidelity faces with accurate identity, precise motion (expression, pose, gaze), and realistic backgrounds, surpassing GAN-based methods in quality.
Limitations and Future Work
- Pose Estimation Sensitivity: The paper notes that their pose error results are slightly poorer than others because DynamicFace alters face shape, which can affect the performance of shape-sensitive head pose estimators.
- Future Work: The authors hope their work inspires future research to further explore face-swapping formulations for even better results. The paper implicitly suggests that exploring more robust pose estimation methods or alternative ways to incorporate pose information could be a direction for future work.
Summary updated