Skip to content

Commit c5921c8

Browse files
committed
update README and update scripts
1 parent 235bc40 commit c5921c8

File tree

9 files changed

+31
-3
lines changed

9 files changed

+31
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ This is our PyTorch implementation for both unpaired and paired image-to-image t
88

99
The code was written by [Jun-Yan Zhu](https://github.com/junyanz) and [Taesung Park](https://github.com/taesung89), and supported by [Tongzhou Wang](https://ssnl.github.io/).
1010

11-
This PyTorch implementation produces results comparable or better than our original Torch software. If you would like to reproduce the exact same results as in the papers, check out the original [CycleGAN Torch](https://github.com/junyanz/CycleGAN) and [pix2pix Torch](https://github.com/phillipi/pix2pix) code
11+
This PyTorch implementation produces results comparable to or better than our original Torch software. If you would like to reproduce the exact same results as in the papers, check out the original [CycleGAN Torch](https://github.com/junyanz/CycleGAN) and [pix2pix Torch](https://github.com/phillipi/pix2pix) code
1212

13-
**Note**: The current software works well with PyTorch 0.1-0.3. PyTorch 0.4 support will be added by the end of May.
13+
**Note**: The current software works well with PyTorch 0.4. Check out the older [branch](https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix/tree/pytorch0.3.1) that supports PyTorch 0.1-0.3.
1414

1515
#### CycleGAN: [[Project]](https://junyanz.github.io/CycleGAN/) [[Paper]](https://arxiv.org/pdf/1703.10593.pdf) [[Torch]](https://github.com/junyanz/CycleGAN)
1616
<img src="https://junyanz.github.io/CycleGAN/images/teaser_high_res.jpg" width="900"/>
@@ -71,7 +71,7 @@ CycleGAN course assignment [code](http://www.cs.toronto.edu/~rgrosse/courses/csc
7171

7272
## Getting Started
7373
### Installation
74-
- Install PyTorch and dependencies from http://pytorch.org
74+
- Install PyTorch 0.4 and dependencies from http://pytorch.org
7575
- Install Torch vision from the source.
7676
```bash
7777
git clone https://github.com/pytorch/vision

scripts/check_all.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
set -ex
2+
echo 'apply a pretrained cyclegan model'
3+
# bash pretrained_models/download_cyclegan_model.sh horse2zebra
4+
# bash ./datasets/download_cyclegan_dataset.sh horse2zebra
5+
# python test.py --dataroot datasets/horse2zebra/testA --checkpoints_dir ./checkpoints/ --name horse2zebra_pretrained --no_dropout --model test --dataset_mode single --loadSize 256
6+
7+
echo 'apply a pretrained pix2pix model'
8+
# bash pretrained_models/download_pix2pix_model.sh facades_label2photo
9+
# bash ./datasets/download_pix2pix_dataset.sh facades
10+
# python test.py --dataroot ./datasets/facades/ --which_direction BtoA --model pix2pix --name facades_label2photo_pretrained --dataset_mode aligned --which_model_netG unet_256 --norm batch
11+
12+
13+
echo 'cyclegan train (1 epoch) and test'
14+
# bash ./datasets/download_cyclegan_dataset.sh maps
15+
# python train.py --dataroot ./datasets/maps --name maps_cyclegan --model cycle_gan --no_dropout --niter 1 --niter_decay 0 --max_dataset_size 100 --save_latest_freq 100
16+
# python test.py --dataroot ./datasets/maps --name maps_cyclegan --model cycle_gan --phase test --no_dropout
17+
18+
19+
echo 'pix2pix train (1 epoch) and test'
20+
python train.py --dataroot ./datasets/facades --name facades_pix2pix --model pix2pix --which_model_netG unet_256 --which_direction BtoA --lambda_A 100 --dataset_mode aligned --no_lsgan --norm batch --pool_size 0 --niter 1 --niter_decay 0 --save_latest_freq 400
21+
python test.py --dataroot ./datasets/facades --name facades_pix2pix --model pix2pix --which_model_netG unet_256 --which_direction BtoA --dataset_mode aligned --norm batch

scripts/conda_deps.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
set -ex
12
conda install numpy pyyaml mkl mkl-include setuptools cmake cffi typing
23
conda install -c pytorch magma-cuda80 # or magma-cuda90 if CUDA 9
34
conda install pytorch torchvision -c pytorch # install pytorch; if you want to use cuda90, add cuda90

scripts/install_deps.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
set -ex
12
pip install visdom
23
pip install dominate

scripts/test_cyclegan.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
set -ex
12
python test.py --dataroot ./datasets/maps --name maps_cyclegan --model cycle_gan --phase test --no_dropout

scripts/test_pix2pix.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
set -ex
12
python test.py --dataroot ./datasets/facades --name facades_pix2pix --model pix2pix --which_model_netG unet_256 --which_direction BtoA --dataset_mode aligned --norm batch

scripts/test_single.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
set -ex
12
python test.py --dataroot ./datasets/facades/testB/ --name facades_pix2pix --model test --which_model_netG unet_256 --which_direction BtoA --dataset_mode single --norm batch

scripts/train_cyclegan.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
set -ex
12
python train.py --dataroot ./datasets/maps --name maps_cyclegan --model cycle_gan --pool_size 50 --no_dropout

scripts/train_pix2pix.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
set -ex
12
python train.py --dataroot ./datasets/facades --name facades_pix2pix --model pix2pix --which_model_netG unet_256 --which_direction BtoA --lambda_A 100 --dataset_mode aligned --no_lsgan --norm batch --pool_size 0

0 commit comments

Comments
 (0)