GitXplorerGitXplorer
z

Sparsely-Grouped-GAN

public
77 stars
14 forks
7 issues

Commits

List of commits on branch master.
Verified
0a764acfae0d354fbd3b0c121962a59b2bba5efe

Merge pull request #15 from zhangqianhui/dependabot/pip/pillow-9.0.1

zzhangqianhui committed 3 years ago
Verified
bf3c008b1e8fbada4ef5c185619a4cb2d28b44de

Bump pillow from 7.1.1 to 9.0.1

ddependabot[bot] committed 3 years ago
Verified
71cb757d05309324c8d8f38b95a30a83574d7df7

Update README.md

zzhangqianhui committed 5 years ago
Verified
2ba56ef3c9871055ff53e02eb1ad13059166ed15

Update README.md

zzhangqianhui committed 5 years ago
Unverified
d93292aa171e98eacf455f4dd44fcf005d6eaa4a

Remove identity information

zzhangqianhui committed 5 years ago
Unverified
14258114cebc341e1716d917283b1c17d720dd62

Merge branch 'master' of https://github.com/zhangqianhui/Sparsely-Grouped-GAN

zzhangqianhui committed 5 years ago

README

The README file for this repository.

SGGAN - Official Tensorflow Implementation

Sparsely Grouped Multi-task Generative Adversarial Networks for Facial Attribute Manipulation
Jichao Zhang, Yezhi Shu, Songhua Xu, Gongze Cao, Fan Zhong, Meng Liu, Xueying Qin
In ACMMM 2018 Oral.

Paper: https://arxiv.org/abs/1805.07509

Abstract: Recently, Image-to-Image Translation (IIT) has made great progress in enabling image style transfer and manipulation of semantic context in an image. However, existing approaches require exhaustive labelling of training data, which is labor demanding, difficult to scale up, and hard to adapt to a new domain. To overcome such a key limitation, we propose sparsely grouped generative adversarial networks(SG-GAN), a novel approach that can perform image translation in the sparsely grouped datasets, which most training data are mixed and just a few are labelled. SG-GAN with one-input multiple output architecture can be used for the translations among multiple groups using only a single trained model. As a case study for experimentally validating the advantages of our model, we apply the algorithm to tackle a series of tasks of attribute manipulation for facial images. Experiment results show that SG-GAN can achieve competitive results compared with previous state-of-the-art methods on adequately labelled datasets while attaining the superior quality of image translation results on sparsely grouped datasets where most data is mixed and only small parts are labelled..

Citation

@inproceedings{zhang2018sparsely,
  title={Sparsely grouped multi-task generative adversarial networks for facial attribute manipulation},
  author={Zhang, Jichao and Shu, Yezhi and Xu, Songhua and Cao, Gongze and Zhong, Fan and Liu, Meng and Qin, Xueying},
  booktitle={Proceedings of the 26th ACM international conference on Multimedia},
  pages={392--401},
  year={2018}
}

Dependencies

pip install -r requirments.txt

Usage

  • Clone this repo:
git clone https://github.com/zhangqianhui/Sparsely-Grouped-GAN.git
cd Sparsely-Grouped-GAN
  • Download the CelebA dataset

You can download the CelebA dataset and unzip CelebA into a directory.

Just like

---------------------------------------------

The training data folder should look like : 
<base_dir/images/>
               |--image1
               |--image2
               |--image3
               |--image4...
   
list_attr_celeba.txt

---------------------------------------------

You can edit label_dir and data_dir in Baseoptions.txt and use the path for your CelebA dataset.

  • Train the model using command line with python
python train.py --exper_name='log20_5_1' --gpu_id='0' --loss_type='wgan_gp' --n_critic=5 --lam_c=10
  • Test the model
python test.py --exper_name='log20_5_1' --gpu_id='0' 

Or Using scripts for training

bash scripts/train_log20_5_1.sh

Using scripts for testing and pretained model can be downloaded Pretrained Model

bash scripts/test_log20_5_1.sh

Experiment Result

Reference code