Learning Shape Abstractions by Assembling Volumetric Primitives

Shubham Tulsiani, Hao Su, Leonidas J. Guibas, Alexei A. Efros, Jitendra Malik

Introduction

“Treat nature by means of the cylinder, the sphere, the cone, everything brought into proper perspective”

Cezanne’s insight that an object can be conceived as assembled from a set of volumetric primitives has resurfaced multiple times in the vision and graphics literature. In computer vision, generalized cylinders were introduced by Binford back in 1971, where a cross-sectional area is swept along a straight or curved axis while possibly being shrunk or expanded during the process . One of the key motivations was parsimony of description – an object could be described by relatively few generalized cylinders, each of which in turn requiring only a few parameters. Volumetric primitives remained popular through the 1990s as they provided a coherent framework for explaining shape inference from a single image, perceptual organization, as well as recognition of a 3D object from 2D views. However, fitting generalized cylinders to image data required considerable hand crafting, and as machine learning techniques for object recognition came to the fore in the 1990s, this paradigm faded from the main stage.

Of course, finding parsimonious explanations for complex phenomena lies at the core of learning-based visual understanding. Indeed, machine learning is only possible because our visual world, despite its enormous complexity, is also highly structured – visual patterns don’t just happen once, but keep on repeating in various configurations. In contemporary computer vision, this structure is most often modeled via human supervision: the repeating patterns are labeled as objects or object parts, and supervised learning methods are employed to find and name them in novel imagery. However, it would seem more satisfying if complex structures could be explained in terms of simpler underlying structures.

In this paper we return to the classic problem of explaining objects with volumetric primitives, but using the modern tools of unsupervised learning and convolutional neural networks (CNNs). We choose the simplest possible primitives, rigidly transformed cuboids, and show how deep convolutional networks can be trained to assemble arbitrary 3D objects out of them (at some level of approximation). The main reason we succeed where the classic approaches failed is because we aim to explain the entire dataset of 3D objects jointly, allowing us to learn the common 3D patterns directly from the data.

While the representation of the 3D object shapes e.g. as meshes or voxel occupancies, is typically complex and high-dimensional, the resulting explanation in terms of basic primitives is parsimonious, with a small number of parameters. As examples of their applicability, we leverage the primitive based representation for various tasks e.g. part discovery, image based abstraction, shape manipulation etc. Here we do not wish to reprise the classic debates on the value of volumetric primitives – while they were oversold in the 70s and 80s, they suffer from complete neglect now, and we hope that this demonstration of feasibility of learning how to assemble an object from volumetric primitives will reignite interest. Code is available at https://shubhtuls.github.io/volumetricPrimitives.

Related Work

3D Representation and Reconstruction. The classic approaches for modeling objects and scenes dating to the very beginnings of the computer vision discipline, such as blocks world , generalized cylinders , and geons , emphasized the compactness of representation as the central goal. In a similar spirit, a few modern approaches have attempted to reconstruct objects/scenes using simple primitives, including Lego pieces and qualitative 3D blocks . Apart from these attempts, most mainstream methods for representing and reconstructing objects typically use much higher-dimensional representations e.g. objects as point clouds or exemplar CAD models . The success of the latter set of approaches has been largely driven by the data-driven reasoning which the classical methods did not leverage. Our work aims to combine the two – we aim for a parsimonious representation but discover the underlying parsimony in a data-driven manner instead of relying on hand-crafted cues and priors. Similar to our approach, Yumer and Kara showed that parsimonious modelling with data-driven reasoning can allow consistent geometry simplifications or deformations in shape collections but our learning based approach allows efficient test time inference for novel shapes. An additional property of our approach, compared to classical methods, is the consistency of representation across instances. Classical approaches solve a per-instance optimization and obtain an unordered set of primitives whereas our our approach outputs a consistent indexed set of primitives – this allows several applications examined in Section 5.

Parsing Objects, Scenes and 3D Shapes. The idea of exploiting repeating structures in large datasets has been central to efforts on unsupervised object discovery and co-segmentation . Data-driven compositionality, in particular, has been used for co-segmentation , scene parsing and novel scene generation . In the domain of 3D shapes, the idea of exploiting compositionality has played a similarly important role for object representation, parsing, and manipulation. Pre-labeled, part-based shape representations were used for capturing the category-specific shape manifold , generating novel objects or recovering 3D from 2.5D data . Other methods aim to automatically discover these components in 3D shape datasets , and their relative arrangements . Similar to these shape and scene based methods, our framework can automatically discover consistent components and understand the structure of the data, but we do so by virtue of learning to generate parsimonious explanations.

Deep Generative Models. The rapid recent progress in supervised learning tasks by using deep learning techniques has been accompanied by a growing interest in leveraging similar methods to discover structure in the visual data. Using generative adversarial networks allows learning the data distribution but the underlying latent space lacks interpretability. Other generative methods aim to explicitly decouple the underlying factors of variation but rely on supervision for disentangling these factors. More closely related to our work, some recent approaches use recurrent networks to iteratively generate components to explain a simple 2D input scene . Our work uses similar principles of learning component based explanations of complex shapes where the components are interpretable simple 3D primitives.

Learning Object Assembly

We formulate the problem of assembling a target object OO, given input signal II as that of predicting (up to) MM distinct parts which are then composed to output the final shape. Towards this, we learn a CNN hθh_{\theta} parametrized by θ\theta which outputs a primitive based representation. The task of learning this CNN is an unsupervised one – we do not have any annotations for the primitive parameters that best describe the target objects. However, even though there is no direct supervision, one can measure if a predicted primitive configuration is good by checking if the assembled object matches the target object. Using this insight, we formulate a loss function which informs us if the shape assembled using the predicted primitives matches the target shape and optimize this loss to train the CNN.

An overview of our approach is presented in Figure 2. Given a discretized representation of the target shape as input, we use a CNN to predict a primitive representation (described in Section 3.1). The predicted representation implicitly defines an assembled shape by composing the predicted primitives. Section 3.2 describes a differentiable loss function that allows using this representation in a learning framework. While the initial presentation assumes the use of a fixed number of primitives, Section 3.3 extends our approach to allow a variable number of primitives.

We represent an assembled shape by composing the predicted simple transformed primitives. Each primitive is encoded in terms of a tuple (z,q,t)(z,q,t) where zz represents its shape in a canonical frame and (q,t)(q,t) represent the spatial transformation (rotation and translation). The assembled shape predicted by the neural network hθh_{\theta} can therefore be written as below.

The motivation for this parametrization is to exploit the compositionality of parts as well as the independence of ‘what’ and ‘where’ (part shape and spatial transformation respectively). The representation of a shape as a set of parts allows independent reasoning regarding semantically separate units like chair legs, seat etc. The decomposition in terms of part shape and transformation parameters further decomposes factors of variation like ‘broad aeroplane wing’ (captured by shape) and ‘tilted chair back’ (captured by transformation).

2 Loss Function for Assembled Shape

We want to define a differentiable loss function L({(zm,qm,tm)},O)L(\{(z_{m},q_{m},t_{m})\},O) between the CNN prediction {(zm,qm,tm)}\{(z_{m},q_{m},t_{m})\} and the target object OO. This is a challenging task because the prediction and the groundtruth have different 3D representations – the prediction is a parametrized shape whereas the groundtruth is a mesh consisting of triangles. To overcome this, we leverage the fact that the parametrization in terms of simple primitives allows efficient computation of some properties of the shape induced by their composition. In particular, we can compute the distance field (Section 3.2.1) of the assembled shape as well as sample points on the surface of the primitives. These allow us to define two complimentary losses which together aim to minimize the discrepancy between the predicted and ground-truth shape. The Coverage Loss tries to enforce that the object OO is subsumed by the predicted assembled shape. The Consistency Loss enforces the other direction – that the object OO subsumes the predicted shape. By optimizing these losses together, we ensure that the assembled shape tries to be maximally consistent with the target object.

Notation. We represent by PmP_{m}, the untransformed primitive as predicted according to zmz_{m} and use Pˉm\bar{P}_{m} to denote the primitive PmP_{m} after rotation, translation according to (qm,tm)(q_{m},t_{m}). Therefore, the final shape induced by the composition of the predicted primitives is mPˉm\underset{m}{\cup}\bar{P}_{m}.

We use the function S()S(\cdot) to represent the surface of the argument and pS()p\sim S(\cdot) represents a random point sampled on it e.g. pS(Pˉm)p\sim S(\bar{P}_{m}) corresponds to a point sampled on the surface of mthm^{th} primitive. We also require notations for simple rigid transformations – we denote by R(p,q)\mathcal{R}(p,q) result of rotating a point pp according to rotation specified by quaternion qq and similarly, T(p,t)\mathcal{T}(p,t) denotes the result of translating a point pp by tt. Note that the operations R,T\mathcal{R},\mathcal{T} are both differentiable.

We want to penalize the CNN prediction if the target object OO is not completely covered by the predicted shape mPˉm\underset{m}{\cup}\bar{P}_{m}. A sufficient condition to ensure this is that the distance field of the assembled shape evaluates to zero for all points on the surface of O.

Computation can be simplified due to a nice property of distance fields. It is easy to show that the distance field of a composed shape equals to the pointwise minimum of the distance fields of all composing shapes:

This decomposition rule boils the distance field of a whole shape down to the distance field of a primitive. In the following, we show how to efficiently compute C\mathcal{C} for primitives as cuboids.

Distance field of Primitives. Given an origin-centred cuboid represented by z(w,h,d)z\equiv(w,h,d) – its extent in the three dimensions, its distance field Ccub(  ;z)\mathcal{C}_{cub}(~{}\cdot~{};z) can be computed as below (using max(0,x)x+\text{max}(0,x)\equiv x_{+}):

Consider an object OO (with an associated field C(  ;O)\mathcal{C}(~{}\cdot~{};O)) undergoing a rotation RR (parametrized by quaternion qq) followed by a translation tt. The distance field at a point pp w.r.t. the transformed object is the same as the distance field at pp^{\prime} wrt. the canonical object where p=R1(pt)p^{\prime}=R^{-1}(p-t). This observations allows us to complete the formulation by defining C(p;Pˉm)\mathcal{C}(p;\bar{P}_{m}) (required in Eq. 4) as below.

We want to penalize the CNN prediction if the predicted shape mPˉm\underset{m}{\cup}\bar{P}_{m} is not completely inside the target object OO. A sufficient condition is to ensure this is that the distance field of the object O shape evaluates to zero for all points on the surface of individual primitives Pˉm\bar{P}_{m}.

Additionally, we observe that to sample a point pp on the surface of Pˉm\bar{P}_{m}, one can equivalently sample pp^{\prime} on the surface of the untransformed primitive PmP_{m} and then rotate, translate pp^{\prime} according to (qm,zm)(q_{m},z_{m}).

An aspect for computing gradients for the predicted parameters using this loss is the ability to compute derivatives for zmz_{m} given gradients for a sampled point on the canonical untransformed primitive pS(Pm)p^{\prime}\sim S(P_{m}). We do so by using the re-parametrization trick which decouples the parameters from the random sampling. As an example, consider a point being sampled on a rectangle extending from (w,h)(-w,-h) to (w,h)(w,h). Instead of sampling the x-coordinate as x[w,w]x\sim[-w,w], one can use uu\sim and x=uwx=uw. This re-parametrization of sampling allows one to compute xw\frac{\partial x}{\partial w}. We provide the details for applying the re-parametrization trick for a cuboid primitive in the appendix.

3 Allowing Variable Number of Primitives

The framework we have presented so far reconstructs each instance in an object category using exactly MM primitives. However, different instances in an object category can be explained by different number of primitives e.g. some chairs have handles, others don’t. To incorporate this, in addition to predicting the shape and transformation of each primitive, we also predict the probability of its existence pmp_{m}. We first discuss the modified representation predicted by the CNN and discuss how the loss function can incorporate this.

Primitive Representation. As we mentioned above, the primitive representation has an added parameter pmp_{m} – the probability of its existence. To incorporate this, we factor the primitive shape zmz_{m} into two components – (zms,zme)(z_{m}^{s},z_{m}^{e}). Here zmsz_{m}^{s} represents the primitive’s dimensions (e.g. cuboid height, width, depth) as before and zmeBern(pm)z_{m}^{e}\sim Bern(p_{m}) is a binary variable which denotes if the primitive actually exists i.e. if zme=0z_{m}^{e}=0 we pretend as if the mthm^{th} primitive does not exist. The prediction of the CNN in this scenario is as below.

Note that the CNN predicts pmp_{m} – the parameter of the Bernoulli distribution from which the part existence variable zmez_{m}^{e} is sampled. This representation allows the prediction of a variable number of parts e.g. if a chair is best explained using k<Mk<M primitives, the network can predict a high pmp_{m} for only kk primitives and a low pmp_{m} for the remaining MkM-k primitives.

Learning. Under the reformulated representation of primitives, the CNN output does not induce a unique assembled shape – it induces a distribution of possible shapes where the mthm^{th} primitive stochastically exists with probability pmp_{m}. In this scenario, we want to minimize the expected loss across the possible assemblies. The first step is to modify the consistency and coverage losses to incorporate zm(zms,zme)z_{m}\equiv(z_{m}^{s},z_{m}^{e}). Towards this, we note that the untransformed primitive PmP_{m} is either a cuboid (if zme=1z_{m}^{e}=1) or empty (if zme=0z_{m}^{e}=0). In case it is empty, we can simply skip it the the consistency loss (Section 3.2.3) for this primitive and can incorporate this in the coverage loss (Section 3.2.2) by modifying Eq. 6 as follows -

We can now define the final loss L(hθ(I),O)L(h_{\theta}(I),O) using the concepts developed. Note that this is simply the expected loss across possible samplings of zmez_{m}^{e} according to pmp_{m}.

Under this loss function, the gradients for the continuous variables i.e. {(zms,qm,tm)}\{(z_{m}^{s},q_{m},t_{m})\} can be estimated by averaging their gradients across samples. However, to compute gradients for the distribution parameter pmp_{m}, we use the REINFORCE algorithm which basically gives positive feedback if the overall error is low (reward is high) and negative feedback otherwise. To further encourage parsimony, we include a small parsimony reward (reward for choosing fewer primitives) when computing gradients for pmp_{m}.

Experiments

Dataset. We perform our experiments primarily using the ShapeNet dataset which has a large collection of 3D models. In particular, we use the ‘airplane’ and ‘chair’ object categories which have thousands of meshes available. The ShapeNet models are already aligned in a canonical frame and are of a fixed scale. Additionally, in order to demonstrate applicability beyond rigid objects, we also manually download and similarly preprocess a set of around 100 models corresponding to four-legged animals.

Network Architecture and Training. The dataset described above gives us a set of 3D objects {Oi}\{O_{i}\}. Corresponding to OiO_{i}, the input to our CNN is a discretized representation as a volumetric occupancy grid IiI_{i} of size 32323232\ast 32\ast 32 (we later experiment with rendered images as input in Section 5.3). The encoder used in our shape assembler, as shown in Figure 2, takes in as input an occupancy grid and passes it through 3D convolutional and fully connected layers with intermediate non-linearities to output the primitive parameters {(zms,qm,tm,pm)m = 1M}hθ(Ii)\{(z_{m}^{s},q_{m},t_{m},p_{m})|m~{}=~{}1\cdots M\}\equiv h_{\theta}(I_{i}). In this work, we use cuboid primitives and zmsz_{m}^{s} represents the width, height and thickness of cuboids. We use ADAM to train our network according to the loss L(hθ(Ii),Oi)L(h_{\theta}(I_{i}),O_{i}) described in Section 3 which aims to make the assembled shape predicted using IiI_{i} match to the target object OiO_{i}.

Implementation Details. The coverage and consistency loss functions are both defined using expectations over sampled points. In practice, we randomly sample 1000 points on S(O)S(O) to implement Eq. 3 and 150 points from each S(Pˉm)S(\bar{P}_{m}) to implement Eq. 7. To efficiently compute the distance field of the target object OO at an arbitrary point pp in Eq. 7, we precompute the distance field and its derivatives for samples in a dense regular grid and use it to obtain efficient but approximate gradients C(p,O)p\frac{\partial\mathcal{C}(p,O)}{\partial p}.

Another practical difficulty is that the gradients for the primitive existence probabilities pmp_{m} are extremely noisy in the initial training stages – e.g. in the initial stages if a primitive is incorrectly placed, the CNN may learn to predict a very small pmp_{m} instead of learning to align the primitive correctly. To overcome this, we use a two-stage training process. We first train the network using a fixed high value of pmp_{m} across primitives and later allow the network to also learn pmp_{m} while also encouraging simplicity by the external parsimony reward. As shown in Figure 5, this has the effect of first using a large number of primitives and in later stages, merging them together and using fewer primitives.

Results and Analysis. We show the results of our method for three object categories – chairs, aeroplanes and animals in Figure 3. We observe that the predictions successfully capture the coarse structure and are consistent across objects. The results indicate that the we can handle structural variations within a category e.g. the objects in the right side of Figure 3 have a different structure than those on the left which occur more commonly in the dataset.

We visualize in Figure 5 the training error across iterations. We observe that in the initial training stage (up to 20000 iterations), the loss rapidly decreases as the correct configuration is being learned. In the second stage of training, when we allow pmp_{m} to be learned, the error initially increases – this is because some primitives, encouraged by the parsimony reward, now start disappearing and the network eventually learns to use fewer primitives better. Even though the reconstruction error in the initial stages is lower, the reconstructions using fewer primitives, are more parsimonious. This provides an insight regarding the tradeoff between representation parsimony and reconstruction accuracy – and that we should not judge the former by the latter.

Applications

We observe in Figure 1 and Figure 3 that the inferred representations are consistent across a category – chair seat is explained consistently using the same primitive. They are also descriptive of the underlying shape and are, by construction, interpretable. Therefore, our framework allows us to automatically discover descriptive, consistent and interpretable shape abstractions using a collection of 3D models. By virtue of these properties, our representation can enable several applications related to shape similarity, part discovery, perception and shape manipulation.

The learned primitive decomposition is useful for obtaining part-level correspondences across instances. Since we use a common network across an object category, simple and consistent solutions are preferred to explain the data i.e. the same primitive explains the chair back across the category. We can leverage this observation to extract correspondences across the category by assigning labels to points according to the primitive that explains them – we assign each point to the primitive that has the lowest C(p,Pˉm)\mathcal{C}(p,\bar{P}_{m}), giving preference to larger primitives to break ties. We therefore obtain a consistent labelling of all points across instances using the predicted primitive decomposition – some examples are depicted in Figure 6.

We also evaluate this parsing on the Shape COSEG dataset by measuring the accuracy using annotated ground-truth. While the ground-truth only has 3 clusters (chair back, seat, legs), our method as well as previous unsupervised approaches cluster shapes into a larger number of partitions (number of primitives in our case) and assign each partition a ground-truth label to evaluate. We obtain a mean accuracy of 89.0%\% whereas reports 78.6%\% and 84.8%\% accuracy with initial and refined parsings respectivelyUnfortunately, we found that used a preliminary version of the Shape COSEG dataset . We were unable to obtain this preliminary version, therefore the results are not exactly comparable. The algorithm in does use the current dataset but reports no quantitative results.. See appendix for qualitative results.

2 Interpretable Shape Similarity

The trained CNN of our shape assembler maps every 3D shape to corresponding primitive parameters {(zm,qm,tm)}\{(z_{m},q_{m},t_{m})\}. These parameters succinctly capture the geometry of the underlying object. We find that a simple euclidean distance in the embedding space is a reliable measure of shape similarity. We use this distance to compute a t-sne embedding of shapes and visualize 1000 random instances in Figure 7 . We observe that the automatically discovered structure captures similarity better than a simple voxel IoU based metric and that clusters correspond to natural sub-categories e.g. sofa etc.

One aspect unique to our approach is that the shape embedding is interpretable and instead of using primitive parameters for all parts, we can modify the distance measure to focus on specifics of interest for the application. As an example, we show the resulting t-sne embedding if only 2 primitives, which correspond to back and seat, are used to compute the distance across shapes. We observe that the embedding reflects the desired similarity e.g. unlike in the case of using all primitives to measure shape similarity, chairs with and without handles are now embedded together. We also compute the embedding for the distance measure which only measures the difference in the orientation (qm)(q_{m}) for a specific part (chair back) and observe that this is a 1D manifold with the tilt increasing as we traverse it. Therefore, unlike common shape representations, our inferred abstractions give us control over similarity measures.

3 Image based Abstraction

Given our trained model hθh_{\theta} which infers primitive representation using volume inputs, we can train an image based prediction model gθg_{\theta^{\prime}}. We obtain volume-image pairs (Vi,Ii)(V_{i},I_{i}) by rendering ShapeNet models with random lighting and background (as suggested in ) and train the image based network to mimic the volume based network’s predictions i.e. we train gθg_{\theta^{\prime}} to minimize hθ(Vi)gθ(Ii)2\|h_{\theta}(V_{i})-g_{\theta^{\prime}}(I_{i})\|^{2}. This distillation technique for using paired data to train a model for predicting outputs similar to a pre-trained CNN is common and has previously also been used for learning shape embeddings . We find that we can successfully apply this to our scenario and learn an image-based prediction model that outputs the abstraction of the underlying shape given a single image. We show some results in Figure 8. This demonstrates that one can learn to predict shape abstractions using varying inputs and this might enable applications in robotics settings where such inference might help in grasping, planning etc.

4 Shape Manipulation

The inferred primitive based shape abstractions can be used as a skeleton to guide manipulation of the underlying objects. We can assign each mesh point a local coordinate in the frame of its corresponding primitive (as computed in Section 5.1). A rotation, translation or scaling of the corresponding primitive can thereby induce a change in the global coordinates of the associated mesh points. We show some examples in Figure 9 where we deform a source mesh to have a similar configuration as a target mesh. While the transformation used in this example is defined using a target mesh, one can also use our representation for other transformation e.g. making the legs longer or tilting the back etc.

Conclusion

In this work, we take an unsupervised, data-driven approach to explain visual information in terms of simpler primitives. Taking inspiration from the classic work on generalized cylinders and geons , we too argue that any visual explanation must be in terms of 3D volumetric entities, not 2D pixel patches. However, unlike the earlier work in this area we firmly believe in being data-driven and letting the data itself discover the best representation.

We demonstrated the applicability of data-driven 3D understanding of the visual world in a very simple setting – that of explaining objects from cuboidal primitives. This merely represents the first steps towards the goal of generating parsimonious descriptions of the visual input and hope that this will motivate further efforts, including the use of a wider catalogue of basic parametrized primitives, to understand the underlying 3D structure of the world.

Acknowledgements

We thank Saurabh Gupta and David Fouhey for insightful discussions. This work was supported in part by Intel/NSF Visual and Experiential Computing award IIS-1539099, NSF Award IIS-1212798, and the Berkeley Fellowship to ST. We gratefully acknowledge NVIDIA corporation for the donation of Tesla GPUs used for this research.

References

Appendix

We first re-iterate the consistency loss which aims for the assembled shape to be subsumed by ground-truth object and does so by sampling points on the surface of each primitive and penalizing the squared distance field w.r.t the ground-truth object at the sampled points.

Recall that to sample a point pp on the surface of Pˉm\bar{P}_{m}, one can equivalently sample pp^{\prime} on the surface of the untransformed primitive PmP_{m} and then rotate, translate pp^{\prime} according to (qm,zm)(q_{m},z_{m}).

Note that the untransformed primitive PmP_{m} is an origin-centered cuboid parametrized by zm(wm,hm,dm)z_{m}\equiv(w_{m},h_{m},d_{m}) – the dimensions along the three canonical axes. We now aim to show that we can derive gradients for zmz_{m} given gradients for a pS(Pm)p^{\prime}\sim S(P_{m}). We do so using a re-parametrization trick where we aim to decouple the random sampling process from the parameters. The process of sampling from a cuboid’s surface requires developing tow aspects. The first concerns how to sample from a particular face. The second required component is to decide which face to sample from – we show that we can sample equally from all faces if we assign sample importance weights.

Sampling Along a Face. Let us assume we want to to sample a point from a given cuboid face – say the one on the plane x=wx=w. The process of sampling a point on this face can be written as -

We can similarly define a sampling process for the other cuboid faces. Note that the coordinates of the sampled point pp^{\prime} are linear the primitive parameters and that given the random coefficients (ux,uy,uz)(u_{x},u_{y},u_{z}), it is straightforward to compute pzm\frac{\partial p^{\prime}}{\partial z_{m}}.

Importance Weights per Sample. To sample uniformly on the cuboid surface, we need to sample on each face with a probability proportional to its area. Unfortunately, it is unclear how this sampling process can be decoupled from the parameters pmp_{m}. Instead, we can simply sample equally from all faces and assign each sample an importance weight proportional to the area of the face it was sampled from. Under this implementation, the consistency loss as previously defined can be implemented as:

Here wpw_{p} is the importance weight of the corresponding sample and is proportional to the area of the face where it was drawn from. Note that wpw_{p} is also differentiable w.r.t zmz_{m}, therefore making consistency loss described differentiable w.r.t the predicted primitive parameters.

We provide more details on how we use the REINFORCE algorithm to compute gradients for the primitive existence probabilities pmp_{m}. We discuss a more general implementation compared to the text – we assume pm(pm0,pm1)p_{m}\equiv(p_{m}^{0},p_{m}^{1}) represents the probability of the available choices for the primitive – pm0p_{m}^{0} is the probability that the primitive does not exist and pm1p_{m}^{1} is the probability that it is a cuboid. Note that this can be modified to add other choices e.g. a third choice that the primitive is a cylinder.

Let ll denote the loss L({(zm,qm,tm)},O)L(\{(z_{m},q_{m},t_{m})\},O) incurred for the particular sampling of zmez_{m}^{e}. Let rr denote the external parsimony reward obtained if a primitive is sampled as not existing. Using these, the gradient for the predicted probability pmp_{m} is computed as -

It is typically also advised to subtract a ‘baseline’ (mean reward in the ideal scenario) to reduce the variance of the estimated gradients so we incorporate it using lbl-b instead of ll in the equation above where bb is the running average of the losses incurred.

A3. Architecture and Initialization

Architecture and Hyper-parameters. Our network has five 3D convolution layers (with ReLU) of kernel 3, padding 1, stride 2. The number of channels (initially 4) are doubled after every layer. These are followed by 2 fc layers (with ReLU) with 100 units each, followed by a final layer to predict primitive parameters. We use ADAM for optimization and choose M to be more than the double the number of expected parts. M=20 for chairs, but was reduced to 15, 12 for planes, animals (to reduce iteration time).

Initialization. We initially bias zmz_{m} s.t. primitives are small cubes and pm=0.9p_{m}=0.9 so every primitive is initially used but all other layer parameters/weights (and primitive positions, rotations etc.) are initialized randomly (our training discovers consistent solutions despite a random initialization because of commonalities in the data).

A4. Visualization

Shape COSEG Results. We visualize our parsings obtained on the ‘chairs’ subset of the Shape COSEG data. Figure 10 shows the meshes in the dataset and Figure 11 shows our inferred representations for these. Figure 12 visualizes the obtained unsupervised parsing of the original mesh. Figure 13 shows the annotated ground-truth labels and Figure 14 shows our predictions obtained by assigning each primitive a label from the available ground-truth labels.

We show in Figure 15, Figure 16, Figure 17 and Figure 18 the high-resolution images corresponding to the embeddings shown in the original text.