Skip to content

zhangzc21/ExSinGAN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ExSinGAN

Code for the paper: "ExSinGAN: learning an explainable Generative Model from a Single Image (BMVC 2021)"

code

Our code refered to the following projects:

And we rewrited the SinGAN and DGP for more concise expression.

Download pre-trained models

Please download Pretrained VGG and BigGAN from Google drive, and put them to Pretrained folder.

Install dependencies

pip install -r requirements.txt

Train

To train ExSinGAN, just running

python main_train.py --input_dir <input_dir> --input_name <image>

e.g., if you has an image leaningtower.jpg in Input/Images, just run

python main_train.py --input_dir Input/Images --input_name leaningtower.jpg

For more details of parameters, please see Models/config.py

We also offered a script To train SinGAN, just running

python main_train.py --input_dir <input_dir> --input_name <image> --use_struct False --use_semantic False --rescale_method singan --pyramid_height None

Random samples

Once the model is trained completely, the syntheses are stored in the Output directory. You can sample more syntheses by running

python random_samples.py --model_path <model_path> --num <num>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published