Permalink
Browse files

Version 2 released

  • Loading branch information...
Ming-Yu Liu
Ming-Yu Liu committed Oct 4, 2017
1 parent 6a0a5b8 commit ffac9d97c6f3cf8cf84bbb57459046f77dddf96e
Showing with 1,465 additions and 1,201 deletions.
  1. +3 −3 .gitignore
  2. +3 −6 README.md
  3. +16 −0 USAGE.md
  4. BIN datasets/mnist/mnist32x32.pkl.gz
  5. +0 −34 exps/celeba_blond_hair.yaml
  6. +0 −33 exps/covaegan/da_svhn2mnist.yaml
  7. +0 −33 exps/covaegan/svhn2mnist_r01.yaml
  8. +0 −33 exps/kaist_day_and_night.yaml
  9. +53 −0 exps/unit/blondhair.yaml
  10. +54 −0 exps/unit/cat2tiger.yaml
  11. +54 −0 exps/unit/corgi2husky.yaml
  12. BIN images/cat001.jpg
  13. BIN images/cat002.jpg
  14. BIN images/corgi001.jpg
  15. BIN images/husky001.jpg
  16. BIN images/ian.jpg
  17. +3 −0 images/image_list.txt
  18. BIN images/jensen.jpg
  19. BIN results/cat2tiger_cat001.jpg
  20. BIN results/cat2tiger_cat002.jpg
  21. BIN results/corgi2husky_corgi001.jpg
  22. BIN results/husky2corgi_husky001.jpg
  23. BIN results/ian_to_blond_hair.jpg
  24. BIN results/ian_to_eyeglasses.jpg
  25. BIN results/ian_to_no_goatee.jpg
  26. BIN results/ian_to_no_smiling.jpg
  27. +85 −0 src/cocogan_train.py
  28. +9 −14 src/{train_domain_adaptation.py → cocogan_train_domain_adaptation.py}
  29. +93 −0 src/cocogan_translate.py
  30. +84 −0 src/cocogan_translate_one_image.py
  31. +45 −2 src/common.py
  32. +3 −3 src/datasets/__init__.py
  33. +49 −0 src/datasets/dataset_celeba.py
  34. +87 −67 src/datasets/dataset_image.py
  35. +9 −68 src/datasets/dataset_mnist.py
  36. +5 −0 src/datasets/dataset_svhn.py
  37. +0 −233 src/train.py
  38. +2 −3 src/trainers/__init__.py
  39. +247 −0 src/trainers/cocogan_nets.py
  40. +103 −0 src/trainers/cocogan_nets_da.py
  41. +160 −0 src/trainers/cocogan_trainer.py
  42. +62 −199 src/trainers/{unit_trainer.py → cocogan_trainer_da.py}
  43. +206 −0 src/trainers/common_net.py
  44. +27 −1 src/trainers/helpers.py
  45. +3 −3 src/trainers/init.py
  46. +0 −349 src/trainers/unit_nets.py
  47. +0 −117 src/translate_one_image.py
View
@@ -1,10 +1,10 @@
*.pyc
outputs/
data/
logs/
.idea/
dgx/scripts/
*.tar.gz
notebooks/.ipynb_checkpoints/*
*.tar.gz
*.zip
logs/
*.pkl
*.pyc
View
@@ -1,16 +1,13 @@
## PyTorch Implementation of our Coupled VAE-GAN algorithm for Unsupervised Image-to-Image Translation
## PyTorch Implementation of the Coupled GAN algorithm for Unsupervised Image-to-Image Translation
### License
Copyright (C) 2017 NVIDIA Corporation. All rights reserved.
Licensed under the CC BY-NC-ND 4.0 license (https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode).
### Paper
### General
This is a PyTorch implementation of the Coupled VAE-GAN (CoVAE-GAN) algorithm for Unsupervised Image-to-Image Translation.
For more details please refer to our [paper](https://arxiv.org/abs/1703.00848).
Ming-Yu Liu, Thomas Breuel, Jan Kautz, "Unsupervised Image-to-Image Translation Networks" arXiv:1703.00848 2017
[Ming-Yu Liu, Thomas Breuel, Jan Kautz, "Unsupervised Image-to-Image Translation Networks" NIPS 2017](https://arxiv.org/abs/1703.00848)
Please cite our paper if this software is used in your publications.
View
@@ -0,0 +1,16 @@
## PyTorch Implementation of the Coupled GAN algorithm for Unsupervised Image-to-Image Translation
### License
Copyright (C) 2017 NVIDIA Corporation. All rights reserved.
Licensed under the CC BY-NC-ND 4.0 license (https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode).
### Paper
[Ming-Yu Liu, Thomas Breuel, Jan Kautz, "Unsupervised Image-to-Image Translation Networks" NIPS 2017](https://arxiv.org/abs/1703.00848)
Please cite our paper if this software is used in your publications.
### Code usage
Please go to the [user manual page](README.md)
Binary file not shown.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
View
@@ -0,0 +1,53 @@
# Copyright (C) 2017 NVIDIA Corporation. All rights reserved.
# Licensed under the CC BY-NC-ND 4.0 license (https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode).
train:
snapshot_save_iterations: 5000 # How often do you want to save trained models
image_save_iterations: 2500 # How often do you want to save output images during training
image_display_iterations: 100
display: 1 # How often do you want to log the training stats
snapshot_prefix: ../outputs/unit/celeba/blondhair/blondhair # Where do you want to save the outputs
hyperparameters:
trainer: COCOGANTrainer
lr: 0.0001 # learning rate
ll_direct_link_w: 100 # weight on the self L1 reconstruction loss
kl_direct_link_w: 0.1 # weight on VAE encoding loss
ll_cycle_link_w: 100 # weight on the cycle L1 reconstruction loss
kl_cycle_link_w: 0.1 # weight on the cycle L1 reconstruction loss
gan_w: 10 # weight on the adversarial loss
batch_size: 1 # image batch size per domain
max_iterations: 2000000 # maximum number of training epochs
gen:
name: COCOResGen2
ch: 64 # base channel number per layer
input_dim_a: 3
input_dim_b: 3
n_enc_front_blk: 3
n_enc_res_blk: 3
n_enc_shared_blk: 1
n_gen_shared_blk: 1
n_gen_res_blk: 3
n_gen_front_blk: 3
dis:
name: COCOSharedDis
ch: 64
input_dim_a: 3
input_dim_b: 3
n_front_layer: 2
n_shared_layer: 4
datasets:
train_a: # Domain 1 dataset
channels: 3 # image channel number
scale: 1.0 # scaling factor for scaling image before processing
crop_image_size: 132 # crop image size
class_name: dataset_celeba # dataset class name
root: ../datasets/celeba/ # dataset folder location
folder: img_align_crop_resize_celeba/
list_name: lists/Blond_Hair_ON.txt
train_b: # Domain 2 dataset
channels: 3 # image channel number
scale: 1.0 # scaling factor for scaling image before processing
crop_image_size: 132 # crop image size
class_name: dataset_celeba # dataset class name
root: ../datasets/celeba/ # dataset folder location
folder: img_align_crop_resize_celeba/
list_name: lists/Blond_Hair_OFF.txt
View
@@ -0,0 +1,54 @@
# Copyright (C) 2017 NVIDIA Corporation. All rights reserved.
# Licensed under the CC BY-NC-ND 4.0 license (https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode).
train:
snapshot_save_iterations: 5000 # How often do you want to save trained models
image_save_iterations: 2500 # How often do you want to save output images during training
image_display_iterations: 100
display: 1 # How often do you want to log the training stats
snapshot_prefix: ../outputs/unit/cat2tiger/cat2tiger # Where do you want to save the outputs
hyperparameters:
trainer: COCOGANTrainer
lr: 0.0001 # learning rate
ll_direct_link_w: 100 # weight on the self L1 reconstruction loss
kl_direct_link_w: 0.1 # weight on VAE encoding loss
ll_cycle_link_w: 100 # weight on the cycle L1 reconstruction loss
kl_cycle_link_w: 0.1 # weight on the cycle L1 reconstruction loss
gan_w: 10 # weight on the adversarial loss
batch_size: 1 # image batch size per domain
max_iterations: 500000 # maximum number of training epochs
gen:
name: COCOResGen
ch: 64 # base channel number per layer
input_dim_a: 3
input_dim_b: 3
n_enc_front_blk: 3
n_enc_res_blk: 3
n_enc_shared_blk: 1
n_gen_shared_blk: 1
n_gen_res_blk: 3
n_gen_front_blk: 3
dis:
name: COCODis
ch: 64
input_dim_a: 3
input_dim_b: 3
n_layer: 6
datasets:
train_a: # Domain 1 dataset
channels: 3 # image channel number
scale: 1.2
crop_image_height: 216 # crop image size
crop_image_width: 216 # crop image size
class_name: dataset_imagenet_image # dataset class name
root: ../images
folder: ./
list_name: image_list.txt # image list
train_b: # Domain 2 dataset
channels: 3 # image channel number
scale: 1.2
crop_image_height: 216 # crop image size
crop_image_width: 216 # crop image size
class_name: dataset_imagenet_image # dataset class name
root: ../images
folder: ./
list_name: image_list.txt # image list
View
@@ -0,0 +1,54 @@
# Copyright (C) 2017 NVIDIA Corporation. All rights reserved.
# Licensed under the CC BY-NC-ND 4.0 license (https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode).
train:
snapshot_save_iterations: 5000 # How often do you want to save trained models
image_save_iterations: 2500 # How often do you want to save output images during training
image_display_iterations: 100
display: 1 # How often do you want to log the training stats
snapshot_prefix: ../outputs/unit/corgi2husky/corgi2husky # Where do you want to save the outputs
hyperparameters:
trainer: COCOGANTrainer
lr: 0.0001 # learning rate
ll_direct_link_w: 100 # weight on the self L1 reconstruction loss
kl_direct_link_w: 0.1 # weight on VAE encoding loss
ll_cycle_link_w: 100 # weight on the cycle L1 reconstruction loss
kl_cycle_link_w: 0.1 # weight on the cycle L1 reconstruction loss
gan_w: 10 # weight on the adversarial loss
batch_size: 1 # image batch size per domain
max_iterations: 500000 # maximum number of training epochs
gen:
name: COCOResGen
ch: 64 # base channel number per layer
input_dim_a: 3
input_dim_b: 3
n_enc_front_blk: 3
n_enc_res_blk: 3
n_enc_shared_blk: 1
n_gen_shared_blk: 1
n_gen_res_blk: 3
n_gen_front_blk: 3
dis:
name: COCODis
ch: 64
input_dim_a: 3
input_dim_b: 3
n_layer: 6
datasets:
train_a: # Domain 1 dataset
channels: 3 # image channel number
scale: 1.2
crop_image_height: 216 # crop image size
crop_image_width: 216 # crop image size
class_name: dataset_imagenet_image # dataset class name
root: ../images
folder: ./
list_name: image_list.txt # image list
train_b: # Domain 2 dataset
channels: 3 # image channel number
scale: 1.2
crop_image_height: 216 # crop image size
crop_image_width: 216 # crop image size
class_name: dataset_imagenet_image # dataset class name
root: ../images
folder: ./
list_name: image_list.txt # image list
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
@@ -0,0 +1,3 @@
cat001.jpg
cat002.jpg
View
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.

0 comments on commit ffac9d9

Please sign in to comment.