ndtreviv / Dual_Generator_Face_Reenactment

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dual-Generator-Face-Reenactment-DG

Python 3.6 CUDA 10.2 Pytorch 1.6

image image

image image image

Abstract: We propose the Dual-Generator (DG) network for large-pose face reenactment. Given a source face and a reference face as inputs, the DG network can generate an output face that has the same pose and expression as of the reference face, and has the same identity as of the source face. As most approaches do not particularly consider large-pose reenactment, the proposed approach addresses this issue by incorporating a 3D landmark detector into the framework and considering a loss function to capture visible local shape variation across large pose. The DG network consists of two modules, the ID-preserving Shape Generator (IDSG) and the Reenacted Face Generator (RFG). The IDSG encodes the 3D landmarks of the reference face into a reference landmark code, and encodes the source face into a source face code. The reference landmark code and the source face code are concatenated and decoded to a set of target landmarks that exhibits the pose and expression of the reference face and preserves the identity of the source face.

Demo

In this demo, you will be the reference face. Therefore, you can control the source face to follow your pose.

  1. Because the size of our pretrained model is too big to be stored to GitHub, please download the model from

https://drive.google.com/file/d/1H8RqQ4GAYSVFt9q3CgIyS1CrOKQRXi7U/view?usp=sharing

  1. Unzip it and place it in the main directory ./.

  2. To have a live demo, please get ready with a usb camera.

  3. Run the demo.py

python demo.py

  1. For better performance, we strongly recommend using the same version as ours.

Details of implementataion

image image

About


Languages

Language:Python 100.0%