The implementation of CycleGAN and Pix2pix based on pytorch is published on github. Here's a todo procedure with anaconda.
The CPU mode installation is under test right now...
- pytorch installation
- see the repository
- For a machine with GPU
- conda install -c conda-forge dominate
- conda install pytorch torchvision cuda80 -c soumith
- For a machine without GPU
- export enviroment variable NO_CUDA=1
- add anaconda root directory to CMAKE_PREFIX_PATH as export CMAKE_PREFIX_PATH=[anaconda root directory]
- conda install numpy pyyaml mkl setuptools cmake gcc cffi
- git clone https://github.com/pytorch/pytorch.git
- cd pytorch/
- python setup.py install
- cd ..
- git clone https://github.com/pytorch/vision.git
- cd vision
- python setup.py install
- CycleGAN and pix2pix installation
- conda install -c conda-forge dominate
- git clone https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix
- cd pytorch-CycleGAN-and-pix2pix
Note that running train.py and test.py without GPU requires to disable GPU via command line such as --gpu_id -1. For instance: - With GPU: python train.py --dataroot ./datasets/facades --name facades_pix2pix --gpu_ids 0 --model pix2pix --align_data --which_direction BtoA - Without GPU: python train.py --dataroot ./datasets/facades --name facades_pix2pix --gpu_ids -1 --model pix2pix --align_data --which_direction BtoA