Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

[CVPR 2023] GLeaD: Improving GANs with A Generator-Leading Task

NotificationsYou must be signed in to change notification settings

EzioBy/glead

Repository files navigation

GLeaD: Improving GANs with A Generator-Leading Task
Qingyan Bai, Ceyuan Yang, Yinghao Xu, Xihui liu, Yujiu Yang, Yujun Shen
Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) 2023

Figure: Concept diagram of our proposed generator-leadingtask (bottom), as complementary to the discriminator-leading taskin the original formulation of GANs (upper). D is required toextract representative features that can be adequately decoded byG to reconstruct the input.

[Paper][Project Page]

This work aims at improving Generative adversarial network (GAN) with a generator-leading task.GAN is formulated as a two-player game between a generator (G) and a discriminator (D),where D is asked to differentiate whether an image comes from real data or is produced by G.Under such a formulation, D plays as the rule maker and hence tends to dominate the competition.Towards a fairer game in GANs, we propose a new paradigm for adversarial training,which makesG assign a task to D as well. Specifically, given an image,we expect D to extract representative features that can be adequately decoded by G to reconstruct the input.That way, instead of learning freely, D is urged to align with the view of G for domain classification.

Preparing

Environment.Pytorch 1.8.1 + CUDA 11.1 + Python 3.8. Use the following script to install other packages:

pip install -r requirements.txt

Data.Please download FFHQ for face domain, and LSUN Church and Bedroom for indoor and outdoor scene, respectively.Note that we followStyleGAN-ADA to preprocess the images.

Pre-trained models.The pre-trained GAN models can be found atGoogle Drive for reproduction.The following table could also be of use - Ours* indicates the model is trained with a combined strategy of GLeaD and GGDR, as in Table 1 in the paper:

ModelLink
FFHQ_OursGoogle Drive
FFHQ_Ours*Google Drive
Church_OursGoogle Drive
Church_Ours*Google Drive
Bedroom_OursGoogle Drive
Bedroom_Ours*Google Drive

Training

To train the models under GLeaD, run:

python train_scripts_ffhq.pypython train_scripts_church.pypython train_scripts_bedroom.py

where the "reg_target_fake" option indicates the regularization strategy - using GLeaD (gfwimage) or GGDR (gfeat) when discriminating generated images.And "data" indicates the path of the dataset, "outdir" indicates the output directory, and "gpus" means the GPU amount for training.

Evaluating

To evaluate the models, run:

python calc_metric_scripts.py

Remember to reset the data_paths and pkl_paths in "pkl_list".

Generating

To generate samples with the pre-trained model, run:

python generate.py --outdir=out --trunc=0.7 --seeds=600-605 --network=your_pkl_path

Acknowledgement

Thanks toStyleGAN-ADA andGGDRfor sharing the code.

BibTeX

If you find our work helpful for your research, please consider to cite:

@inproceedings{bai2023glead,author    ={Bai, Qingyan and Yang, Ceyuan and Xu, Yinghao and Liu, Xihui and Yang, Yujiu and Shen, Yujun},title     ={GLeaD: Improving GANs With a Generator-Leading Task},booktitle ={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},year      ={2023},pages     ={12094-12104}}

About

[CVPR 2023] GLeaD: Improving GANs with A Generator-Leading Task

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp