1 Introduction
Generative modeling of natural images is a long standing and difficult task. The problem naturally falls into two components: learning the distribution from which the images are to be generated, and learning the generator which produces an image conditioned on a vector from this distribution. In this paper we approach the second subproblem. We suppose we are given highlevel descriptions of a set of images, and only train the generator. We propose to use an ’upconvolutional’ generative network for this task and show that it is capable of generating realistic images.
In recent years, convolutional neural networks (CNNs, ConvNets) have become a method of choice in many areas of computer vision, especially on recognition
[1]. Recognition can be posed as a supervised learning problem and ConvNets are known to perform well given a large enough labeled dataset. In this work, we stick with supervised training, but we turn the standard classification CNN upside down and use it to generate images given highlevel information. This way, instead of learning a mapping from raw sensor inputs to a condensed, abstract representation, such as object identity or position, we generate images from their highlevel descriptions.
Given a set of 3D models (of chairs, tables, or cars), we train a neural network capable of generating 2D projections of the models given the model number (defining the style), viewpoint, and, optionally, additional transformation parameters such as color, brightness, saturation, zoom, etc. Our generative networks accept as input these highlevel values and produce an RGB images. We train them with standard backpropagation to minimize the Euclidean reconstruction error of the generated image.
A large enough neural network can learn to perform perfectly on the training set. That is, a network potentially could just learn by heart all examples and generate these perfectly, but would fail to produce reasonable results when confronted with inputs it has not seen during training. We show that the networks we train do generalize to previously unseen data in various ways. Namely, we show that these networks are capable of: 1) knowledge transfer within an object class: given limited number of views of a chair, the network can use the knowledge learned from other chairs to infer the remaining viewpoints; 2) knowledge transfer between classes (chairs and tables): the network can transfer the knowledge about views from tables to chairs; 3) feature arithmetics: addition and subtraction of feature vectors leads to interpretable results in the image space; 4) interpolation between different objects within a class and between classes; 5) randomly generating new object styles.
After a review of related work in Section 2, we describe the network architecture and training process in Section 3. In Section 4 we compare different network architectures and dataset sizes, then in Section 5 we test the generalization abilities of the networks and apply them to a practical task of finding correspondences between different objects. Finally, in Section 6 we analyze the internal representation of the networks.
2 Related work
Work on generative models of images typically addresses the problem of unsupervised learning of a data model which can generate samples from a latent representation. Prominent examples from this line of work are restricted Boltzmann machines (RBMs)
[2] and Deep Boltzmann Machines (DBMs) [3], as well as the plethora of models derived from them [4, 5, 6, 7, 8]. RBMs and DBMs are undirected graphical models which aim to build a probabilistic model of the data and treat encoding and generation as an (intractable) joint inference problem.A different approach is to train directed graphical models of the data distribution. This includes a wide variety of methods ranging from Gaussian mixture models
[9, 10][11] and stochastic variations of neural networks [12, 13, 14, 15, 16]. Among them Rezende et al. [14] developed an approach for training a generative model with variational inference by performing (stochastic) backpropagation through a latent Gaussian representation. Goodfellow et al. [13] model natural images using a ”deconvolutional” generative network that is similar to our architecture.Most unsupervised generative models can be extended to incorporate label information, forming semisupervised and conditional generative models which lie between fully unsupervised approaches and our work. Examples include: gated conditional RBMs [5] for modeling image transformations, training RBMs to disentangle face identity and pose information using conditional RBMs [17]
, and learning a generative model of digits conditioned on digit class using variational autoencoders
[18]. In contrast to our work, these approaches are typically restricted to small models and images, and they often require an expensive inference procedure – both during training and for generating images.The general difference of our approach to prior work on learning generative models is that we assume a highlevel latent representation of the images is given and use supervised training. This allows us 1) to generate relatively large highquality images of pixels (as compared to maximum of pixels in the aforementioned works) and 2) to completely control which images to generate rather than relying on random sampling. The downside is, of course, the need for a label that fully describes the appearance of each image.
Modeling of viewpoint variation is often considered in the context of poseinvariant face recognition
[19, 20]. In a recent work Zhu et al. [21] approached this task with a neural network: their network takes a face image as input and generates a random view of this face together with the corresponding viewpoint. The network is fully connected and hence restricted to small images and, similarly to generative models, requires random sampling to generate a desired view. This makes it inapplicable to modeling large and diverse images, such as the chair images we model.Our work is also loosely related to applications of CNNs to nondiscriminative tasks, such as superresolution
[22] or inferring depth from a single image [23].3 Model description
Our goal is to train a neural network to generate accurate images of objects from a highlevel description: style, orientation with respect to the camera, and additional parameters such as color, brightness, etc. The task at hand hence is the inverse of a typical recognition task: rather than converting an image to a compressed highlevel representation, we need to generate an image given the highlevel parameters.
Formally, we assume that we are given a dataset of examples with targets . The input tuples consist of three vectors:
is the onehot encoding of the model identity (defining the style),
– azimuth and elevation of the camera position (represented by their sine and cosine ^{1}^{1}1We do this to deal with periodicity of the angle. If we simply used the number of degrees, the network would have no way to understand that 0 and 359 degrees are in fact very close.) and – the parameters of additional artificial transformations applied to the images. The targets are the RGB output image and the segmentation mask .We include artificial transformations described by the randomly generated parameter vector to increase the amount of variation in the training data and reduce overfitting, analogous to data augmentation in discriminative CNN training [1]. Each is a combination of the following transformations: inplane rotation, translation, zoom, stretching horizontally or vertically, changing hue, changing saturation, changing brightness.
3.1 Network architectures
Conceptually the generative network, which we formally refer to as , looks like a usual CNN turned upside down. It can be thought of as the composition of two processing steps . We experimented with several architectures, one of them is shown in Figure 1.
Layers FC1 to FC4 first build a shared, high dimensional hidden representation
from the input parameters. Within these layers the three input vectors are first independently fed through two fully connected layers with neurons each, and then the outputs of these three streams are concatenated. This independent processing is followed by two fully connected layers with neurons each, yielding the response of the fourth fully connected layer (FC4).The layers FC5 and uconv1 to uconv4 then generate an image and object segmentation mask from this shared hidden representation. We denote this expanding part of the network by . We experimented with two architectures for . In one of them, as depicted in Figure 1, the image and the segmentation mask are generated by two separate streams and . Each of these consists of a fully connected layer, the output of which is reshaped to a multichannel image and fed through ’unpooling+convolution’ layers with filters and unpooling. Alternatively, there is just one stream, which is used to predict both the image and the segmentation mask.
In order to map the dense representation to a high dimensional image, we need to unpool the feature maps (i.e. increase their spatial span) as opposed to the pooling (shrinking the feature maps) implemented by usual CNNs. This is similar to the “deconvolutional” layers used in previous work [24, 13, 25]. As illustrated in Figure 2 (left), we perform unpooling by simply replacing each entry of a feature map by an block with the entry value in the top left corner and zeros elsewhere. This increases the width and the height of the feature map times. We used in our networks. When a convolutional layer is preceded by such an unpooling operation we can think of unpooling+convolution (“upconvolution”) as the inverse operation of the convolution+pooling steps performed in a standard CNN, see Figure 2
right. This figure also illustrates how in practice the unpooling and convolution steps do not have to be performed sequentially, but can be combined in a single operation. Implementationwise this operation is equivalent to a backward pass through a usual convolutional layer with stride
.In all networks each layer, except the output, is followed by a leaky rectified linear (LReLU) nonlinearity. In most experiments we generated pixel images, but we also experimented with and pixel images. The only difference in architecture in these cases is one less or one more upconvolution, respectively. We found that adding a convolutional layer after each upconvolution significantly improves the quality of the generated images. We compare different architectures in section 4.2.
3.2 Network training
The network parameters , consisting of all layer weights and biases, are trained by minimizing the error of reconstructing the segmentedout chair image and the segmentation mask (the weights are omitted from the arguments of and for brevity of notation):
(1)  
where and
are loss functions for the RGB image and for the segmentation mask respectively, and
is a weighting term, trading off between these two. In our experiments was always squared Euclidean distance, while forwe tried two choices: squared Euclidean distance and negative loglikelihood loss preceded by a softmax layer. We set
in the first case and in the second case.Note that although the segmentation mask could be inferred indirectly from the RGB image by exploiting monotonous background, we do not rely on this but rather require the network to explicitly output the mask. We never directly show these generated masks in the following, but we use them to add white background to the generated examples in almost all figures.
3.3 Probabilistic generative modeling
As we show below, the problem formulation from Section 3 can be used to learn a generator network which can interpolate between different objects. The learned network, however, implements a deterministic function from a highlevel description (including the object identity as given by the onehot encoding
) to a generated image. The shared structure between multiple objects is only implicitly learned by the network and not explicitly accessible. It can be used to generate new “random” objects by blending between objects from the training set. However, this heuristics comes with no guarantees regarding the quality of the generated images. To get a more principled way of generating new objects we train a probabilistic generative model with an intermediate Gaussian representation. We replace the independent processing stream for the class identity
in layer FC2 (the magenta part in Figure 1) with random samples drawn from an inference network that learns to capture the underlying (latent) structure of different chair images. This inference network can be learned alongside the generator described above by maximizing a variational bound on the sample loglikelihood. A full description on the probabilistic generative model training is given in Appendix A.3.4 Datasets
As training data for the generative networks we used renderings of 3D models of different objects: chairs, made public by Aubry et al. [26], as well as car and table models from the ShapeNet [27] dataset.
Aubry et al. provide renderings of 1393 chair models, each rendered from 62 viewpoints: 31 azimuth angles (with a step of ) and 2 elevation angles ( and ), with a fixed distance to the chair. We found that the dataset includes many nearduplicate models, models differing only by color, or lowquality models. After removing these we ended up with a reduced dataset of 809 models, which we used in our experiments. We cropped the renders to have a small border around the chair and resized to a common size of
pixels, padding with white where necessary to keep the aspect ratio. Example images are shown in Figure
3. For training the network we also used segmentation masks of all training examples, which we produced by subtracting the monotonous white background.We took models of cars and tables from ShapeNet, a dataset containing tens of thousands of consistently aligned 3D models of multiple classes. We rendered a turntable of each model in Blender using 36 azimuth angles (from to with step of ) and 5 elevation angles (from to with step of ), which resulted in 180 images per model. Positions of the camera and the light source were fixed during rendering. For experiments in this paper we used renderings of 7124 car models and 1000 table models. All renderings are pixels, and we additionally directly rendered the corresponding segmentation masks. Example renderings are shown in Figure 3.
4 Training parameters
In this section we describe the details of training, compare different network architectures and analyze the effect of dataset size and data augmentation on training.
4.1 Training details
For training the networks we built on top of the caffe CNN implementation [28]. We used Adam [29] with momentum parameters and , and regularization parameter . Minibatch size was . We started with a learning rate of for minibatch iterations, and then divided the learning rate by after every iterations, stopping after
iterations. We initialized the weights with Gaussian noise with variance computed based on the input dimensionality, as suggested by Susillo
[30] and He et al. [31] .In most experiments we used networks generating pixels images. In the viewpoint interpolation experiments in section 5.2 we generated pixel images to reduce the computation time, since multiple networks had to be trained for those experiments. When working with cars, we generated images to check if deeper networks capable of generating these larger images can be successfully trained. We did not observe any complications during training of these deeper networks.
Net  2sE  2sS  1sS  1stSwide  1stsdeep 

MSE ()  
#param  M  M  M  M  M 
4.2 Comparing network architectures
As mentioned above, we experimented with different network architectures. These include:

– a network shown in Figure 1 with two streams and squared Euclidean loss on the segmentation mask;

– same network with softmax and negative loglikelihood (NLL) loss on the segmentation mask;

– network with only one stream, same architecture as the RGB stream in Figure 1, which in the end predicts both the RGB image and the segmentation mask, with NLL loss on the segmentation mask;

– same as “1sS”, but with roughly times more channels in each upconvolutional layer;

– same as “1sS”, but with an extra convolutional layer after each upconvolutional one. These convolutional layers have kernels and the same number of channels as the preceding upconvolutional layer.
Images generated with these architectures, as well as the ground truth (GT), are shown in Figure 4. Reconstruction errors are shown in Table I. Clearly, the deeper “1sSdeep” network is significantly better than others both qualitatively and quantitatively. For this reason we used this network in most experiments.
4.3 Training set size and data augmentation
We experimented with the training set size and analyzed what is the effect of data augmentation. We used cars for these experiments, since we have most car models available. While keeping the network architecture fixed, we varied the training set size. Example generated images are shown in Figure 5. Each column corresponds to a different number of models in the training set, and all networks except the one in the rightmost column were trained without data augmentation. While for a standard car model (top row) there is not much difference, for difficult models (other rows) smaller training set leads to better reconstruction of fine details. The effect of data augmentation is qualitatively very similar to increasing the training set size. Reconstruction errors shown in Table II support these observations.
Data augmentation leads to worse reconstruction of fine details, but it is expected to lead to better generalization. To check this, we tried to morph one model into another by linearly interpolating between their onehot input style vectors. The result is shown in Figure 6. Note how the network trained without augmentation (top row) better models the images from the training set, but fails to interpolate smoothly.
5 Experiments
We show how the networks successfully model the complex data and demonstrate their generalization abilities by generating images unseen during training: new viewpoints and object styles. We also show an application of generative networks to finding correspondences between objects from the training set.
Num models  500  1000  3000  7124  1000aug 

MSE () 
5.1 Modeling transformations
Figure 7 shows how a network is able to generate chairs that are significantly transformed relative to the original images. Each row shows a different type of transformation. Images in the central column are nontransformed. Even in the presence of large transformations, the quality of the generated images is basically as good as without transformation. The image quality typically degrades a little in case of unusual chair shapes (such as rotating office chairs) and chairs including fine details such as armrests (see e.g. one of the armrests in the second to last row in Figure 7). Interestingly, the network successfully models zoomout (row 3 of Figure 7), even though it has never been presented any zoomedout images during training.
The network easily deals with extreme colorrelated transformations, but has some problems representing large spatial changes, especially translations. The generation quality in such cases could likely be improved with a more complex architecture, which would allow transformation parameters to explicitly affect the feature maps of convolutional layers (by translating, rotating, zooming them), perhaps in the fashion similar to Karol et al. [32] or Jaderberg et al. [33].
5.2 Interpolation between viewpoints
In this section we show that the generative network is able to generate previously unseen views by interpolating between views present in the training data. This demonstrates that the network internally learns a representation of chairs which enables it to judge about chair similarity and use the known examples to generate previously unseen views.
In this experiment we used a network to reduce computational costs. We randomly separated the chair styles into two subsets: the ’source set’ with % styles and the ’target set’ with the remaining % chairs. We then varied the number of viewpoints per style either in both these datasets together (’no transfer’) or just in the target set (’with transfer’) and then trained a generative network as before. In the second setup the idea is that the network may use the knowledge about chairs learned from the source set (which includes all viewpoints) to generate the missing viewpoints of the chairs from the target set.
Figure 8 shows some representative examples of angle interpolation. For 15 views in the target set (first pair of rows) the effect of the knowledge transfer is already visible: interpolation is smoother and fine details are preserved better, for example a leg in the middle column. Starting from 8 views (second pair of rows and below) the network without knowledge transfer fails to produce satisfactory interpolation, while the one with knowledge transfer works reasonably well even with just one view presented during training (bottom pair of rows). However, in this case some fine details, such as the armrest shape, are lost.
In Figure 9 we plot the average Euclidean error of the generated missing viewpoints from the target set, both with and without transfer (blue and green curves). Clearly, presence of all viewpoints in the source dataset dramatically improves the performance on the target set, especially for small numbers of available viewpoints.
One might suppose (for example looking at the bottom pair of rows of Figure 8) that the network simply learns all the views of the chairs from the source set and then, given a limited number of views of a new chair, finds the most similar one, in some sense, among the known models and simply returns the images of that chair. To check if this is the case, we evaluated the performance of such a naive nearest neighbor approach. For each image in the target set we found the closest match in the source set for each of the given views and interpolated the missing views by linear combinations of the corresponding views of the nearest neighbors. For finding nearest neighbors we tried two similarity measures: Euclidean distance between RGB images and between HOG descriptors. The results are shown in Figure 9. Interestingly, although HOG yields semantically much more meaningful nearest neighbors (not shown in figures), RGB similarity performs much better numerically. The performance of this nearest neighbor method is always worse than that of the network, suggesting that the network learns more than just linearly combining the known chairs, especially when many viewpoints are available in the target set.
5.3 Elevation transfer and extrapolation
The chairs dataset only contains renderings with elevation angles and , while for tables elevations between and are available. We show that we can transfer information about elevations from one class to another. To this end we trained a network on both chairs and tables, and then generated images of chairs with elevations not present during training. As a baseline we use a network trained solely on chairs. The results are shown in Figure 10. While the network trained only on chairs does not generalize to unseen elevation angles almost at all, the one trained with tables is able to generate unseen views of chairs very well. The only drawback is that the generated images do not always precisely correspond to the desired elevation, for example and for the second model in Figure 10. Still, this result suggests that the network is able to transfer the understanding of 3D object structure from one object class to another.
The network trained both on chairs and tables can very well predict views of tables from previously unseen elevation angles. Figure 11 shows how the network can generate images with previously unseen elevations from to . Interestingly, the presence of chairs in the training set helps better extrapolate views of tables. Our hypothesis is that the network trained on both object classes is forced to not only model one kind of objects, but also the general 3D geometry. This helps generating reasonable views from new elevation angles. We hypothesize that modeling even more object classes with a single network would allow to learn a universal classindependent representation of 3D shapes.
0° 10° 20° 30° 40° 50° 70° 

0° 10° 20° 30° 40° 50° 70° 90° 

5.4 Interpolation between styles
Remarkably, the generative network can not only imagine previously unseen views of a given object, but also invent new objects by interpolating between given ones. To obtain such interpolations, we simply linearly change the input label vector from one class to another. Some representative examples of such morphings for chairs and cars are shown in Figures 12 and 13 respectively. The morphings of each object class are sorted by subjective morphing quality (decreasing from top to bottom). The networks produce very naturally looking morphings even in challenging cases. Even when the two morphed objects are very dissimilar, for example the last two rows in Figure 12, the intermediate chairs look very realistic.
It is also possible to interpolate between more than two objects. Figure 14 shows morphing between three chairs: one triple in the upper triangle and one in the lower triangle of the table. The network successfully combines the features of three chairs.
The networks can interpolate between objects of the same class, but can they morph objects of different classes into each other? The interclass difference is larger than the intraclass variance, hence to successfully interpolate between classes the network has to close this large gap between different classes. We check if this large gap can be closed by a network trained on chairs and tables. Results are shown in Figure 15. The quality of intermediate images is somewhat worse than for intraclass morphings shown above, but overall very good, especially considering that the network has never seen anything intermediate between a chair and a table.
5.5 Feature space arithmetics
In the previous section we have seen that the feature representation learned by the network allows for smooth transitions between two or even three different objects. Can this property be used to transfer properties of one object onto another by performing simple arithmetics in the feature space? Figure 16 shows that this is indeed possible. By simple subtraction and addition in the feature space (FC2 features in this case) we can change an armchair into a chair with similar style, or a chair with a stick back into an identical chair with a solid back. We found that the exact layer where the arithmetic is performed does not matter: the results are basically identical when we manipulate the input style vectors, or the outputs of layers FC1 or FC2 (not shown).
(a)  
(b)  
(c)  
(d)  
(e)  
(f)  
(g)  
(h) 
5.6 Random chair generation
In this section we show results on generating random chair images using the ideas briefly outlined in Section 3.3. In particular, we use both networks trained in a fully supervised manner using the training objective from 3, as well as networks trained with the variational bound objective described in Appendix A.
As mentioned before there is no principled way to perform sampling for networks trained in a supervised manner. Nonetheless there are some natural heuristics that can be used to obtain “quasi random” generations. We can first observe that the style input of the network is a probability distribution over styles, which at training time is concentrated on a single style (i.e.
is a onehot encoding of the chair style). However, in the interpolation experiments we have seen that the network also generates plausible images given inputs with several nonzero entries. This suggests generating random images by using random distributions as input for the network. We tried two families of distributions: (1) we computed the softmax of a Gaussian noise vector with the same size asand with standard deviation
, and (2) we first randomly selected styles, then sampled coefficient for each of them from , then normalized to unit sum.Exemplary results of these two experiments are shown in Figure 17 (a)(d). For each generated image the closest chair from the dataset, according to Euclidean distance, is shown. (a) and (b) are generated with method (1) with and respectively. The results are not good: when is very low the generated chairs are all similar, while with higher they just copy chairs from the training set. (c) and (d) are produced with method (2) with and respectively. Here the generated chairs are quite diverse and not too similar to the chairs from the training set.
The model which was trained with a variational bound objective (as described in Appendix A) directly allows us to sample from the assumed prior (a multivariate Gaussian distribution with unit covariance) and generate images from these draws. To that end we thus simply input random Gaussian noise into the network instead of using the FC2 activations of the style stream. The results are shown in Figure
17 (e)(f). The difference between (e) and (f) is that in (e) the KLdivergence term in the loss function was weighted times higher than in (f). This leads to much more diverse chairs being generated.As a control in Figure 17 (g)(h) we also show chairs generated in the same way (but with adjusted standard deviations) from a network trained without the variational bound objective. While such a procedure is not guaranteed to result in any visually appealing images, since the hidden layer activations are not restricted to a particular regime during training, we found that it does result in sharp chair images. However, both for low (g) and high (h) standard deviations the generated chairs are not very diverse.
Overall, we see that the the heuristics with combining several chairs and the variationalboundbased training lead to generating images of roughly similar quality and diversity. However, the second approach is advantageous in that it allows generating images simply from a Gaussian distribution and it is more principled, potentially promising further improvement when better optimized or combined with other kinds of stochastic networks.
5.7 Correspondences
The ability of the generative CNN to interpolate between different chairs allows us to find dense correspondences between different object instances, even if their appearance is very dissimilar.
Given two chairs from the training dataset, we used the “1sSdeep” network to generate a morphing consisting of images (with fixed view). We then computed the optical flow in the resulting image sequence using the code of Brox et al. [34]. To compensate for the drift, we refined the computed optical flow by recomputing it with a step of 9 frames, initialized by concatenated perframe flows. Concatenation of these refined optical flows gives the global vector field that connects corresponding points in the two chair images.
In order to numerically evaluate the quality of the correspondences, we created a small test set of image pairs. To analyze the performance in more detail, we separated these into 10 ’simple’ pairs (two chairs are quite similar in appearance) and 20 ’difficult’ pairs (two chairs differ a lot in appearance). Exemplar pairs are shown in Figure 18. We manually annotated several keypoints in the first image of each pair (in total keypoints in all images) and asked people to manually mark corresponding points in the second image of each pair. We then used mean keypoint positions in the second images as ground truth. At test time we measured the performance of different methods by computing average displacement of predicted keypoints in the second images given keypoints in the first images. We also manually annotated an additional validation set of 20 image pairs to tune the parameters of all methods (however, we were not able to search the parameters exhaustively because some methods have many).
In Table III we show the performance of our algorithm compared to human performance and two baselines: SIFT flow [35] and Deformable Spatial Pyramid [36] (DSP). On average the very basic approach we used outperforms both baselines thanks to the intermediate samples produced by the generative neural network. More interestingly, while SIFT flow and DSP have problems with the difficult pairs, our algorithm does not. This suggests that errors of our method are largely due to contrast changes and drift in the optical flow, which does not depend on the difficulty of the image pair. The approaches are hence complementary: while for similar objects direct matching is fairly accurate, for more dissimilar ones intermediate morphings are very helpful.
6 Analysis of the network
We have shown that the networks can model objects extremely well. We now analyze the inner workings of networks, trying to get some insight into the source of their success. The “2sE” network was used in this section.
6.1 Activating single units
One way to analyze a neural network (artificial or real) is to visualize the effect of single neuron activations. Although this method does not allow us to judge about the network’s actual functioning, which involves a clever combination of many neurons, it still gives a rough idea of what kind of representation is created by the different network layers.
Activating single neurons of uconv3 feature maps (last feature maps before the output) is equivalent to simply looking at the filters of these layers which are shown in Figure 19. The final output of the network at each position is a linear combination of these filters. As to be expected, they include edges and blobs.
Our model is tailored to generate images from highlevel neuron activations, which allows us to activate a single neuron in some of the higher layers and forwardpropagate down to the image. The results of this procedure for different layers of the network are shown in Figures 20 and 23. Each row corresponds to a different network layer. The leftmost image in each row is generated by setting all neurons of the layer to zero, and the other images – by activating one randomly selected neuron.
In Figure 20 the first two rows show images produced when activating neurons of FC1 and FC2 feature maps of the class stream while keeping viewpoint and transformation inputs fixed. The results clearly look chairlike but do not show much variation (the most visible difference is chair vs armchair), which suggests that larger variations are achievable by activating multiple neurons. The last two rows show results of activating neurons of FC3 and FC4 feature maps. These feature maps contain joint classviewpointtransformation representations, hence the viewpoint is not fixed anymore. The generated images still resemble chairs but get much less realistic. This is to be expected: the further away from the inputs, the less semantic meaning there is in the activations.
In the middle of the bottom row in Figure 20 one can notice a neuron which seems to generate a zoomed chair. By looking at FC4 neurons more carefully we found that this is indeed a ’zoom neuron’, and, moreover, for each transformation there is a specialized neurons in FC4. The effect of these is shown in Figure 21. Increasing the activation of one of these neurons while keeping all other activations in FC4 fixed results in a transformation of the generated image. It is quite surprising that information about transformations is propagated without change through all fully connected layers. It seems that all potential transformed versions of a chair are already contained in the FC4 features, and the ’transformation neurons’ only modify them to give more relevance to the activations corresponding to the required transformation. The corresponding weights connecting these specialized neurons to the next layer are shown in Figure 22 (one neuron per row). Some output channels are responsible for spatial transformations of the image, while others deal with the color and brightness.
Images generated from single neurons of the convolutional layers are shown in Figure 23. A somewhat disappointing observation is that while single neurons in later layers (uconv2 and uconv3) produce edgelike images, the neurons of higher deconvolutional layers generate only blurry ’clouds’, as opposed to the results of Zeiler and Fergus [24] with a classification network and maxunpooling. Our explanation is that because we use naive regulargrid unpooling, the network cannot slightly shift small parts to precisely arrange them into larger meaningful structures. Hence it must find another way to generate fine details. In the next subsection we show that this is achieved by a combination of spatially neighboring neurons.
6.2 Analysis of the hidden layers
Rather than just activating single neurons while keeping all others fixed to zero, we can use the network to normally generate an image and then analyze the hidden layer activations by either looking at them or modifying them and observing the results. An example of this approach was already used above in Figure 21 to understand the effect of the ’transformation neurons’. We present two more results in this direction here.
In order to find out how the blurry ’clouds’ generated by single highlevel deconvolutional neurons (Figure 23) form perfectly sharp chair images, we smoothly interpolate between a single activation and the whole chair. Namely, we start with the FC5 feature maps of a chair, which have a spatial extent of . Next we only keep active neurons in a region around the center of the feature map (setting all other activations to zero), gradually increasing the size of this region from to
. Hence, we can see the effect of going from almost singleneuron activation level to the whole image level. The outcome is shown in Figure
24. Clearly, the interaction of neighboring neurons is very important: in the central region, where many neurons are active, the image is sharp, while in the periphery it is blurry. One interesting effect that is visible in the images is how sharply the legs of the chair end in the second to last image but appear in the larger image. This suggests highly nonlinear suppression effects between activations of neighboring neurons.Lastly some interesting observations can be made by taking a closer look at the feature maps of the uconv3 layer (the last preoutput layer). Some of them exhibit regular patterns shown in Figure 25. These feature maps correspond to filters which look nearempty in Figure 19 (such as the 3rd and 10th filters in the first row). Our explanation of these patterns is that they compensate highfrequency artifacts originating from fixed filter sizes and regulargrid unpooling. This is supported by the last row of Figure 25 which shows what happens to the generated image when these feature maps are set to zero.
7 Conclusions
We have shown that supervised training of convolutional neural networks can be used not only for discriminative tasks, but also for generating images given highlevel style, viewpoint, and lighting information. A network trained for such a generative task does not merely learn to generate the training samples, but learns a generic implicit representation, which allows it to smoothly morph between different object views or object instances with all intermediate images being meaningful. Moreover, when trained in a stochastic regime, can be creative and invent new chair styles based on random noise. Our experiments suggest that networks trained to reconstruct objects of multiple classes develop some understanding of 3D shape and geometry. It is fascinating that the relatively simple architecture we proposed is already able to learn all these complex behaviors.
Acknowledgments
AD, MT and TB acknowledge funding by the ERC Starting Grant VideoLearn (279401). JTS is supported by the BrainLinksBrainTools Cluster of Excellence funded by the German Research Foundation (EXC 1086).
Appendix A: Training using a variational bound
Here we give additional details on the training objective used the experiment on random chair generation in section 5.6. We phrase the problem of generating chairs as that of learning a (conditional) probabilistic generative model. Formally, we can derive such a generative model from the definitions in Section 3 as follows. As before, let and denote the “expanding” part of the generator and let us assume full knowledge about the view , transformation parameters and chair identity . We further assume there exists a distribution over latent states – which capture the underlying manifold of chair images – such that the generators and can generate the corresponding image using as input. We define as the mapping obtained by replacing the independent processing stream for the class identity with the 512 dimensional random vector in layer FC2 (c.f. Figure 1). We can then define the likelihood of a segmentation mask under transformation as
(2) 
where outputs perpixel probabilities (i.e. it has a sigmoid output nonlinearity). Assuming the pixels in an image are distributed according to a multivariate Gaussian distribution the likelihood of can be defined as
(3) 
where denotes a Gaussian distribution with mean and covariance . We simplify this formulation by assuming a diagonal covariance structure . Since all distributions appearing in our derivation are always conditioned on the augmentation parameters and view parameters we will omit them in the following to simplify notation, i.e. we define and . With these definitions in place we can express the marginal log likelihood of an image and its segmentation mask as
(4)  
Since we, a priori, have no knowledge regarding the structure of – i.e. we do not know which shared underlying structure different chairs posses – we have to replace it with an approximate inference distribution . In our case we parameterize as a two layer fully connected neural network (with 512 units each) predicting mean and variance of the distribution. We refer to the parameters of this network with . Following recent examples from the neural networks literature [15, 14] we can then jointly train this approximate inference network and the generator networks by maximizing a variational lower bound on the loglikelihood from (4) as
(5)  
and where is a prior on the latent distribution, which we always set as . The optimization problem we seek to solve can then be expressed through the sum of these losses over all data points (and independent samples from ) and is given as
(6)  
where, for our experiments, we simply take only one sample per data point. Equation (6
) can then be optimized using standard stochastic gradient descent since the derivative with respect to all parameters can be computed in closed form. For a detailed explanation on how one can backpropagate through the sampling procedure we refer to Kingma et al.
[15].References

[1]
A. Krizhevsky, I. Sutskever, and G. E. Hinton, “ImageNet classification with deep convolutional neural networks,” in
NIPS, 2012, pp. 1106–1114.  [2] G. E. Hinton and R. R. Salakhutdinov, “Reducing the dimensionality of data with neural networks,” Science, pp. 504–507, 2006.
 [3] R. Salakhutdinov and G. E. Hinton, “Deep boltzmann machines,” in AISTATS, 2009.
 [4] G. E. Hinton, S. Osindero, and Y.W. Teh, “A fast learning algorithm for deep belief nets,” Neural Comput., vol. 18, no. 7, pp. 1527–1554, Jul. 2006.
 [5] R. Memisevic and G. Hinton, “Unsupervised learning of image transformations,” in CVPR, 2007.

[6]
H. Lee, R. Grosse, R. Ranganath, and A. Y. Ng, “Convolutional deep belief networks for scalable unsupervised learning of hierarchical representations,” in
ICML, 2009, pp. 609–616. 
[7]
Y. Tang and A.R. Mohamed, “Multiresolution deep belief networks,” in
International Conference on Artificial Intelligence and Statistics (AISTATS), 2012
, 2012.  [8] M. Ranzato, J. Susskind, V. Mnih, and G. E. Hinton, “On deep generative models with applications to recognition.” in CVPR. IEEE, 2011, pp. 2857–2864.
 [9] R. P. Francos, H. Permuter, and J. Francos, “Gaussian mixture models of texture and colour for image database,” in ICASSP, 2003.
 [10] L. Theis, R. Hosseini, and M. Bethge, “Mixtures of conditional gaussian scale mixtures applied to multiscale image representations,” PLoS ONE, 2012.

[11]
H. Larochelle and I. Murray, “The neural autoregressive distribution estimator,”
JMLR: W&CP, vol. 15, pp. 29–37, 2011.  [12] Y. Bengio, E. Laufer, G. Alain, and J. Yosinski, “Deep generative stochastic networks trainable by backprop,” in ICML, 2014.
 [13] I. Goodfellow, J. PougetAbadie, M. Mirza, B. Xu, D. WardeFarley, S. Ozair, A. Courville, and Y. Bengio, “Generative adversarial nets,” in NIPS, 2014.
 [14] D. J. Rezende, S. Mohamed, and D. Wierstra, “Stochastic backpropagation and approximate inference in deep generative models,” in ICML, 2014.
 [15] D. P. Kingma and M. Welling, “Autoencoding variational bayes.” in ICLR, 2014.
 [16] Y. Tang and R. Salakhutdinov, “Learning stochastic feedforward neural networks,” in Advances in Neural Information Processing Systems 26. Curran Associates, Inc., 2013, pp. 530–538. [Online]. Available: http://papers.nips.cc/paper/5026learningstochasticfeedforwardneuralnetworks.pdf
 [17] S. Reed, K. Sohn, Y. Zhang, and H. Lee, “Learning to disentangle factors of variation with manifold interaction,” in ICML, 2014.

[18]
D. Kingma, D. Rezende, S. Mohamed, and M. Welling, “Semisupervised learning with deep generative models,” in
NIPS, 2014.  [19] V. Blanz and T. Vetter, “Face recognition based on fitting a 3D morphable model,” TPAMI, vol. 25, no. 9, Sep. 2003.
 [20] X. Zhang, Y. Gao, and M. K. H. Leung, “Recognizing rotated faces from frontal and side views: An approach toward effective use of mugshot databases.” 2008, pp. 684–697.

[21]
Z. Zhu, P. Luo, X. Wang, and X. Tang, “Multiview perceptron: a deep model for learning face identity and view representations,” in
NIPS, 2014.  [22] C. Dong, C. C. Loy, K. He, and X. Tang, “Learning a deep convolutional network for image superresolution,” in 13th European Conference on Computer Vision (ECCV), 2014, pp. 184–199.
 [23] D. Eigen, C. Puhrsch, and R. Fergus, “Depth map prediction from a single image using a multiscale deep network,” in NIPS, 2014.
 [24] M. D. Zeiler and R. Fergus, “Visualizing and understanding convolutional networks,” in ECCV, 2014.
 [25] M. D. Zeiler, G. W. Taylor, and R. Fergus, “Adaptive deconvolutional networks for mid and high level feature learning,” in IEEE International Conference on Computer Vision, ICCV, 2011, pp. 2018–2025.
 [26] M. Aubry, D. Maturana, A. Efros, B. Russell, and J. Sivic, “Seeing 3D chairs: exemplar partbased 2D3D alignment using a large dataset of CAD models,” in CVPR, 2014.
 [27] M. Savva, A. X. Chang, and P. Hanrahan, “SemanticallyEnriched 3D Models for Commonsense Knowledge,” CVPR 2015 Workshop on Functionality, Physics, Intentionality and Causality, 2015.
 [28] Y. Jia, E. Shelhamer, J. Donahue, S. Karayev, J. Long, R. Girshick, S. Guadarrama, and T. Darrell, “Caffe: Convolutional architecture for fast feature embedding,” arXiv preprint arXiv:1408.5093, 2014.
 [29] D. P. Kingma and J. Ba, “Adam: A method for stochastic optimization,” CoRR, vol. abs/1412.6980, 2014. [Online]. Available: http://arxiv.org/abs/1412.6980
 [30] D. Sussillo, “Random walks: Training very deep nonlinear feedforward networks with smart initialization,” CoRR, vol. abs/1412.6558, 2014. [Online]. Available: http://arxiv.org/abs/1412.6558
 [31] K. He, X. Zhang, S. Ren, and J. Sun, “Delving deep into rectifiers: Surpassing humanlevel performance on imagenet classification,” CoRR, vol. abs/1502.01852, 2015. [Online]. Available: http://arxiv.org/abs/1502.01852

[32]
K. Gregor, I. Danihelka, A. Graves, D. J. Rezende, and D. Wierstra, “DRAW: A recurrent neural network for image generation,” in
Proceedings of the 32nd International Conference on Machine Learning, ICML 2015, Lille, France, 611 July 2015
, 2015, pp. 1462–1471. [Online]. Available: http://jmlr.org/proceedings/papers/v37/gregor15.html 
[33]
M. Jaderberg, K. Simonyan, A. Zisserman, and K. Kavukcuoglu, “Spatial transformer networks,” in
NIPS, 2015.  [34] T. Brox, A. Bruhn, N. Papenberg, and J. Weickert, “High accuracy optical flow estimation based on a theory for warping,” in ECCV, 2004.
 [35] C. Liu, J. Yuen, A. Torralba, J. Sivic, and W. T. Freeman, “Sift flow: Dense correspondence across different scenes,” in ECCV, 2008.
 [36] J. Kim, C. Liu, F. Sha, and K. Grauman, “Deformable spatial pyramid matching for fast dense correspondences.” in CVPR, 2013.
Comments
There are no comments yet.