SyncSpecCNN: Synchronized Spectral CNN for 3D Shape Segmentation
Li Yi, Hao Su, Xingwen Guo, Leonidas Guibas
Introduction
As has already happened in the image domain, the wide availability of 3D models brings with it the need to associate semantic information with the 3D data. In this work we focus on the problem of annotating 3D models represented by 2D meshes with part information. Understanding of the parts of an object (e.g., the back, seat and legs of a chair) is essential to its geometric structure, to its style, and to its function. There has been significant recent progress in the large scale part annotation of 3D models (e.g., for a subset of the ShapeNet models) – our aim here is to leverage this rich data set so as to infer parts of new 3D object models. Our techniques can also be used to infer keypoints and other substructures within 3D models.
It is not straightforward to apply traditional deep learning approaches to 3D models because a mesh representation can be combinatorially irregular and does not permit the optimizations exploited by convolutional approaches, such as weight sharing, which depend on regular grid structures. In this paper we take a functional approach to represent information about shapes, starting with the observation that a shape part is itself nothing but a 0-1 indicator function defined on the shape.
Our basic problem is to learn functions on shapes. We start with example functions provided on a given shape collection in the training set and build a neural net that can infer the same function when given a new 3D model. This suggests the use of a spectral formulation, based on a dual graph representing the shape, yielding bases for a function space built over the mesh.
With this graph representation we face multiple challenges in building a convolutional neural architecture. One is how to share coefficients and conduct multiscale analysis in different parts of the graph for a single shape. Another is how to share information across related but different shapes that may be represented by very different graphs. We introduce a novel architecture, the Synchronized Spectral CNN (SyncSpecCNN) to address these issues.
The basic architecture of our neural network is similar to the fully convolutional segmentation network of , namely, we repeat the operation of convolving a vertex function by kernels and applying a non-linear transformation. However, our network combines processing in the primal and dual (spectral) domains. We deal with the problem of weight sharing among convolution kernels at different scales in the primal domain by performing the convolutions in the spectral domain, where they become just pointwise multiplications by the kernel duals. Our key building block consists of passing to the dual, performing a pointwise multiplication and then returning to the primal representation in order to perform an appropriate non-linear step (such operations are not easily dualized).
The issue of information sharing across shapes is more challenging. Since different shapes give rise to different nearest neighbor graphs on their point clouds, the eigenbases we get for the graph laplacians are not directly comparable. We synchronize all these laplacians by applying a functional map in the spectral domain to align them to a common canonical space. The aligning functional maps succeed in encoding all the dual information on a common set of basis functions where global learning takes place. An initial version of the aligning maps is computed directly from the geometry and then is further refined during training, in the style of a data-dependent spatial transformer network.
We have tested our SyncSpecCNN on various tasks including 3D shape part segmentation and 3D keypoint prediction. We achieve state-of-the-art performance on all these tasks.
Key contributions of our approach are as follows:
We are the first to target at non-isometric shapes in the family of spectral CNNs.
To allow weight sharing across different non-isometric shapes, we learn a Spectral Transformer Network.
We introduce an effective spectral multiscale kernel construction scheme.
Background
An important application of our framework is to obtain semantic part segmentation of 3D shapes in a supervised fashion. Along this track, most previous methods employ traditional machine learning techniques and construct classifiers based on geometric features. In the domain of unsupervised shape segmentation, there is one family of methods emphasizes the effectiveness of spectral analysis for 3D shape segmentation. Inspired by this, our framework aims to marry the powerfulness of deep neural network and spectral analysis for 3D shapes segmentation.
As is in Fourier analysis, the spectral decomposition also introduces the concept of frequency. For each basis , the eigenvalue in the decomposition defines its frequency, depicting its smoothness. By projecting on each basis , the coefficient can be obtained. is the spectral representation of , in analogy to the Fourier transform. The convolution theorem of Fourier analysis can be extended to the laplacian spectrum: the convolution between a kernel and a function on the shape graph is equivalent to the point wise multiplication of their spectral representations .
Different shapes define shape graphs with varied bases and spectral domains, which results in incomparable graph vertex function. Inspired by the recent work on synchronization , we propose to align these different spectral domains using functional map . Functional map is initially introduced for this purpose on shapes. Specifically, given a pair of shape graph and , a functional map from to is given by a matrix , which maps a function with coefficient vector to the function with coefficient vector . and are computed according to a pair of bases. We refer the reader to for detailed introduction and intuition.
We call such CNNs as “graph CNNs”. Graph CNNs takes a graph with vertex function as input. Conventional image CNN can be viewed as a graph CNN on 2D regular grids of pixels, with RGB values as the vertex function. There have been some previous work studying graph CNN on more general graphs instead of 2D regular grids , and have a special focus on near-isometric 3D shape graphs like human bodies. To generalize image CNN, These work usually tries to tackle the following three challenges: defining translation structures on graphs to allow parameter sharing; designing compactly supported filters on graphs; aggregating multi-scale information. Their constructions of deep neural network usually fall into two types: spatial construction and spectral construction. The approach we propose belongs to the family of spectral construction but with two key differences: we explicitly design an effective multi-scale information aggregation scheme; we synchronize different spectral domains to allow parameter sharing among very different shape graphs thus increasing generalizability of our SyncSpecCNN.
Problem
Approach
The basic architecture of our SyncSpecCNN is similar to the fully convolutional segmentation network as in , namely, we repeat the operation of convolving the vertex function by kernels and applying non-linear transformation. However, we have several key differences. First, we achieve convolution by modulation in the spectral domain. Second, we parametrize kernels in the spectral domain following a dilated fashion, so that kernel sizes could be effectively enlarged to capture large context information without increasing the number of parameters. Last, we design a Spectral Transformer Network to synchronize the spectral domain of different shapes, allowing better parameter sharing.
2 Network Architecture
Similar to conventional CNN, our SyncSpecCNN contains layers including ReLU, DropOut, 11 Convolution , and BatchNormalization, which all operate in the spatial domain on graph vertex functions. The difference comes from our graph convolution operation, which introduces the following modules: Forward Transform, Backward Transform, Spectral Multiplication, and Spectral Transformer Network, as is shown in Figure 2 and summarized in Table 1.
We provide more details about the newly introduces modules as below.
One interesting observation is worth mentioning: small convolution kernels correspond to smoothly transiting multipliers in the spectral domain, therefore not very sensitive to bases misalignment among shapes graphs in a certain range of spectrum and are more generalizable across graphs. As a result, we omit the spectral transformer network when the convolution kernels are small.
3 Spectral Dilated Kernel Parameterization
Yu et al. has proved the effectiveness of multi-scale kernels for aggregating context information at different scales in the task of image segmentation. They propose to use dilated kernels to increase the kernel size without increasing the number of parameters. We parametrize our convolution kernels in a similar flavor but in the spectral domain, which turns out to be straightforward and effective. Essentially, we find that multi-resolution analysis on graphs could be achieved without complicated hierarchical graph clustering.
Before explaining what the exact parametrization is, we first discuss the intuition behind our design. The Spectral Multiplication layer modulates the spectral representation by a set of multipliers from the kernel, where is the spectral coordinate of vertex function at basis . Note that can be interpreted as the frequency of its corresponding eigenbasis , and itself is a vertex function that captures the intrinsic geometry of the shape. We assume that ’s are sorted ascendingly and arrange ’s accordingly.
The multiplers are the spectral representation of convolution kernel. Denote the set of multipliers as , each corresponds to one . Regard as a function of .
Again, generalized from conventional Fourier analysis, if is concentrated in the low-end of the spectrum, the corresponding spatial kernel function is smooth; conversely, if the corresponding spatial functions is localized, is smooth. Therefore, to obtain a smoother kernel function as in , we constrain the bandwidth of , enabling us to learn a smaller number of parameters; in addition, varying the smoothness of would control the kernel size.
To be specific, we associate each Spectral Multiplication layer with a dilation parameter and parameterize as a combination of some modulated exponential window functions, namely
Here is a set of learnable parameters, is a hyper-parameter controlling the number of learnable parameters. Large corresponds to rapidly changing multipliers with small bandwidth, thus a smooth kernel with large spatial support. On the other hand, small corresponds to slowly changing multipliers with large bandwidth, corresponding to kernels with small spatial support. Instead of using an exponential window only, we add modulation to increase the expressive power of the kernel. Figure 3 shows a visualization of modulated exponential window function with different dilation parameter.
Our parametrization has three main advantages: First, it allows aggregating multi-scale information since the size of convolution kernels vary in different layers; Second, large kernels could be easily acquired with a compact set of parameters, which effectively increases the receptive field while mitigates overfitting; Third, reduced parameters allow more efficient computation.
4 Spectral Transformer Network
As is shown in Figure 3, the same spectral parametrization of kernels could lead to very different vertex functions when the underlying spectral domains are different. This problem is especially prominent when the kernel size is large. Therefore, being able to synchronize different spectral domains is the key to allow large kernels sharing parameters across different shape graphs.
According to and , one way to synchronize the spectral domains of a group of shapes is through a tool named functional map. In the functional map framework, one can find a linear map to pull the spectral domain of each individual shape to a canonical space, so that representations in the individual spectral domains become comparable under a canonical set of bases. Indeed, given each shape , this linear map is as simple as a matrix , which linearly transforms the spectral representation on one shape to its counterpart in the canonical space. Note that, from the synchronization in the spectral domain, one induces a spatial correspondence on the graph, vice versa. Viewing the spectral domain as the dual space and spatial domain on graph as the primal space, this primal-dual relationship is the pivotal idea behind functional map.
Inspired by this idea, we design a Spectral Transformer Network (SpecTN) for the spectral domain synchronization task. Our SpecTN takes a shape as input and predicts a matrix for it (see Figure 2), so that . Thus, without SpecTN, will be directly passed to subsequent modules of our network; with SpecTN, will be passed. In Figure 4, we show an example of how different spectral domains are synchronized after applying the linear map predicted from our SpecTN.
Our SpecTN draws inspiration from Spatial Transformer Network (STN) . From a high level, both SpecTN and STN are learned to align data to a canonical form.
4.2 Input to SpecTN
A proper representation for shape is needed as the input to our SpecTN. To allow SpecTN predicting a transform between different spectral domains, certain depiction about the underlying spectral domain is greatly helpful, i.e. graph laplacian eigenbases in our setting. In addition, since spectral synchronization couples with graph alignment, providing rough shape graph correspondences could facilitate good prediction.
Based on these, we use voxel functions that is computed from laplacian eigenbases as the input to SpecTN: Specifically, is a volumetric reparameterization of the graph laplacian eigenbases , defined voxel-wise in 3D volumetric space. The volumetric reparameterization is conducted by converting graph vertex function into voxel function in a straightforward manner – we simply assign a vertex function value to the voxel where the vertex lies. Since all live in the same 3D volumetric space, correspondences among them are associated accordingly.
4.3 Optimization of SpecTN
Ideally, SpecTN should be learned automatically along with the minimization of the prediction loss, as the case in STN; however, in practice we find that such optimization is extremely challenging. This is because the parameters of in SpecTN is quadratic w.r.t the number of spectral bases, hundreds of times more than in the affine transformation matrix of STN.
We address this challenge from three aspects: limit our scope to a reduced set of prominent spectral bases to curtail the parameters of ; add regularization to constrain the optimization space; smartly initialize SpecTN with a good starting point.
Synchronizing the whole spectrum could be a daunting task given its high dimensionality. In particular, free parameters in grows quadratically as the dimension of spectral domain increases. To favor optimization, we adopt a natural strategy that only synchronizes the prominent part of the spectrum. In our case, the spectral parametrization of large kernels are mainly determined by the low-frequency end of the spectrum, indicating that the synchronization in this part of spectrum is sufficient. In practice, we synchronize the top bases sorted by the frequency. This idea has been verified to be effective by .
Regularizations are used during training to force the output of SpecTN to be close to an orthogonal map, namely, in the overall loss function we add a term . With this regularization, can be used to approximate the inverse map. Such a maneuver is more friendly to differentiation and easier to train.
Given the huge optimization space and the non-convex objective, a good starting point helps to avoid optimization from getting stuck in bad local minima. As stated above, our linear transformation can be interpreted as a functional map; therefore, it is natural for us to initialize accordingly and then refine it to better serve the end-task. To this end, we first precompute a set of function maps for each shape by an external routine, which roughly align each individual spectral domain of to a canonical domain. Then we pretrain the SpecTN separately in a supervised manner:
where indexes shapes. This pretrained SpecTN is plugged into the SyncSpecCNN pipeline and fine-tuned while optimizing a specific task such as shape segmentation. Validated by our experiment, the pretraining step is crucial.
Next we introduce how the external routine precomputes a functional map for some shape . This functional map aligns the spectral domain of to a canonical one of an “average” shape . So we start from the construction of the “average” shape and then proceed to the computation of the functional map.
The geometry of is not generated explicitly. Instead, is represented by its volumetric adjacency matrix , which depicts the connectivity of voxels in the volumetric space that all shapes are voxelized. is obtained by averaging the volumetric adjacency matrices of all shapes. The for each shape is the adjacency matrix of the corresponding volumetric graph, whose vertices are all the voxels and edges indicate the adjacency of occupied voxels in the volumetric space.
The functional map from to could be induced from the spatial correspondences between and , by the primal-dual relationship . Since we already have the bases of and , as well as the rough spatial correspondences between them from the volumetric occupancy, this map can then be discovered by the approach proposed in . To be specific, we use to denote the volumetric reparametrization of graph laplacian eigenbases for each shape , and use to denote the grahp laplacian eigenbases of . and both lie in the volumetric space and their spatial correspondence is natural to acquire. The functional map aligning with could be computed through simple matrix multiplication . The computed functional map will serve as supervision and SpecTN is pretrained to minimize the loss function .
It is worth mentioning that, if the shapes under consideration are diverse in topology and geometry, i.e. shapes from different categories, aligning every shape to a single “average” shape might cause unwanted distortion. Therefore we leverage multiple “average” shapes and use a combination of their spectral domains as the canonical domain. Specifically, we assign each shape to its closest “average” shape under some global similarity measurement (i.e. lightfield descriptor) and use to represent such assignment, namely if is assigned to and otherwise. Also we use to denote the spectral bases of . Then the functional map for each shape could be computed through . The SpecTN is pretrained to predict a functional map which only synchronizes spectral domain of each shape to its most similar “average” shape.
5 Implementation Details
In most of our experiments, input shapes are represented as point cloud with around points. Given an input shape point cloud, we build a k-nearest neighbor graph first. We use in all our experiments. Then a graph weight matrix could be constructed in which if point and are connected, otherwise. We then compute the symmetric normalized graph laplacian as , where is the degree matrix and denotes identity matrix. Since many natural functions we care about could be depicted by a small number of low-frequency laplacian eigenbases, we compute and use the smallest eigenvalues as well as the corresponding eigenbases for each in all our experiments.
Experiment
Our proposed SyncSpecCNN takes one graph vertex function as input and predicts another as output. As a generic framework, the prediction is not limited to a specific type of graph vertex function and can be tailored towards different goals. To evaluate the effectiveness of our framework, we divide our experiments into five parts. First, we evaluate on a benchmark of 3D shape segmentation . Second, we evaluate on keypoint prediction task using a new large scale keypoint annotation dataset. Third, we leverage SyncSpecCNN to learn vertex normal functions and visualize the prediction results qualitatively. Fourth, we perform control experiments to compare different design choices of the framework and analyze the stability of our system under input sampling density variations. Last, we show qualitative results and analyze error patterns.
For 3D shape segmentation task, we use a large scale shape part annotation dataset introduced by , which augments a subset of ShapeNet models with semantic part annotations. The dataset contains 16 categories of man-made shapes, with 2 to 6 parts per category. In total there are 16,881 models with expert verified part annotations. In addition, we use the official train/test split provided along with ShapeNet models.
For the keypoint prediction task, we build a new large scale keypoint annotation dataset, containing 1,337 chair models with 10 keypoints per shape, in contrast to traditional small scale dataset which has at most 100 shapes annotated per category. These keypoints are all manually annotated by experts with consistency across different shapes.
2 Shape Part Segmentation
We first conduct part segmentation assuming the category label of each shape is known, as the setting in . The task is to predict a part label for each sample point on shapes. We compare our framework with traditional learning-based techniques leveraging on local geometric features and shape alignment cues, as well as recent deep learning based approaches which also fall into the family of spectral CNNs. In addition we design an additional baseline using a 3D volumetric CNN architecture, denoted as Voxel CNN, which generalizes VoxNet for segmentation tasks. The network has 10 convolutional layers without down-sampling and keeps a receptive field of 19 with spatial resolution of 32. We compute per-point features in the preprocessing step as is in and use the same set of input for all baselines except Voxel CNN. The set of input shapes are pre-aligned using a hierarchical joint alignment algorithm described in . Point intersection over union (IoU) is used as evaluation metric, averaged across all part classes. Cross-entropy loss is minimized during training.
We evaluate our framework in two settings, with or without SpecTN, and compare the results in Table 2.
Note that on most categories our approach achieves the best performance and on average outperforms state of the art by a large margin. In comparison to , the state of the art in the family of spectral CNNs, our approach introduces spectral dilated kernel parametrization, which increases the effectiveness of spectral CNN framework. Moreover, the performance gain from SpecTN shows that synchronizing spectral domains would greatly increase the generalizibility across shapes of different topology and geometry.
Next we evaluate our approach on the part segmentation task in a cross-category setting. In this task, shape category label is not known during the test phase and for each point the network needs to select one of the part label from all possible part labels in all categories. Cross-category setting introduces larger geometric and topological variance among shapes, thus could help examining the spectral CNN’s ability of recognizing objects. At the same time the impact of spectral domain misalignment becomes stronger, providing a better testbed for validating the effectiveness of SpecTN. Since this experiment is proposed to verify design choices of spectral CNN, we mainly compare with . We mix the 16 categories of shapes in and train a single network for all categories. After predicting point segmentation labels, one can classify shapes through a point-wise majority voting scheme. Point IoU and classification accuracy (Acc) are chosen as the evalution metric for part segmentation and object categorization, respectively. The results are shown in the nd and rd column of Table 3.
Our approach outperforms the baseline ACNN by a large margin on both segmentation and classification. Note that ACNN does not explicitly conduct multi-scale analysis and is designed for near-isometric 3D shapes with similar spectral domains, thus generalizes less well across a diverse set of shapes. Our framework, in contrast, could effectively capture multi-scale context information, a feature that is highly important for both segmentation and classification. The spectral domain synchronization ability of SpecTN further improves our generalizability, leading to an extra performance gain as is shown in Table 3.
To evaluate the robustness of our approach to incomplete data, we conduct part segmentation on simulated scans of 3D shapes from a single viewpoint. To be specific, we generate simulated scans for each 3D shape in the part annotation dataset from random viewpoints, and then use these partial point cloud with part annotations for train and test. All the partial point clouds are normalized to fit into a unit cube. Following the train/test split provided by , we train our network to segment shape parts for each category. Again we compare our method with ACNN . IoU is used as evaluation metric and the results are shown in the th and th column of Table 3.
Our approach outperforms the baseline on partial data part segmentation by a large margin. In particular, from complete shape to partial shape setting, the performance drop of our approach is less significantly than the baseline, reflected by the gap of mean IoU between the complete data setting and the partial setting. It verifies that our method is more robust to data incompleteness. We surmise that the performance of ACNN is heavily influenced by noisy and sensitive principal curvature estimation on partial scans since this step plays a crucial rule in determining its local frames; whereas our approach makes less assumption about quality of the underlying shape.
3 Keypoint Prediction
Our framework is not limited to part segmentation but could learn more general functions on graphs. In this section, we evaluate our framework on the keypoint prediction task. We associate each keypoint an individual label and assign all the non-keypoints a background class label. The keypoint prediction problem could be treated as a multi-class classification problem and the cross-entropy loss is optimized during training. We evaluate our approach against previous state-of-the-art method . first jointly aligns all the shapes in 3D space via free-form deformation and then propagates keypoint labels to test shapes from its nearest training shapes. We manually tune and report the best performance of this method. Five-folds cross validation is adopted during evaluation, and PCK (percentage of correct keypoints) is used as evaluation metric. We show the PCK curve for the two approaches in Figure 6. Each point on a curve indicates fraction of correctly predicted keypoints for a given Euclidean error threshold. Our approach outperforms , in particular, more precise predictions can be obtained by our method (see the region close to y-axis).
4 Normal Prediction
To further validate the generality of our framework, we leverage our proposed SyncSpecCNN to learn another type of graph vertex function, vertex normal function. Specifically, our SyncSpecCNN takes the XYZ coordinate function of graph vertices as network input and predicts vertex normal as output. The network is trained to minimize the L2 loss between ground truth normals and predicted normals. We use the official train/test split provided by and visualize some of the normal prediction results from test set in Figure 5.
It can be seen our predictions are very close to the ground truth at most of the time.Even on thin structures the normal predictions are still reasonable. One problem of our prediction is that it tends to generate smoothly transiting normals along the boundary while the ground truth is sharper. This is due to the fact that we are using a small number of eigenbases in our experiments, which is not friendly to regression tasks with very high frequency signal as target.
5 Diagnosis
We evaluate our dilated kernel parametrization from two aspects: the basis function choice and kernel scale choice. Table 4 summarizes all the comparison results, as explained below.
We explore the expressive power of different kernel basis. In the family of spectral CNN, convolution kernels are parametrized by a linear combination of basis functions, i.e. modulated exponential window in our case. Previous methods have proposed to use different basis functions such as cubic spline basis and exponential window basis . Each row of Table 4 corresponds to a basis choice.
We also evaluate the effectiveness of multi-scale analysis by changing the spatial sizes of convolution kernels. We compare with two baseline choices: set all kernel size to be the smallest kernel size in the current network; set to be the largest one. Each column of Table 4 corresponds to a kernel scale choice.
All numbers are reported on the cross-category part segmentation task, by IoU. We only take the XYZ coordinate function of graph vertices as network input as opposed to handcrafted geometry features which may have already capture some multi-scale information. Also we remove the th and th layers from our network which involves SpecTN and is designed for very large convolution kernels.
It can be seen that modulated exponential window basis has a better expressive power compared with baselines for our segmentation task. Using multi-scale kernels also enables the aggregation of multi-scale information, thus producing better performance than small or large kernels alone.
In this experiment, we evaluate the robustness of our approach w.r.t point cloud density variation. To be specific, we train our SyncSpecCNN for shape segmentation on the point cloud provided by first. Then we downsample the point cloud under different downsample ratio and evaluate our trained model to check how segmentation performance would change. Again we evaluate our approach with/without SpecTN and the result is shown in Figure 7.
By introducing SpecTN, our framework becomes more robust to sampling density variation. Our conjecture is that sampling density variation may result in large spectral space perturbation, therefore being able to synchronize different spectral domains becomes especially important.
6 Qualitative Results and Error Analysis
Figure 8 shows segmentation results generated from our network on two categories, Chair and Lamp. Representative good results are shown in the first block and typical error patterns are summarized from the second to fourth blocks.
Most of our segmentation is very close to ground truth as is shown in the first block. We can accurately segment shapes with large geometric or topological variations like wide bench v.s. ordinary chair, pendant lamp v.s. table lamp. The lamp base on the first row and the lampshade on the second row are very similar regarding their local geometry; however, since our network is able to capture large scale context information, it could still differentiate the two and segment shapes correctly.
We observe several typical error patterns in our results. Most segmentation error occurs along part boundaries. There are also cases where the semantic definition of parts has inherent ambiguities. We also observe a third type of error pattern, in which our prediction might miss a certain part completely, as is shown in the fourth block.
Conclusion
We introduce a novel neural network architecture, the Synchronized Spectral CNN (SyncSpecCNN), for semantic annotation on 3D shape graphs. To share coefficients and conduct multi-scale analysis in different parts of a single shape graph, we introduce a spectral parametrization of dilated convolutional kernels. To allow parameter sharing across related but different shapes that may be represented by very different graphs, we introduce a spectral transformer network to synchronize different spectral domains. The effectiveness of different components in our network is validated through extensive experiments. Jointly these contributions lead to state-of-the-art performance on various semantic annotation tasks including 3D shape part segmentation and 3D keypoint prediction.