I am Charmie

メモとログ

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 https://github.com/pytorch/pytorch.git
      5. cd pytorch/
      6. python setup.py install
      7. cd ..
      8. git clone https://github.com/pytorch/vision.git
      9. cd vision
      10. python setup.py install
  2. CycleGAN and pix2pix installation
    1. conda install -c conda-forge dominate
    2. git clone https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix
    3. 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 GPUpython train.py --dataroot ./datasets/facades --name facades_pix2pix --gpu_ids 0 --model pix2pix --align_data --which_direction BtoA - Without GPUpython train.py --dataroot ./datasets/facades --name facades_pix2pix --gpu_ids -1 --model pix2pix --align_data --which_direction BtoA