Pytorch implementation of our method for high-resolution (e.g. 2048x1024) photorealistic image-to-image translation. It can be used for turning semantic label maps into photo-realistic images or synthesizing portraits from face label maps.
- Our src images and preprocess image
- Linux or macOS
- Python 2 or 3
- NVIDIA GPU (11G memory or larger) + CUDA cuDNN
- Install PyTorch and dependencies from http://pytorch.org
- Install python libraries dominate.
pip install dominate
## pip install ...
pip install dominate -i http://pypi.douban.com/simple --trusted-host pypi.douban.com --user
- Clone this repo:
git clone https://github.com/NVIDIA/pix2pixHD
cd pix2pixHD
- We use the BONC dataset.
- Train a model
python train.py --label_nc 0 --no_instance --resize_or_crop 1088 --gpu_ids 0,1 --no_flip --tf_log
python test.py --label_nc 0 --no_instance --resize_or_crop none --name bp_ab --resize_or_crop none --gpu_ids 0,1 --no_flip