Skip to content

Latest commit

 

History

History
67 lines (47 loc) · 2.96 KB

README.md

File metadata and controls

67 lines (47 loc) · 2.96 KB

FaceEdit3D

3D-Aware Face Editing via Warping-Guided Latent Direction Learning

Yuhao Cheng, Zhuo Chen, Xingyu Ren, Wenhan Zhu, Zhengqin Xu, Di Xu, Changpeng Yang, Yichao Yan

CVPR 2024

Paper | Project page

Teaser Image

Requirements

Editing

  • For one random seed, e.g., 0, you can obtain a facial image with its 3D landmarks.
python generate_3D_landmarks.py --seeds 0
  • Then, you will obtain a source_3d_ldms.txt and a target_3d_ldms.txt, then you can edit the locations of ldms in target_3d_ldms.txt.

  • You can obtain warped images with:

python gen_warped_images.py --outdir=out --network=ffhqrebalanced512-128.pkl
  • You can obtain final edited images with:
python gen_inversion_warped_images.py --outdir=out --network=ffhqrebalanced512-128.pkl

# --edit_shape controls editing facial shape, and --edit_exp controls editing facial expressions.
# We also provide some editing directions in editing_direction, which can be used by --direction.

Definition of the landmarks

Teaser Image

Acknowledgements

Some functions or scripts in this implementation are inspired by external sources. We appreciate the authors for their excellent work.

Here are some valuable resources we have benefited from:

  • eg3d for the pretrained generative model.
  • GOAE for the encoder structure and pretrained models.
  • PTI for GAN inversion.
  • WarpGAN for triplane Warp.
  • Mediapipe for 2D facial landmarks detection.

Citation

@inproceedings{cheng20243d,
  title={3D-Aware Face Editing via Warping-Guided Latent Direction Learning},
  author={Cheng, Yuhao and Chen, Zhuo and Ren, Xingyu and Zhu, Wenhan and Xu, Zhengqin and Xu, Di and Yang, Changpeng and Yan, Yichao},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  pages={916--926},
  year={2024}
}