{"id":937,"date":"2022-09-15T13:42:04","date_gmt":"2022-09-15T13:42:04","guid":{"rendered":"http:\/\/summergeometry.org\/sgi2022\/?p=937"},"modified":"2022-09-15T13:42:04","modified_gmt":"2022-09-15T13:42:04","slug":"frame-averaging-for-invariant-point-cloud-classification","status":"publish","type":"post","link":"https:\/\/summergeometry.org\/sgi2022\/frame-averaging-for-invariant-point-cloud-classification\/","title":{"rendered":"Frame Averaging for Invariant Point Cloud Classification"},"content":{"rendered":"\n<p class=\"has-text-align-center wp-block-paragraph\">By Ruyu Yan, Xinyi Zhang<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Invariant Point Cloud Classification<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">We experimented with incorporating SE(3) invariance into a point cloud classification model based on our prior study on Frame Averaging for Invariant and Equivariant Network Design. We used a simple PointNet architecture, dropping the input and feature transformations, as our backbone.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Method and Implementation<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Similar to the normal estimation example provided in the reference paper, we defined the frames to be<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\\(\\mathcal{F}(X)=\\{([\\alpha_1v_1, \\alpha_2v_2, \\alpha_3v_3], t)|\\alpha_i\\in\\{-1, 1\\}\\}\\subset E(3) \\)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">where \\(\\mathbb{t}\\) is the centroid and \\(v_1, v_2, v_3\\) are the principle components of the point cloud \\(X\\). Then, we have the frame operations<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\\(\\rho_1(g)=\\begin{pmatrix}R &amp;t \\\\0^T &amp; 1\\end{pmatrix}, R=\\begin{bmatrix}\\alpha_1v_1 &amp;\\alpha_2v_2&amp;\\alpha_3v_3\\end{bmatrix} \\)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">With that, we can symmetrize the classification model \\(\\phi:V \\rightarrow \\mathbb{R}\\) by<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\\(\\langle \\phi \\rangle \\mathcal{F}(X)=\\frac{1}{|\\mathcal{F}(X)|}\\sum_{g\\in\\mathcal{F}(X)}\\phi(\\rho_1(g)^{-1}X) \\)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here we show the pseudo-code of our implementation of the symmetrization algorithm in the forward propagation through the neural network. Please refer to our first blog about this project for details on <code><strong>get_frame<\/strong><\/code> and <code><strong>apply_frame<\/strong><\/code> functions. <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\ndef forward(self, pnt_cloud):\n\t# compute frames by PCA\n\tframe, center = self.get_frame(pnt_cloud)\n\t# apply frame operations to re-centered point cloud\n\tpnt_cloud_framed = self.apply_frame(pnt_cloud - center, frame)\n\n\t# extract features of framed point cloud with PointNet\n\tpnt_net_feature = self.pnt_net(pnt_cloud_framed)\n\t# predict likelihood of classification to each category\n\tpred_scores = self.classify(pnt_net_features)\n\t# take the average of prediction scores over the 8 frames\n\tpred_scores_averaged = pred_scores.mean()\n\n\treturn pred_scores_averaged\n\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">Experiment and Comparison<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">We chose Vector Neurons, a recent framework for invariant point cloud processing, as our experiment baseline. By extending neurons from 1-dimensional scalars to 3-dimensional vectors, the Vector Neuron Networks (VNNs) enable a simple mapping of SO(3) actions to latent spaces and provide a framework for building equivariance in common neural operations. Although VNNs could construct rotation-equivariant learnable layers of which the actions will commute with the rotation of point clouds, VNNs are not very compatible with the translation of point clouds.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In order to build a neural network that commutes with the actions of the SE(3) group (rotation + translation) instead of the actions of the SO(3) group (rotation only), we will use Frame Averaging to construct the equivariant autoencoders that are efficient, maximally expressive, and therefore universal.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Following the implementation described above, we trained a classification model on 5 selected classes (bed, chair, sofa, table, toilet) in the ModelNet40 dataset. We obtained a Vector Neurons classification model with the same PointNet backbone (input and feature transformation included) pre-trained on the complete ModelNet40 dataset. We tested the classification accuracy on both models with point cloud data of the 5 selected classes randomly transformed by rotation-only or rotation and translation. The results are shown in the table below.<\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"970\" data-id=\"953\" src=\"http:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Untitled-3-1024x970.png\" alt=\"\" class=\"wp-image-953\" srcset=\"https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Untitled-3-1024x970.png 1024w, https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Untitled-3-300x284.png 300w, https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Untitled-3-768x728.png 768w, https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Untitled-3.png 1138w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Original Point Cloud of Chair<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"960\" data-id=\"950\" src=\"http:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Untitled-1-3-1024x960.png\" alt=\"\" class=\"wp-image-950\" srcset=\"https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Untitled-1-3-1024x960.png 1024w, https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Untitled-1-3-300x281.png 300w, https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Untitled-1-3-768x720.png 768w, https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Untitled-1-3.png 1160w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Rotation-only<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"948\" data-id=\"951\" src=\"http:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Untitled-2-2-1024x948.png\" alt=\"\" class=\"wp-image-951\" srcset=\"https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Untitled-2-2-1024x948.png 1024w, https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Untitled-2-2-300x278.png 300w, https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Untitled-2-2-768x711.png 768w, https:\/\/summergeometry.org\/sgi2022\/wp-content\/uploads\/2022\/08\/Untitled-2-2.png 1180w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Rotation and Translation<\/figcaption><\/figure>\n<\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\" style=\"font-size:14px\"><table><tbody><tr><td><\/td><td>SO(3) Test Instance Accuracy<\/td><td>SE(3) Test Instance Accuracy<\/td><\/tr><tr><td>Vector Neurons<\/td><td>89.6%<\/td><td>6.1%<\/td><\/tr><tr><td>Frame Averaging<\/td><td>80.7%<\/td><td>80.3%<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The Vector Neurons model was trained for a more difficult classification task, but it was also more fined tuned with a much longer training time and larger data size. The Frame Averaging model in our experiment, however, was trained with relatively larger learning steps and shorter training time. Although it is not fair to make a direct comparison between the two models, we can still see a conclusive result. As expected, the Vector Neurons model has good SO(3) invariance, but tends to fail when the point cloud is translated. The Frame Averaging model, on the other hand, performs similarly well on both SO(3) and SE(3) invariance tests.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the Frame Averaging model was trained with the same setting as the Vector Neurons model, we believe that it will have both the accuracy of SO(3) and SE(3) tests comparable with Vector Neurons\u2019 SO(3) accuracy, because of its maximal expressive power. Due to the limited resource, we cannot prove our hypothesis by experience, but we will provide more theoretical analysis in the next section.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Discussion: Expressive Power of Frame Averaging<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Besides the good performance in maintaining SE(3) invariance in classification tasks, we want to further discuss the advantage of frame averaging, namely its ability to preserve the expressive power of any backbone architecture.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">The Expressive Power of Frame Averaging<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Let \\(\\phi: V \\rightarrow \\mathbb{R}\\) and \\(\\Phi: V \\rightarrow W\\) be some arbitrary functions, e.g. neural networks where \\(V, W\\) are normed linear spaces. Let \\({G}\\) be a group with representations \\(\\rho_1: G \\rightarrow GL(V)\\) and \\(\\rho_2: G \\rightarrow GL(W)\\) that preserve the group structure.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Definition<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A frame is bounded over a domain \\(K \\subset V\\) if there exists a constant \\(c &gt; 0\\) so that \\(||\\rho_2(g)|| \\leq c\\) for all \\(g \\in F(X)\\) and all \\(X \\in K\\) where \\(||\\cdot||\\)  is the operator norm over \\(W\\).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A domain \\(K \\subset V\\) is frame finite if for every \\(X \\in K\\), \\(F(X)\\) is a finite set.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A major advantage of Frame Averaging is its preservation of the expressive power of the base models. For any class of neural networks, we can see them as a collection of functions \\(H \\subset C(V,W)\\), where \\(C(V,W)\\) denotes all the continuous functions from \\(V\\) to \\(W\\). We denote \\(\\langle H \\rangle = \\{ \\langle \\phi \\rangle | \\phi \\in H\\}\\) as the transformed \\(H\\) after applying the frame averaging. Intuitively, the expressive power tells us the approximation power of \\(\\langle H \\rangle\\) in comparison to \\(H\\) itself. The following theorem demonstrates the maximal expressive power of Frame averaging.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Theorem<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If \\(F\\) is a bounded \\(G\\)-equivariant frame over a frame-finite domain \\(K\\), then for any equivariant function \\(\\psi \\in C(V,W)\\), the following inequality holds<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\\(\\inf_{\\phi \\in H}||\\psi &#8211; \\langle \\phi \\rangle_F||{K,W} \\leq c \\inf{\\phi \\in H}||\\psi &#8211; \\phi||_{K_F,W} \\)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">where \\(K_F = \\{ \\rho_1(g)^{-1}X | X \\in K, g \\in F(X)\\}\\) is the set of points sampled by the FA operator and $c$ is the constant from the definition above.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">With the theorem above, we can therefore prove the universality of the FA operator. Let \\(H\\) be any collection of functions that are universal set-equivariant, i.e., for arbitrary continuous set function \\(\\psi\\) we have \\(\\inf_{\\phi \\in H} ||\\psi &#8211; \\phi||_{\\Omega,W} = 0\\) for arbitrary compact sets \\(\\Omega \\subset V\\). For bounded domain \\(K \\subset V\\), \\(K_F\\) defined above is also bounded and contained in some compact set \\(\\Omega\\). Therefore, we can conclude with the following corollary.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Corollary<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Frame Averaging results in a universal SE(3) equivariant model over bounded frame-finite sets, \\(K \\subset V\\).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>By Ruyu Yan, Xinyi Zhang Invariant Point Cloud Classification We experimented with incorporating SE(3) invariance into a point cloud classification model based on our prior study on Frame Averaging for Invariant and Equivariant Network Design. We used a simple PointNet architecture, dropping the input and feature transformations, as our backbone. Method and Implementation Similar to [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[45],"tags":[],"class_list":["post-937","post","type-post","status-publish","format-standard","hentry","category-research"],"_links":{"self":[{"href":"https:\/\/summergeometry.org\/sgi2022\/wp-json\/wp\/v2\/posts\/937","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/summergeometry.org\/sgi2022\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/summergeometry.org\/sgi2022\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/summergeometry.org\/sgi2022\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/summergeometry.org\/sgi2022\/wp-json\/wp\/v2\/comments?post=937"}],"version-history":[{"count":10,"href":"https:\/\/summergeometry.org\/sgi2022\/wp-json\/wp\/v2\/posts\/937\/revisions"}],"predecessor-version":[{"id":1129,"href":"https:\/\/summergeometry.org\/sgi2022\/wp-json\/wp\/v2\/posts\/937\/revisions\/1129"}],"wp:attachment":[{"href":"https:\/\/summergeometry.org\/sgi2022\/wp-json\/wp\/v2\/media?parent=937"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/summergeometry.org\/sgi2022\/wp-json\/wp\/v2\/categories?post=937"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/summergeometry.org\/sgi2022\/wp-json\/wp\/v2\/tags?post=937"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}