Skip to content

joodykimdev/CainGAN

 
 

Repository files navigation

Pose Manipulation with Identity Preservation

PWC

Pose Manipulation with Identity Preservation. Andrei-Timotei Ardelean, Lucian Mircea Sasu in International Journal of Computers Communications & Control

img2-src img2-gen img3-src img3-gen

Official PyTorch implementation of CainGAN, used to perform few-shot image generation. Starting from one or more source pictures, the model can synthesize face images in novel poses while preserving the person's identity.

Copyright (C) 2019 Andrei-Timotei Ardelean, Lucian Mircea Sasu

All rights reserved. Licensed under the CC BY-NC-SA 4.0 (Attribution-NonCommercial-ShareAlike 4.0 International)

Demo

Sources

img1-src img6-src img4-src img5-src

Generated (one shot)

img1-gen img6-gen img4-gen img5-gen

Image animation (one shot)

vid1-src vid1-gen vid2-src vid2-gen

Installation

A ready to use conda environment is provided. To create the python environment run:

conda env create -f environment.yaml
conda activate fewshot

To train the model you can use the train script.

python train.py --K 8 --cuda_visible 0 --data_root vox2selection/mp4 

This will train an 8-shot model on GPU 0. Change data_root path to the directory of your dataset. The format of the directory is expected to be similar to the one used in VoxCeleb2 dataset.
The extract_landmarks.py script can be used to precompute landmarks for faster training. For example:

python extract_landmarks.py --data_root vox2selection/mp4 --output_path vox2selection/land --device 'cuda'

Acknowledgement

Special thanks go to Xperi Corporation that provided the environment and physical resources that made this work possible.

Citation

Should you find this work useful for your research, please cite:

@article{IJCCC3862,
	author = {Andrei-Timotei Ardelean and Lucian Sasu},
	title = {Pose Manipulation with Identity Preservation},
	journal = {International Journal of Computers Communications & Control},
	volume = {15},
	number = {2},
	year = {2020},
	issn = {1841-9844},
	doi = {10.15837/ijccc.2020.2.3862},
	url = {http://univagora.ro/jour/index.php/ijccc/article/view/3862}
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%