arXiv(opens in a new tab)cs.CVNov 2016Cited by 12 papers on PaperVantage

Manuscript Offprint

arXiv:1611.07004

Image-to-Image Translation with Conditional Adversarial Networks

Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, Alexei A. Efros

Phillip Isola

Jun-Yan Zhu

Tinghui Zhou

Alexei A. Efros

Berkeley AI Research (BAIR) Laboratory, UC Berkeley

{isola, junyanz, tinghuiz, efros}@eecs.berkeley.edu

Labels to Street Scene

Figure

input

Aerial to Map

output

Labels to Facade

input

output

Day to Night

BW to Color

input

output

input

output

Edges to Photo

input

output

input

output

Figure 1: Many problems in image processing, graphics, and vision involve translating an input image into a corresponding output image. These problems are often treated with application-specific algorithms, even though the setting is always the same: map pixels to pixels. Conditional adversarial nets are a general-purpose solution that appears to work well on a wide variety of these problems. Here we show results of the method on several. In each case we use the same architecture and objective, and simply train on different data.

Abstract

We investigate conditional adversarial networks as a general-purpose solution to image-to-image translation problems. These networks not only learn the mapping from input image to output image, but also learn a loss function to train this mapping. This makes it possible to apply the same generic approach to problems that traditionally would require very different loss formulations. We demonstrate that this approach is effective at synthesizing photos from label maps, reconstructing objects from edge maps, and colorizing images, among other tasks. Indeed, since the release of the pix2pix software associated with this paper, a large number of internet users (many of them artists) have posted their own experiments with our system, further demonstrating its wide applicability and ease of adoption without the need for parameter tweaking. As a community, we no longer hand-engineer our mapping functions, and this work suggests we can achieve reasonable results without hand-engineering our loss functions either.

1. Introduction

Many problems in image processing, computer graphics, and computer vision can be posed as “translating” an input image into a corresponding output image. Just as a concept may be expressed in either English or French, a scene may be rendered as an RGB image, a gradient field, an edge map, a semantic label map, etc. In analogy to automatic language translation, we define automatic image-to-image translation as the task of translating one possible representation of a scene into another, given sufficient training data (see Figure 1). Traditionally, each of these tasks has been tackled with separate, special-purpose machinery (e.g., [16, 25, 20, 9, 11, 53, 33, 39, 18, 58, 62]), despite the fact that the setting is always the same: predict pixels from pixels. Our goal in this paper is to develop a common framework for all these problems.

The community has already taken significant steps in this direction, with convolutional neural nets (CNNs) becoming the common workhorse behind a wide variety of image prediction problems. CNNs learn to minimize a loss function – an objective that scores the quality of results – and although the learning process is automatic, a lot of manual effort still goes into designing effective losses. In other words, we still have to tell the CNN what we wish it to minimize. But, just like King Midas, we must be careful what we wish for! If we take a naive approach and ask the CNN to minimize the Euclidean distance between predicted and ground truth pixels, it will tend to produce blurry results [43, 62]. This is because Euclidean distance is minimized by averaging all plausible outputs, which causes blurring. Coming up with loss functions that force the CNN to do what we really want – e.g., output sharp, realistic images – is an open problem and generally requires expert knowledge.

It would be highly desirable if we could instead specify only a high-level goal, like “make the output indistinguishable from reality”, and then automatically learn a loss function appropriate for satisfying this goal. Fortunately, this is exactly what is done by the recently proposed Generative Adversarial Networks (GANs) [24, 13, 44, 52, 63]. GANs learn a loss that tries to classify if the output image is real or fake, while simultaneously training a generative model to minimize this loss. Blurry images will not be tolerated since they look obviously fake. Because GANs learn a loss that adapts to the data, they can be applied to a multitude of tasks that traditionally would require very different kinds of loss functions.

In this paper, we explore GANs in the conditional setting. Just as GANs learn a generative model of data, conditional GANs (cGANs) learn a conditional generative model [24]. This makes cGANs suitable for image-to-image translation tasks, where we condition on an input image and generate a corresponding output image.

GANs have been vigorously studied in the last two years and many of the techniques we explore in this paper have been previously proposed. Nonetheless, earlier papers have focused on specific applications, and it has remained unclear how effective image-conditional GANs can be as a general-purpose solution for image-to-image translation. Our primary contribution is to demonstrate that on a wide variety of problems, conditional GANs produce reasonable results. Our second contribution is to present a simple framework sufficient to achieve good results, and to analyze the effects of several important architectural choices. Code is available at https://github.com/phillipi/pix2pix.

References (50)

  • Cheng, P. Tan, A. Shamir, and S.-M
  • The cityscapes dataset for semantic urban scene understanding
  • Deep generative image models using a laplacian pyramid of adversarial networks
  • What makes paris look like paris? ACM Transactions on Graphics, 31(4), 2012
  • Generating images with perceptual similarity metrics based on deep networks
  • Image quilting for texture synthesis and transfer
  • Texture synthesis by non-parametric sampling
  • Predicting depth, surface normals and semantic labels with a common multi-scale convolutional architecture
  • How do humans sketch objects? In SIGGRAPH, 2012
  • Removing camera shake from a single photograph
  • Texture synthesis using convolutional neural networks
  • Image style transfer using convolutional neural networks
  • Generative adversarial nets
  • Image analogies
  • Reducing the dimensionality of data with neural networks
  • Multispectral pedestrian detection: Benchmark dataset and baseline
  • Let there be Color!: Joint End-to-end Learning of Global and Local Image Priors for Automatic Image Colorization with Simultaneous Classification
  • Batch normalization: Accelerating deep network training by reducing internal covariate shift
  • Perceptual losses for real-time style transfer and super-resolution
  • Learning to generate images of outdoor scenes from attributes and semantic layouts (opens arXiv in a new tab)
  • Adam: A method for stochastic optimization
  • Autoencoding beyond pixels using a learned similarity metric
  • Learning representations for automatic colorization
  • Photo-realistic single image super-resolution using a generative adversarial network
  • Combining markov random fields and convolutional neural networks for image synthesis
  • Precomputed real-time texture synthesis with markovian generative adversarial networks
  • Fully convolutional networks for semantic segmentation
  • Deep multi-scale video prediction beyond mean square error
  • Conditional generative adversarial nets (opens arXiv in a new tab)
  • Visually indicated sounds
  • Context encoders: Feature learning by inpainting
  • Unsupervised representation learning with deep convolutional generative adversarial networks
  • Generative adversarial text to image synthesis
  • Generating interpretable images with controllable structure
  • Learning what and where to draw
  • Color transfer between images
  • U-net: Convolutional networks for biomedical image segmentation
  • International Journal of Computer Vision, 115(3):211–252, 2015
  • Improved techniques for training gans
  • Data-driven hallucination of different times of day from a single outdoor photo
  • Instance normalization: The missing ingredient for fast stylization (opens arXiv in a new tab)
  • Generative image modeling using style and structure adversarial networks
  • Image quality assessment: from error visibility to structural similarity
  • Top-down learning for structured labeling with convolutional pseudoprior
  • Holistically-nested edge detection
  • Pixel-level domain transfer
  • Fine-Grained Visual Comparisons with Local Learning
  • Colorful image colorization
  • Energy-based generative adversarial network
  • Learning temporal transformations from time-lapse videos