Merge branch 'master' of https://github.com/yunjey/dtn-tensorflow
Showing
10 changed files
with
65 additions
and
2 deletions
1 | # Domain Transfer Network (DTN) | 1 | # Domain Transfer Network (DTN) |
2 | -<b>(Work in progress)</b>Domain Transfer Network. TensorFlow implementation of [Unsupervised Cross-Domain Image Generation](https://arxiv.org/pdf/1611.02200v1.pdf). You can download pdf file [here](https://github.com/yunjey/domain-transfer-network-tensorflow/raw/master/DTN.pdf). | 2 | +TensorFlow implementation of [Unsupervised Cross-Domain Image Generation.](https://arxiv.org/abs/1611.02200) |
3 | +![alt text](jpg/dtn.jpg) | ||
4 | + | ||
5 | +## Requirements | ||
6 | +* [Python 2.7](https://www.continuum.io/downloads) | ||
7 | +* [TensorFlow 0.12](https://github.com/tensorflow/tensorflow/tree/r0.12) | ||
8 | +* [Pickle](https://docs.python.org/2/library/pickle.html) | ||
9 | +* [SciPy](http://www.scipy.org/install.html) | ||
10 | + | ||
11 | +<br> | ||
12 | + | ||
13 | +## Usage | ||
14 | + | ||
15 | +#### Clone the repository | ||
16 | +```bash | ||
17 | +$ git clone https://github.com/yunjey/dtn-tensorflow.git | ||
18 | +$ cd dtn-tensorflow | ||
19 | +``` | ||
20 | + | ||
21 | +#### Download the dataset | ||
22 | +```bash | ||
23 | +$ chmod +x download.sh | ||
24 | +$ ./download.sh | ||
25 | +``` | ||
26 | + | ||
27 | +#### Resize MNIST dataset to 32x32 | ||
28 | +```bash | ||
29 | +$ python prepro.py | ||
30 | +``` | ||
31 | + | ||
32 | +#### Pretrain the model f | ||
33 | +```bash | ||
34 | +$ python main.py --mode='pretrain' | ||
35 | +``` | ||
36 | + | ||
37 | +#### Train the model G and D | ||
38 | +```bash | ||
39 | +$ python main.py --mode='train' | ||
40 | +``` | ||
41 | + | ||
42 | +#### Transfer SVHN to MNIST | ||
43 | +```bash | ||
44 | +$ python main.py --mode='eval' | ||
45 | +``` | ||
46 | +<br> | ||
47 | + | ||
48 | +## Results | ||
49 | + | ||
50 | +#### From SVHN to MNIST | ||
51 | + | ||
52 | +![alt text](jpg/svhn_mnist_2900.gif) | ||
53 | + | ||
54 | +![alt text](jpg/svhn_mnist_2900.png) | ||
55 | + | ||
56 | +![alt text](jpg/svhn_mnist_3700.png) | ||
57 | + | ||
58 | +![alt text](jpg/svhn_mnist_5300.png) | ||
59 | + | ||
60 | + | ||
61 | +#### From Photos to Emoji (in paper) | ||
62 | + | ||
63 | +![alt text](jpg/emoji_1.png) | ||
64 | + | ||
65 | +![alt text](jpg/emoji_2.png) | ||
66 | + | ||
3 | 67 | ||
4 | 68 | ||
5 | -![alt text](jpg/dtn.jpg) | ||
6 | 69 | ||
7 | 70 | ... | ... |
jpg/emoji_1.png
0 → 100644
556 KB
jpg/emoji_2.png
0 → 100644
788 KB
jpg/svhn_mnist_2300.png
0 → 100644
282 KB
jpg/svhn_mnist_2900.gif
0 → 100644
956 KB
jpg/svhn_mnist_2900.png
0 → 100644
281 KB
jpg/svhn_mnist_3700.gif
0 → 100644
972 KB
jpg/svhn_mnist_3700.png
0 → 100644
277 KB
jpg/svhn_mnist_5300.png
0 → 100644
281 KB
-
Please register or login to post a comment