Unofficial Pytorch implementation of Pix2PixHD, from High-Resolution Image Synthesis and Semantic Manipulation with Conditional GANs (Wang et al. 2018). Implementation for Generative Adversarial Networks (GANs) Specialization course material.
- Download the Cityscapes dataset, unzip the
gtFine_trainvaltest.zip
andleftImg8bit_trainvaltest.zip
folders and move them todata
directory. - All Python requirements can be found in
requirements.txt
. Support for Python>=3.7. - Configs for low- and high-resolution training can be found in the
configs
folder. All defaults are as per the configurations described in the original paper and code.
By default, all checkpoints will be stored in logs/YYYY-MM-DD_hh_mm_ss
, but this can be edited via the train.log_dir
field in the config files.
- To train low-resolution models, run
python train.py --config configs/lowres.yml
. - To train high-resolution models, edit the
pretrain_checkpoint
field inconfigs/highres.yml
to reflect the desired pretrained checkpoints from2.
and rynpython train.py --config configs/highres.yml --high_res
.
- Edit the
resume_checkpoint
fieldconfigs/highres.yml
to reflect the desired high-res checkpoint from training and runpython infer.py --config configs/highres.yml
.