Implementation: CycleGAN and Pix2pix

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…

  1. pytorch installation
    1. see the repository
    2. For a machine with GPU
      1. conda install -c conda-forge dominate
      2. conda install pytorch torchvision cuda80 -c soumith
    3. For a machine without GPU
      1. export enviroment variable NO_CUDA=1
      2. add anaconda root directory to CMAKE_PREFIX_PATH as
        export CMAKE_PREFIX_PATH=[anaconda root directory]
      3. conda install numpy pyyaml mkl setuptools cmake gcc cffi
      4. git clone
      5. cd pytorch/
      6. python install
      7. cd ..
      8. git clone
      9. cd vision
      10. python install
  2. CycleGAN and pix2pix installation
    1. conda install -c conda-forge dominate
    2. git clone
    3. cd pytorch-CycleGAN-and-pix2pix

Note that running and without GPU requires to disable GPU via command line such as –gpu_id -1. For instance:
– With GPU: python –dataroot ./datasets/facades –name facades_pix2pix –gpu_ids 0 –model pix2pix –align_data –which_direction BtoA
– Without GPU: python –dataroot ./datasets/facades –name facades_pix2pix –gpu_ids -1 –model pix2pix –align_data –which_direction BtoA


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s