The folder CFIAR10/prepare_data
contains the code to prepare data
for the CIFAR-10 experiments.
First, you need a pre-trained image classifier to annotate generated images.
The image classifier
that we have used is publicly
available here.
You can simply download the densenet-bc-L190-k40
model and unzip it to the folder CIFAR10/pretrained/classifiers/cifar10
, where our code will
load the checkpoint of the image classifier.
Generate 60k images and latent variables of StyleGAN2 (including w and z):
bash scripts/run_gen_batch.sh
Use the pre-trained image classifier to annotate the generated images:
bash scripts/run_cifar10_labeling.sh
The resulting pairs of latent variables (w and z) and labels will be used to train latent classifiers.
After Data generation
, you can calculate the FID statistics for real CIFAR-10 images:
bash scripts/run_calc_inception.sh
The resulting inception_cifar10.pkl
will be used for computing FID scores.