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 sub-problem. We suppose we are given high-level descriptions of a set of images, and only train the generator. We propose to use an ’up-convolutional’ 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
. 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 high-level 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 high-level 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 high-level 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) and Deep Boltzmann Machines (DBMs) , 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.  developed an approach for training a generative model with variational inference by performing (stochastic) backpropagation through a latent Gaussian representation. Goodfellow et al.  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 semi-supervised and conditional generative models which lie between fully unsupervised approaches and our work. Examples include: gated conditional RBMs  for modeling image transformations, training RBMs to disentangle face identity and pose information using conditional RBMs 
, and learning a generative model of digits conditioned on digit class using variational autoencoders. 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 high-level latent representation of the images is given and use supervised training. This allows us 1) to generate relatively large high-quality 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 pose-invariant face recognition[19, 20]. In a recent work Zhu et al.  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.
3 Model description
Our goal is to train a neural network to generate accurate images of objects from a high-level 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 high-level representation, we need to generate an image given the high-level parameters.
Formally, we assume that we are given a dataset of examples with targets . The input tuples consist of three vectors:
is the one-hot encoding of the model identity (defining the style),– azimuth and elevation of the camera position (represented by their sine and cosine 111We 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 . Each is a combination of the following transformations: in-plane 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 FC-1 to FC-4 first build a shared, high dimensional hidden representationfrom 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 (FC-4).
The layers FC-5 and uconv-1 to uconv-4 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 (“up-convolution”) 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. Implementation-wise 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 up-convolution, respectively. We found that adding a convolutional layer after each up-convolution 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 segmented-out chair image and the segmentation mask (the weights are omitted from the arguments of and for brevity of notation):
are loss functions for the RGB image and for the segmentation mask respectively, andis a weighting term, trading off between these two. In our experiments was always squared Euclidean distance, while for
we tried two choices: squared Euclidean distance and negative log-likelihood loss preceded by a softmax layer. We setin 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 high-level description (including the object identity as given by the one-hot 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 identityin layer FC-2 (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 log-likelihood. A full description on the probabilistic generative model training is given in Appendix A.
As training data for the generative networks we used renderings of 3D models of different objects: chairs, made public by Aubry et al. , as well as car and table models from the ShapeNet  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 near-duplicate models, models differing only by color, or low-quality 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 Figure3. 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 . We used Adam  with momentum parameters and , and regularization parameter . Mini-batch size was . We started with a learning rate of for mini-batch 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 and He et al.  .
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.
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 log-likelihood (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 “1s-S”, but with roughly times more channels in each up-convolutional layer;
– same as “1s-S”, but with an extra convolutional layer after each up-convolutional one. These convolutional layers have kernels and the same number of channels as the preceding up-convolutional 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 “1s-S-deep” 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 one-hot 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.
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.
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 non-transformed. 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 zoom-out (row 3 of Figure 7), even though it has never been presented any zoomed-out images during training.
The network easily deals with extreme color-related 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.  or Jaderberg et al. .
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 class-independent 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 inter-class difference is larger than the intra-class 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 intra-class 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 (FC-2 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 FC-1 or FC-2 (not shown).
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 one-hot encoding of the chair style). However, in the interpolation experiments we have seen that the network also generates plausible images given inputs with several non-zero 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 as
and 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 FC-2 activations of the style stream. The results are shown in Figure17 (e)-(f). The difference between (e) and (f) is that in (e) the KL-divergence 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 variational-bound-based 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.
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 “1s-S-deep” 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. . To compensate for the drift, we refined the computed optical flow by recomputing it with a step of 9 frames, initialized by concatenated per-frame 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  and Deformable Spatial Pyramid  (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 “2s-E” 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 uconv-3 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 high-level neuron activations, which allows us to activate a single neuron in some of the higher layers and forward-propagate 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 FC-1 and FC-2 feature maps of the class stream while keeping viewpoint and transformation inputs fixed. The results clearly look chair-like 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 FC-3 and FC-4 feature maps. These feature maps contain joint class-viewpoint-transformation 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 FC-4 neurons more carefully we found that this is indeed a ’zoom neuron’, and, moreover, for each transformation there is a specialized neurons in FC-4. The effect of these is shown in Figure 21. Increasing the activation of one of these neurons while keeping all other activations in FC-4 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 FC-4 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 (uconv-2 and uconv-3) produce edge-like images, the neurons of higher deconvolutional layers generate only blurry ’clouds’, as opposed to the results of Zeiler and Fergus  with a classification network and max-unpooling. Our explanation is that because we use naive regular-grid 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 high-level 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 FC-5 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 single-neuron activation level to the whole image level. The outcome is shown in Figure24. 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 non-linear 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 uconv-3 layer (the last pre-output layer). Some of them exhibit regular patterns shown in Figure 25. These feature maps correspond to filters which look near-empty in Figure 19 (such as the 3rd and 10th filters in the first row). Our explanation of these patterns is that they compensate high-frequency artifacts originating from fixed filter sizes and regular-grid 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.
We have shown that supervised training of convolutional neural networks can be used not only for discriminative tasks, but also for generating images given high-level 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.
AD, MT and TB acknowledge funding by the ERC Starting Grant VideoLearn (279401). JTS is supported by the BrainLinks-BrainTools 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 FC-2 (c.f. Figure 1). We can then define the likelihood of a segmentation mask under transformation as
where outputs per-pixel 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
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
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 log-likelihood from (4) as
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
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 back-propagate through the sampling procedure we refer to Kingma et al..
A. Krizhevsky, I. Sutskever, and G. E. Hinton, “ImageNet classification with deep convolutional neural networks,” inNIPS, 2012, pp. 1106–1114.
-  G. E. Hinton and R. R. Salakhutdinov, “Reducing the dimensionality of data with neural networks,” Science, pp. 504–507, 2006.
-  R. Salakhutdinov and G. E. Hinton, “Deep boltzmann machines,” in AISTATS, 2009.
-  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.
-  R. Memisevic and G. Hinton, “Unsupervised learning of image transformations,” in CVPR, 2007.
H. Lee, R. Grosse, R. Ranganath, and A. Y. Ng, “Convolutional deep belief networks for scalable unsupervised learning of hierarchical representations,” inICML, 2009, pp. 609–616.
Y. Tang and A.-R. Mohamed, “Multiresolution deep belief networks,” in
International Conference on Artificial Intelligence and Statistics (AISTATS), 2012, 2012.
-  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.
-  R. P. Francos, H. Permuter, and J. Francos, “Gaussian mixture models of texture and colour for image database,” in ICASSP, 2003.
-  L. Theis, R. Hosseini, and M. Bethge, “Mixtures of conditional gaussian scale mixtures applied to multiscale image representations,” PLoS ONE, 2012.
H. Larochelle and I. Murray, “The neural autoregressive distribution estimator,”JMLR: W&CP, vol. 15, pp. 29–37, 2011.
-  Y. Bengio, E. Laufer, G. Alain, and J. Yosinski, “Deep generative stochastic networks trainable by backprop,” in ICML, 2014.
-  I. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. Courville, and Y. Bengio, “Generative adversarial nets,” in NIPS, 2014.
-  D. J. Rezende, S. Mohamed, and D. Wierstra, “Stochastic backpropagation and approximate inference in deep generative models,” in ICML, 2014.
-  D. P. Kingma and M. Welling, “Auto-encoding variational bayes.” in ICLR, 2014.
-  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/5026-learning-stochastic-feedforward-neural-networks.pdf
-  S. Reed, K. Sohn, Y. Zhang, and H. Lee, “Learning to disentangle factors of variation with manifold interaction,” in ICML, 2014.
D. Kingma, D. Rezende, S. Mohamed, and M. Welling, “Semi-supervised learning with deep generative models,” inNIPS, 2014.
-  V. Blanz and T. Vetter, “Face recognition based on fitting a 3D morphable model,” TPAMI, vol. 25, no. 9, Sep. 2003.
-  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.
Z. Zhu, P. Luo, X. Wang, and X. Tang, “Multi-view perceptron: a deep model for learning face identity and view representations,” inNIPS, 2014.
-  C. Dong, C. C. Loy, K. He, and X. Tang, “Learning a deep convolutional network for image super-resolution,” in 13th European Conference on Computer Vision (ECCV), 2014, pp. 184–199.
-  D. Eigen, C. Puhrsch, and R. Fergus, “Depth map prediction from a single image using a multi-scale deep network,” in NIPS, 2014.
-  M. D. Zeiler and R. Fergus, “Visualizing and understanding convolutional networks,” in ECCV, 2014.
-  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.
-  M. Aubry, D. Maturana, A. Efros, B. Russell, and J. Sivic, “Seeing 3D chairs: exemplar part-based 2D-3D alignment using a large dataset of CAD models,” in CVPR, 2014.
-  M. Savva, A. X. Chang, and P. Hanrahan, “Semantically-Enriched 3D Models for Common-sense Knowledge,” CVPR 2015 Workshop on Functionality, Physics, Intentionality and Causality, 2015.
-  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.
-  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
-  D. Sussillo, “Random walks: Training very deep nonlinear feed-forward networks with smart initialization,” CoRR, vol. abs/1412.6558, 2014. [Online]. Available: http://arxiv.org/abs/1412.6558
-  K. He, X. Zhang, S. Ren, and J. Sun, “Delving deep into rectifiers: Surpassing human-level performance on imagenet classification,” CoRR, vol. abs/1502.01852, 2015. [Online]. Available: http://arxiv.org/abs/1502.01852
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, 6-11 July 2015, 2015, pp. 1462–1471. [Online]. Available: http://jmlr.org/proceedings/papers/v37/gregor15.html
M. Jaderberg, K. Simonyan, A. Zisserman, and K. Kavukcuoglu, “Spatial transformer networks,” inNIPS, 2015.
-  T. Brox, A. Bruhn, N. Papenberg, and J. Weickert, “High accuracy optical flow estimation based on a theory for warping,” in ECCV, 2004.
-  C. Liu, J. Yuen, A. Torralba, J. Sivic, and W. T. Freeman, “Sift flow: Dense correspondence across different scenes,” in ECCV, 2008.
-  J. Kim, C. Liu, F. Sha, and K. Grauman, “Deformable spatial pyramid matching for fast dense correspondences.” in CVPR, 2013.