diff options
| author | junyanz <junyanz@berkeley.edu> | 2017-04-20 04:37:12 -0700 |
|---|---|---|
| committer | junyanz <junyanz@berkeley.edu> | 2017-04-20 04:37:12 -0700 |
| commit | 2d4b9bf9149126d20237dc357a8c23294273e91b (patch) | |
| tree | 2df00ed9941fcfec08d478500ba473f16a0965ee /README.md | |
| parent | dee4a6844d464252f198e3a64ab7e919d5ded13a (diff) | |
make visdom default & add no_html & update scripts
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 21 |
1 files changed, 11 insertions, 10 deletions
@@ -60,12 +60,12 @@ cd pytorch-CycleGAN-and-pix2pix ```bash bash ./datasets/download_cyclegan_dataset.sh maps ``` -- Train a model: +- Train a model (`bash ./scripts/train_cyclegan.sh`): ```bash python train.py --dataroot ./datasets/maps --name maps_cyclegan --model cycle_gan ``` -To view results as the model trains, check out the html file `./checkpoints/maps_cyclegan/web/index.html` -- Test the model: +- To view training results and loss plots, run `python -m visdom.server` and click the URL http://localhost:8097. To see more intermediate results, check out `./checkpoints/maps_cyclegan/web/index.html` +- Test the model (`bash ./scripts/test_cyclegan.sh`): ```bash python test.py --dataroot ./datasets/maps --name maps_cyclegan --model cycle_gan --phase test ``` @@ -76,14 +76,14 @@ The test results will be saved to a html file here: `./results/maps_cyclegan/lat ```bash bash ./datasets/download_pix2pix_dataset.sh facades ``` -- Train a model: +- Train a model (`bash ./scripts/train_pix2pix.sh`): ```bash -python train.py --dataroot ./datasets/facades --name facades_pix2pix --model pix2pix --which_model_netG unet_256 --align_data --which_direction BtoA +python train.py --dataroot ./datasets/facades --name facades_pix2pix --model pix2pix --which_model_netG unet_256 --which_direction BtoA --lambda_A 100 --align_data --no_lsgan ``` -To view results as the model trains, check out the html file `./checkpoints/facades_pix2pix/web/index.html` -- Test the model: +- To view training results and loss plots, run `python -m visdom.server` and click the URL http://localhost:8097. To see more intermediate results, check out `./checkpoints/facades_pix2pix/web/index.html` +- Test the model (`bash ./scripts/test_pix2pix.sh`): ```bash -python test.py --dataroot ./datasets/facades --name facades_pix2pix --model pix2pix --which_model_netG unet_256 --align_data --which_direction BtoA +python test.py --dataroot ./datasets/facades --name facades_pix2pix --model pix2pix --which_model_netG unet_256 --which_direction BtoA --align_data ``` The test results will be saved to a html file here: `./results/facades_pix2pix/latest_val/index.html`. @@ -92,7 +92,7 @@ More example scripts can be found at `scripts` directory. ## Training/test Details - See `options/train_options.py` and `options/base_options.py` for training flags; see `optoins/test_options.py` and `options/base_options.py` for test flags. - CPU/GPU (default `--gpu_ids 0`): Set `--gpu_ids -1` to use CPU mode; set `--gpu_ids 0,1,2` for multi-GPU mode. -- During training, the current results can be viewed using two methods. First, if you set `--display_id` > 0, the results will be shown on a local graphics web server launched by [visdom](https://github.com/facebookresearch/visdom). To do this, you should have visdom installed and a server running by the command `python -m visdom.server`. The default server URL is `http://localhost:8097`. `display_id` corresponds to the window ID that is displayed on the `visdom` server. The `visdom` display functionality is turned on by default. To avoid the extra overhead of communicating with `visdom` set `--display_id 0`. Second, the intermediate results are saved to `[opt.checkpoints_dir]/[opt.name]/web/` as an HTML file. To avoid this, set `--no_html`. +- During training, the current results can be viewed using two methods. First, if you set `--display_id` > 0, the results and loss plot will be shown on a local graphics web server launched by [visdom](https://github.com/facebookresearch/visdom). To do this, you should have visdom installed and a server running by the command `python -m visdom.server`. The default server URL is `http://localhost:8097`. `display_id` corresponds to the window ID that is displayed on the `visdom` server. The `visdom` display functionality is turned on by default. To avoid the extra overhead of communicating with `visdom` set `--display_id 0`. Second, the intermediate results are saved to `[opt.checkpoints_dir]/[opt.name]/web/` as an HTML file. To avoid this, set `--no_html`. ### CycleGAN Datasets @@ -139,7 +139,8 @@ This will combine each pair of images (A,B) into a single image file, ready for ## TODO - add reflection and other padding layers. -- add one-direction test model. +- add one-direction test mode for CycleGAN. +- add more preprocessing options. - fully test Unet architecture. - fully test instance normalization layer from [fast-neural-style project](https://github.com/darkstar112358/fast-neural-style). - fully test CPU mode and multi-GPU mode. |
