Need help with Mask_Guided_Portrait_Editing?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

159 Stars 32 Forks 4 Commits 2 Opened issues


pytorch implementation of "Mask-Guided Portrait Editing with Conditional GANs"

Services available


Need anything else?

Contributors list

# 245,116
Deep le...
4 commits

Mask-Guided Portrait Editing with Conditional GANs

This is an official pytorch implementation of "Mask-Guided Portrait Editing with Conditional GANs"(CVPR2019). The major contributors of this repository include Shuyang Gu, Jianmin Bao, Hao Yang, Dong Chen, Fang Wen, Lu Yuan at Microsoft Research.


Mask-Guided Portrait Editing is a novel technology based on mask-guided condititonal GANs, which can synthesize diverse, high-quality and controllable facial images from given masks. With the changeable input facial mask and source image, this method allows users to do high-level portrait editing.


If you find our code helpful for your research, please consider citing:

  title={Mask-Guided Portrait Editing With Conditional GANs},
  author={Gu, Shuyang and Bao, Jianmin and Yang, Hao and Chen, Dong and Wen, Fang and Yuan, Lu},
  booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},

Getting Started


  • Linux.
  • Pytorch 0.4.1.
  • Nvidia GPU: K40, M40, P100.
  • CUDA9.2 or 10.

Running code

  • download pretrained models here, put it under folder checkpoints/pretrained .
  • component editing: ./scripts/
  • component transfer: ./scripts/ change the corresponding component file in results/pretrained/editfreelatest, then run: ./scripts/ get the component transfer results.
  • training: ./scripts/

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.