We provide the testing code that synthesizes images with the trained model.
Clone this repository
git clone https://github.com/google/lecam-gan.git
cd lecam-gan/biggan_imagenet
Install packages
conda create --name lcgan_tf python=3.6
conda activate lcgan_tf
pip install -r requirements.txt
Synthesizing the images:
CUDA_VISIBLE_DEVICES=0 python generate.py --tfhub_url MODEL --classes [0, 5, 10]
You can specify the index of desired class with the --class
command.
You can use the Colab LeCamGAN_Demo.ipynb
to load the model and generate the images.
This repository is built based on the implementation from compare_gan. Our models are trained using TPUs.