- Extract the celeba HQ images using the code from https://github.com/willylulu/celeba-hq-modified
- Split the 30K celeba 1024x1024 images into training set and test set. The training images are placed in the folder "dataset/celeba/train/image/" while the testing images are placed in the folder "dataset/celeba/test/image/"
python train.py --ngpu 8 --model_dir model/ --train_data_dir dataset/celeba/train/ --test_data_dir dataset/celeba/test/
In the file train.py you can configure the hyperparameters, including the model size and final image resolutions. The default image resolsution is 1024x1024, which means the model will gradually grow from 4x4, 8x8, ... finally to 1024x1024. When training the 1024x1024 model, 8 x Tesla V100 32GB GPUs were used. However, if the final resolustion is 512x512, the model should be able to be trained on 8 x GTX 1080Ti GPUs (not verified).
python inference.py --ngpu 8 --ckpt_file_name model/stagecheckpoint/model_stage_#_step_#.pt --train_data_dir dataset/celeba/train/ --test_data_dir dataset/celeba/test/
You can specify the stage number and step number to determine which resolustion stage in which step you are going to test.
Lydia, Gauerhof, and Nianlong Gu. "Reverse Variational Autoencoder for Visual Attribute Manipulation and Anomaly Detection." The IEEE Winter Conference on Applications of Computer Vision. 2020.
If you have any question, please contact nianlonggu@gmail.com or Lydia.Gauerhof@de.bosch.com