Paper commentary
DualGAN: Unsupervised Dual Learning for Image-to-Image Translation
DualGAN trains image translators from two unlabeled image sets
- Problem Conditional GANs need large sets of labeled, matched image pairs, which are slow to produce and sometimes unavailable. Unpaired data gives no example of a correct translation to learn from.
- Method DualGAN trains a primal GAN and a dual GAN together. Each image is translated to the other domain and back, and the reconstruction error supplies the training signal.
- Results On day to night, DualGAN reached a realness score of 2.42, against 1.89 for cGAN and 0.13 for GAN.
Why paired training data limits translation
Conditional GANs for image-to-image translation are trained on large numbers of labeled, matching image pairs. Producing such pairs can take a long time, for example when every pixel or patch must be labeled, and in some settings it is not realistic at all.
Photos and sketches are plentiful, but photo-sketch pairs that show the same people in the same pose are scarce. Even for day and night scenes, which a stationary camera can record as matched pairs, moving objects cause content differences between the two images.
The study therefore uses only unlabeled image sets from each domain, such as a set of photos and a set of sketches. The central difficulty is that no example of a correct translation is available to supervise training.
The labeled benchmark pairs used for comparison do not guarantee accurate alignment at the pixel level, so they are imperfect references even when they are used for supervised training.
A closed loop of two translators
Dual learning in natural language processing trains two opposite translators together, minimizing the reconstruction loss of applying one after the other. DualGAN carries this closed loop over to images: a primal generator maps U to V, a dual generator maps V back to U, and each image is translated out and back.
The NLP version judged output fluency with pre-trained language models, which are hard to obtain for many image tasks. DualGAN replaces that role with GAN discriminators that are trained adversarially with the translators to capture the distribution of each domain. Its generators are fully convolutional networks, which fit the two-dimensional structure of images better than the sequence models used in text translation.
The reconstruction error is the mean absolute difference between each image and its round-trip reconstruction, measured within its own domain. An image u from U goes through GA and then GB, and the result is compared with u; the same loop runs in the other direction starting from v in V.
Two generators and two discriminators
The primal GAN consists of the generator GA and the discriminator DA, and the dual GAN consists of GB and DB. DA is trained with real v as positive samples and GA(u,z) as negatives, while DB takes real u as positive and GB(v,z') as negative.
The generators are updated to fool the corresponding discriminators and to reduce the two reconstruction losses, one per direction. The noise vectors z and z' are not passed in explicitly. They enter only as dropout applied to several generator layers during both training and testing.
GA and GB share the same architecture: equal numbers of downsampling and upsampling layers, with skip connections between mirrored layers, which makes the generator U-shaped. Skip connections let low-level information pass directly from input to output, which matters when input and output structures are assumed to be aligned.
The discriminators follow the Markovian PatchGAN design, which models images only at the patch level and so emphasizes local high-frequency detail. The patch size is fixed at 70×70, and the discriminator is run convolutionally across the image, with all responses averaged into the final output.
Loss functions and the reconstruction term
The discriminator losses use the Wasserstein GAN loss format rather than the sigmoid cross-entropy loss of the original GAN. The two discriminator losses are written as follows.
\[ l_{dA}(u,v)=D_A(G_A(u,z))-D_A(v) \] \[ l_{dB}(u,v)=D_B(G_B(v,z'))-D_B(u) \] Each discriminator loss is minimized, so each discriminator scores the real sample above the generated one.
Both generators share one objective, which combines two L1 reconstruction terms with the adversarial terms. \[ l_g(u,v)=\lambda_U\lVert u-G_B(G_A(u,z),z')\rVert+\lambda_V\lVert v-G_A(G_B(v,z'),z)\rVert-D_B(G_B(v,z'))-D_A(G_A(u,z)) \] The L1 distance is chosen over L2 because L2 has been found to produce blurry outputs in conditional synthesis.
The weights λU and λV are constants, typically set between 100.0 and 1,000.0. When U holds natural images and V does not, such as aerial photo-maps, a smaller λU than λV was found more effective.
Training loop and hyperparameters
Each outer iteration runs ncritic discriminator steps on sampled minibatches, clipping the discriminator weights after every step. After those steps, the generators GA and GB are updated once on the generator objective, using a fresh minibatch.
Training uses mini-batch stochastic gradient descent with the RMSProp solver, because momentum-based methods such as Adam were reported to cause instability. The clipping parameter c is typically set between 0.01 and 0.1, depending on the application.
Generator updates wait until the discriminators have completed their steps, which gives the discriminators time to supply more reliable gradients. The sigmoid cross-entropy loss of traditional GANs saturates as the discriminator improves, whereas the Wasserstein loss is differentiable almost everywhere.
Datasets and comparison setup
Four labeled datasets are used: PHOTO-SKETCH, DAY-NIGHT, LABEL-FACADES and AERIAL-MAPS. Each contains corresponding image pairs that serve as ground truth, and they can also be used to train supervised models.
Two unlabeled datasets are used for material transfer and painting style translation: MATERIAL and OIL-CHINESE. In both, no correspondence exists between images of different domains.
DualGAN and GAN are trained without pairs by decoupling the image pairs and reshuffling the data, while cGAN is trained on paired data with the code and models provided in [4]. The GAN baseline is obtained from the same implementation by setting λU and λV to zero, so it has an image-conditional generator and no reconstruction term.
Visual comparison with GAN and cGAN
Compared with GAN, DualGAN outputs are less blurry, contain fewer artifacts and keep more of the input structure in almost all cases. The authors attribute this to the reconstruction loss, which requires inputs to be recoverable from outputs through the dual generator.
Against the supervised cGAN, DualGAN is often sharper and more faithful to the input in the day to night, label to facade, photo to sketch and map to aerial comparisons. This is notable because cGAN uses additional image and pixel correspondences during training.
For photo and semantic label pairs, unpaired training cannot infer which pixel colors correspond to which labels from the target distribution alone. As a result DualGAN may assign wrong labels to pixels, or give labels the wrong colors or textures, in those tasks.
On the unlabeled material and oil and Chinese painting tasks, the outputs look convincing where no matching target images exist, and they contain fewer artifacts than GAN outputs.
Realness and material transfer scores
For the realness study, outputs from all three approaches were shuffled together with real photos, and each image was rated by 20 Turkers on a scale from 0 (totally missing) to 4 (compelling). Averages are reported per task.
On sketch to photo, DualGAN averaged 1.87, against 1.69 for cGAN and 1.04 for GAN, with real photos at 3.56. On day to night, DualGAN averaged 2.42, against 1.89 for cGAN and 0.13 for GAN, with real images at 3.05.
On label to facades, DualGAN averaged 1.89, below cGAN at 2.59 and above GAN at 1.43. On map to aerial, DualGAN averaged 2.52, below cGAN at 2.92 and above GAN at 1.88. DualGAN beat GAN on every task, and beat cGAN on two of the four tasks.
The material perceptual study mixed 176 outputs from all material transfer tasks, and each was rated by ten Turkers. An output counted as a success when at least three Turkers chose the target material. On plastic to metal, DualGAN succeeded on 7 of 11 images, against 3 of 11 for GAN. Across the eight transfer rows, DualGAN's success counts were equal to or higher than GAN's, and each set contained 11 images.
Segmentation accuracy on labeled pairs
On facade to label, DualGAN reached a per-pixel accuracy of 0.27, a per-class accuracy of 0.13 and a class IOU of 0.06. cGAN reached 0.54, 0.33 and 0.19 on the same measures, and GAN reached 0.22, 0.10 and 0.05.
On aerial to map, DualGAN reached a per-pixel accuracy of 0.42, a per-class accuracy of 0.22 and a class IOU of 0.09. cGAN reached 0.70, 0.46 and 0.26 on the same measures, and GAN reached 0.41, 0.23 and 0.09.
DualGAN is above GAN on facade to label but below cGAN on both tasks. The authors attribute the gap to the lack of image correspondence for training: a region can be segmented correctly and still receive the wrong label.
Limitations
On the two semantic-label tasks, label to facades and map to aerial, cGAN scored higher in realness, and it scored higher than DualGAN on both segmentation tables.
The authors suggest a possible remedy of using a small amount of labeled data as a warm start, and this was not tested in the paper.
Evaluation rests on Turker judgments and segmentation accuracy on four labeled datasets, and the two unlabeled datasets are shown only through qualitative figures and the material perceptual test. The Turker studies use fixed numbers of raters per image, with 20 for realness and ten for material transfer.
The labeled benchmark pairs are not pixel-aligned, so the supervised baselines are themselves imperfect references.
Paper info
- Authors
- Zili Yi, Hao Zhang, Ping Tan, Minglun Gong
- Venue
- arXiv · Preprint
- First published
- 2017-4-8
- Added
- 2026-11-12
- Updated
- 2018-10-9
- Version
- v4
- arXiv
- 1704.02510
- Category
- cs.CV
- Original paper terms
- arXiv non-exclusive 1.0
- What we show
- Paper info and commentary
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Quote from the paper
Zili Yi, Hao Zhang, Ping Tan, Minglun Gong (2017). DualGAN: Unsupervised Dual Learning for Image-to-Image Translation. arXiv:1704.02510v4. https://arxiv.org/abs/1704.02510v4
BibTeX
@misc{yi2017dualgan,
title = {{DualGAN: Unsupervised Dual Learning for Image-to-Image Translation}},
author = {Zili Yi and Hao Zhang and Ping Tan and Minglun Gong},
year = {2017},
eprint = {1704.02510},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/1704.02510v4}
}