Skip to content

LiYuhangUSTC/Lines2Face

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lines2Face

This is the official implementation of paper LinesToFacePhoto: Face Photo Generation from Lines with Conditional Self-Attention Generative Adversarial Network.

teaser

Prerequisites

TensorFlow 1.8.0, Python 3.6, NumPy, scipy, PIL, tqdm

Data

We use TFrecord file for our dataset. See /data.py and /tools/Image_mask_edge_df.py for details. Since the TFrecord file we use may be redundant, you can modify it to meet your need.

The face photo dataset we use is CelebA-HQ.

The method we use to get line maps is the same as that in SketchyGAN, which is basicall HED + postprocessing.

Distance fields (df's) are obtaind by distance transform.

The masks are not used in this project.

Pre-trained model

The pre-trained model can be download at BaiduPan(uploading..) or GoogleDrive

Test

The data TFrecord file should be prepared as described above and put in /input. The pretrained model should be downloaded into /checkpoint/quad. Example script of testing can be found in /scripts.sh. The results are supposed to be in /output.

Links

Project page

Paper

Pre-trained model: BaiduPan(uploading..) or GoogleDrive

Cite

@inproceedings{Li:2019:LFP:3343031.3350854,
 author = {Li, Yuhang and Chen, Xuejin and Wu, Feng and Zha, Zheng-Jun},
 title = {LinesToFacePhoto: Face Photo Generation From Lines With Conditional Self-Attention Generative Adversarial Networks},
 booktitle = {Proceedings of the 27th ACM International Conference on Multimedia},
 series = {MM '19},
 year = {2019},
 isbn = {978-1-4503-6889-6},
 location = {Nice, France},
 pages = {2323--2331},
 numpages = {9},
 url = {http://doi.acm.org/10.1145/3343031.3350854},
 doi = {10.1145/3343031.3350854},
 acmid = {3350854},
 publisher = {ACM},
 address = {New York, NY, USA},
 keywords = {conditional generative adversarial nets, face, line map, realistic images, self-attention},
} 

Credits

MRU code by SketchyGAN

Self-atttention modual code modified from Self-Attention-GAN-Tensorflow

Some code by pix2pix-tensorflow

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published