<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Luis Gonzales on Medium]]></title>
        <description><![CDATA[Stories by Luis Gonzales on Medium]]></description>
        <link>https://medium.com/@luis_gonzales?source=rss-95092fbaaaa8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*_giN7DWEuBqqXTU0ucEKwQ.jpeg</url>
            <title>Stories by Luis Gonzales on Medium</title>
            <link>https://medium.com/@luis_gonzales?source=rss-95092fbaaaa8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 13:02:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@luis_gonzales/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[A Look at MobileNetV2: Inverted Residuals and Linear Bottlenecks]]></title>
            <link>https://medium.com/@luis_gonzales/a-look-at-mobilenetv2-inverted-residuals-and-linear-bottlenecks-d49f85c12423?source=rss-95092fbaaaa8------2</link>
            <guid isPermaLink="false">https://medium.com/p/d49f85c12423</guid>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[mobilenet]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Luis Gonzales]]></dc:creator>
            <pubDate>Sun, 03 Nov 2019 06:03:07 GMT</pubDate>
            <atom:updated>2019-11-03T06:03:07.720Z</atom:updated>
            <content:encoded><![CDATA[<p>MobileNetV2 [2] introduces a new CNN layer, the inverted residual and linear bottleneck layer, enabling high accuracy/performance in mobile and embedded vision applications. The new layer builds on the depth-wise separable convolutions introduced in MobileNetV1 [1]. The MobileNetV2 network is built around this new layer and can be adapted to perform object classification and detection, and semantic segmentation.</p><h3>Contents</h3><ul><li>Overview of Standard 2D Convolution</li><li>Depth-wise Separable Convolutions</li><li>Inverted Residual and Linear Bottleneck Layer</li><li>Model Architecture</li></ul><h3>Overview of Standard 2D Convolution</h3><p>Before diving into the mechanics of the depth-wise separable convolution, let’s review the standard 2D convolution. Suppose a convolution operation transforms an input volume of dimensions <em>D</em>ᵤ x <em>D</em>ᵤ x <em>M</em> to an output volume of dimensions <em>D</em>ᵥ x <em>D</em>ᵥ x <em>N</em>, as shown in Fig. 1(a). Specifically, we require <em>N</em> filters, each of dimension <em>D</em>ᵣ x <em>D</em>ᵣ x <em>M</em>, as shown in Fig. 1(b).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/475/1*Y68J_pupx-p4hCp8Ev7E5Q@2x.png" /><figcaption>Fig. 1: Standard 2D convolution shown in (a) with filters shown in (b)</figcaption></figure><p>Interpreting the mappings in the depth-wise separable convolution can be facilitated by first gaining an intuition of the standard 2D convolution. There are at least two possible interpretations of the standard convolution, both of which will be helpful to understand.</p><p>The perhaps-more-functionally-correct interpretation of 2D convolution is portrayed in Fig. 2. A filter (shown in orange) is stepped along the spatial dimensions of an input volume (shown in blue). An inner product is taken between the overlapping regions of the input volume and filter at every step (shown in light red). In practice, the overlapping portion of both the filter and input volume are vectorized and the dot product is taken between the two resulting vectors. In either case, a single value is computed, as shown by the red element in Fig. 2. Although functionally-correct, this interpretation obscures the spatial filtering that occurs within the convolution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*7MlHL5hsoWdf2QQ0PHZGGw@2x.png" /><figcaption>Fig. 2: Functional interpretation of 2D convolution (<a href="https://towardsdatascience.com/a-comprehensive-introduction-to-different-types-of-convolutions-in-deep-learning-669281e58215">source</a>)</figcaption></figure><p>The other interpretation of the standard 2D convolution draws more emphasis to the spatial filtering that takes place. Similar to the interpretation above, a filter, shown in Fig. 3(b), is stepped along the spatial dimensions of an input volume, shown in Fig. 3(a). But rather than the inner product spanning the depth dimension, the inner product is taken on a per-channel basis. In other words, channel <em>i</em> in the input volume is convolved with channel <em>i</em> in the filter (single channel convolution), where <em>i</em> indexes along the depth dimension. The resulting volume is shown in Fig. 3(c). Finally, all resulting values are summed, leading to a single value, which is not shown. Again, note that this interpretation emphasizes the spatial filtering and that for <em>N</em> filters, each and every channel of the input volume is filtered <em>N</em> times, which begins to seem rather excessive.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/721/1*t3Kogt4CxWPhTKshR6ctiA@2x.png" /><figcaption>Fig. 3: Input volume (a) and filter (b) are convolved on a per-channel basis, resulting in (c) (<a href="https://towardsdatascience.com/a-comprehensive-introduction-to-different-types-of-convolutions-in-deep-learning-669281e58215">source</a>)</figcaption></figure><h3>Depth-wise Separable Convolutions</h3><p>Depth-wise separable convolutions were introduced in MobileNetV1 and are a type of factorized convolution that reduce the computational cost as compared to standard convolutions. The new MobileNetV2 layer incorporates depth-wise separable convolutions, so it’s worthwhile reviewing them.</p><p>Despite the standard convolution contains <strong>spatial filtering</strong> and <strong>linear combinations</strong>, note that it’s not possible to decompose or factorize the two stages. Constrastingly, the depth-wise separable convolution is structured around such factorization. As before, suppose an input volume of <em>D</em>ᵤ x <em>D</em>ᵤ x <em>M</em> is transformed to an output volume of <em>D</em>ᵥ x <em>D</em>ᵥ x <em>N</em>, as shown in Fig. 4(a). The first set of filters, shown in Fig. 4(b), are comprised of <em>M</em> single-channel filters, mapping the input volume to <em>D</em>ᵥ x <em>D</em>ᵥ x <em>M </em>on a <strong>per-channel</strong> basis. This stage, known as depth-wise convolutions, resembles the intermediate tensor shown in Fig. 3(c) and achieves the <strong>spatial filtering</strong> component. In order to construct new features from those already captured by the input volume, we require a <strong>linear combination</strong>. To do so, 1x1 kernels are used along the depth of the intermediate tensor; this step is referred to as point-wise convolution. <em>N</em> such 1x1 filters are used, resulting in the desired output volume of <em>D</em>ᵥ x <em>D</em>ᵥ x <em>N</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/407/1*T_d9HMP7Ww98Fpa5r4XWVA@2x.png" /><figcaption>Fig. 4: Desired input and output volumes shown in (a) obtained by applying two different sets of filters shown in (b) and (c)</figcaption></figure><p>The steps above are summarized in the example below with an input volume of 7 x 7 x 3 and an output volume 5 x 5 x 128.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F_zz2T9V82RR8TmH_2FnXg@2x.png" /><figcaption>Fig. 5: Concrete example of depth-wise separable convolutions (<a href="https://towardsdatascience.com/a-comprehensive-introduction-to-different-types-of-convolutions-in-deep-learning-669281e58215">source</a>)</figcaption></figure><p>The lowered computational cost of depth-wise separable convolutions comes predominantly from limiting the spatial filtering from <em>M</em>*<em>N</em> times in standard convolutions to <em>M</em> times. Standard convolution has a computational cost on the order of</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/125/1*v_LQPEUZmgeJmKHf4DyasQ@2x.png" /></figure><p>while depth-wise convolution has a computational cost on the order of</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/206/1*ZniKXTUaYhCO-TSTaBxmrw@2x.png" /></figure><p>Taking the ratio between the cost of depth-wise separable and standard convolution gives 1/<em>N</em> + 1/<em>D</em>ᵣ². <em>N</em> will often be greater than <em>D</em>ᵣ² in practical applications, particularly as one goes deeper into a network, so the ratio can be approximated by 1/<em>D</em>ᵣ². For reference, if one uses 3x3 kernels, depth-wise separable convolutions enjoy nearly an order of magnitude fewer computations than standard convolutions.</p><h3>Inverted Residual and Linear Bottleneck Layer</h3><p>The premise of the inverted residual layer is that a) <strong><em>feature maps </em></strong>are able to be encoded in low-dimensional subspaces and b) non-linear activations result in information loss in spite of their ability to increase representational complexity. These principles guide the design of the new convolutional layer.</p><p>The layer takes in a low-dimensional tensor with <em>k</em> channels and performs three separate convolutions. First, a point-wise (1x1) convolution is used to expand the low-dimensional input feature map to a higher-dimensional space suited to non-linear activations, then ReLU6 is applied. The expansion factor is referred to as <em>t</em> throughout the paper, leading to <em>tk</em> channels in this first step. Next, a depth-wise convolution is performed using 3x3 kernels, followed by ReLU6 activation, achieving spatial filtering of the higher-dimensional tensor. Finally, the spatially-filtered feature map is projected back to a low-dimensional subspace using another point-wise convolution. The projection alone results in loss of information, so, intuitively, it’s important that the activation function in the last step be <em>linear</em> activation (see below for an empirical justification). When the initial and final feature maps are of the same dimensions (when the depth-wise convolution stride equals one and input and output channels are equal), a residual connection is added to aid gradient flow during backpropagation. Note that the final two steps are essentially a depth-wise separable convolution with the requirement that there be dimensionality reduction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ewr8VxFPwKWwT2KaeYpOFA.png" /><figcaption>Fig. 6: Visualization of the intermediate feature maps in the inverted residual layer (<a href="https://arxiv.org/abs/1905.02244">source</a>)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/487/1*mFKsFp9fi8LDaflCu8Tyhg@2x.png" /><figcaption>Table 1: Alternative representation of the inverted residual layer (<a href="https://arxiv.org/pdf/1801.04381.pdf">source</a>)</figcaption></figure><p>The authors stress two points throughout the paper: 1) the final 1x1 convolution that maps back to low-dimensional space should be followed by a <em>linear</em> activation and 2) the residual connections should be made between the low-dimensional feature maps. Empirical results for both are shown below in Fig. 7.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*EsrfagKy7so52ugtljNx6Q@2x.png" /><figcaption>Fig. 7: The impact of non-linearities and various types of residual connections (<a href="https://arxiv.org/pdf/1801.04381.pdf">source</a>)</figcaption></figure><p>Fig. 8 gives a comparison between the conventional residual block and the newly-proposed inverted residual block. Emphasis is made on the fact that the inverted residual block sees low-dimensional feature maps at its input and output and that these feature maps are the result of linear activations. Additionally, non-linear activations are applied only on volumes that live in the intermediate, higher-dimensional subspaces.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/604/1*RpIVS4iOLyNDVeTfFi2biw@2x.png" /><figcaption>Fig. 8: Comparison between the conventional residual layer and the inverted residual layer (<a href="https://arxiv.org/pdf/1801.04381.pdf">source</a>)</figcaption></figure><p>Last but not least, below is the inverted residual layer implemented as a Keras custom layer.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e190701332bc25636bbb7a3924220f17/href">https://medium.com/media/e190701332bc25636bbb7a3924220f17/href</a></iframe><h3>Model Architecture</h3><p>The MobileNetV2 network is predominantly built from the inverted residual layer introduced in the paper (referred to as “bottleneck” in Fig. 9), as shown below. Additionally, by using the network as a feature extractor, the model can be extended to perform object detection and semantic segmentation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/454/1*2FVY2xWLKgN1n8ynCawmyA@2x.png" /><figcaption>Fig. 9: MobileNetV2 network (<a href="https://arxiv.org/pdf/1801.04381.pdf">source</a>)</figcaption></figure><h3>References</h3><p>[1] <a href="https://arxiv.org/pdf/1704.04861.pdf">A. Howard, “MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications,” 2017</a></p><p>[2] <a href="https://arxiv.org/pdf/1801.04381.pdf">M. Sandler, “MobileNetV2: Inverted Residuals and Linear Bottlenecks,” 2018</a></p><p>[3] <a href="https://arxiv.org/abs/1905.02244">A. Howard, “Searching for MobileNetV3,” May 2019</a></p><p>[4] <a href="https://towardsdatascience.com/a-comprehensive-introduction-to-different-types-of-convolutions-in-deep-learning-669281e58215">K. Bai, “A Comprehensive Introduction to Different Types of Convolutions in Deep Learning,” Feb. 2019</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d49f85c12423" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[An In-Depth Look at PointNet]]></title>
            <link>https://medium.com/@luis_gonzales/an-in-depth-look-at-pointnet-111d7efdaa1a?source=rss-95092fbaaaa8------2</link>
            <guid isPermaLink="false">https://medium.com/p/111d7efdaa1a</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[point-cloud]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[object-classification]]></category>
            <dc:creator><![CDATA[Luis Gonzales]]></dc:creator>
            <pubDate>Fri, 12 Apr 2019 04:55:28 GMT</pubDate>
            <atom:updated>2019-11-19T00:38:31.943Z</atom:updated>
            <content:encoded><![CDATA[<p>PointNet [1] is a seminal paper in 3D perception, applying deep learning to point clouds for object classification and part/scene semantic segmentation. The original white-paper has been re-implemented with TensorFlow 2.0 and can be found at <a href="https://github.com/luis-gonzales/pointnet_own">github.com/luis-gonzales/pointnet_own</a>.</p><h3>Contents</h3><ul><li>Input Data</li><li>Architecture</li><li>Permutation Invariance</li><li>Transformation Invariance</li><li>Analysis and Visualization</li><li>TensorFlow 2.0 Implementation</li></ul><h3>Input Data</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-TeuUNLFMGUx4PEnHG-LPw.png" /><figcaption>Fig. 1: Point cloud visualization (<a href="https://www.prototechsolutions.com/point-cloud-visualization/">source</a>)</figcaption></figure><p>PointNet takes raw point cloud data as input, which is typically collected from either a lidar or radar sensor. Unlike 2D pixel arrays (images) or 3D voxel arrays, point clouds have an unstructured representation in that the data is simply a collection (more specifically, a set) of the points captured during a lidar or radar sensor scan. In order to leverage existing techniques built around (2D and 3D) convolutions, many researchers and practitioners often discretize a point cloud by taking multi-view projections onto 2D space or quantizing it to 3D voxels. Given that the original data is manipulated, either approach can have negative impacts.</p><p>For simplicity, it’ll be assumed that a point in a point cloud is fully described by its (<em>x</em>, <em>y</em>, <em>z</em>) coordinates. In practice, other features may be included, such as surface normal and intensity.</p><h3>Architecture</h3><p>Given that PointNet consumes raw point cloud data, it was necessary to develop an architecture that conformed to the unique properties of point sets. Among these, the authors emphasize:</p><ul><li>Permutation (Order) Invariance: given the unstructured nature of point cloud data, a scan made up of <em>N</em> points has <em>N</em>! permutations. The subsequent data processing must be invariant to the different representations.</li><li>Transformation Invariance: classification and segmentation outputs should be unchanged if the object undergoes certain transformations, including rotation and translation.</li><li>Point Interactions: the interaction between neighboring points often carries useful information (i.e., a single point should not be treated in isolation). Whereas classification need only make use of global features, segmentation must be able to leverage local point features along with global point features.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hE8pzhCm-5yXFsEIWg-ILg.png" /><figcaption>Fig. 2: PointNet classification and segmentation networks (<a href="https://arxiv.org/abs/1612.00593">source</a>)</figcaption></figure><p>The architecture is surprisingly simple and quite intuitive. The classification network uses a shared multi-layer perceptron (MLP) to map each of the <em>n</em> points from three dimensions (<em>x</em>, <em>y</em>, <em>z</em>) to 64 dimensions. It’s important to note that a <em>single</em> multi-layer perceptron is shared for each of the <em>n</em> points (i.e., mapping is identical and independent on the <em>n</em> points). This procedure is repeated to map the <em>n</em> points from 64 dimensions to 1024 dimensions. With the points in a higher-dimensional embedding space, max pooling is used to create a global feature vector in ℝ¹⁰²⁴. Finally, a three-layer fully-connected network is used to map the global feature vector to <em>k</em> output classification scores. The details on the “input transform” and “feature transform” are covered in the “Transformation Invariance” section below.</p><p>As for the segmentation network, each of the <em>n</em> input points needs to be assigned to one of <em>m</em> segmentation classes. Because segmentation relies on local and global features, the points in the 64-dimensional embedding space (local point features) are concatenated with the global feature vector (global point features), resulting in a per-point vector in ℝ¹⁰⁸⁸. Similar to the multi-layer perceptrons used in the classification network, MLPs are used (identically and independently) on the <em>n</em> points to lower the dimensionality from 1088 to 128 and again to <em>m</em>, resulting in an array of <em>n </em>x <em>m.</em></p><p>The following sections will elaborate on the motivation/use of max pooling and the transformation networks.</p><h3>Permutation Invariance</h3><p>As mentioned, point clouds are inherently unstructured data and are represented as numerical sets. Specifically, given <em>N </em>data points, there are <em>N</em>! permutations.</p><p>In order to make PointNet invariant to input permutations, the authors turned to symmetric functions, those whose value given <em>n</em> arguments is the same regardless of the order of the arguments [2]. For binary operators, this is also known as the commutative property. Common examples include:</p><ul><li>sum(<em>a</em>, <em>b</em>) = sum(<em>b</em>, <em>a</em>)</li><li>average(<em>a</em>, <em>b</em>) = average(<em>b</em>, <em>a</em>)</li><li>max(<em>a</em>, <em>b</em>) = max(<em>b</em>, <em>a</em>)</li></ul><p>Specifically, the authors make use of the symmetric function once the <em>n</em> input points are mapped to higher-dimensional space, as shown below. The result is a global feature vector that aims to capture an aggregate signature of the <em>n</em> input points. Naturally, the expressiveness of the global feature vector is tied to the dimensionality of it (and thus the dimensionality of the points that are input to the symmetric function). The global feature vector is used directly for classification and is used alongside local point features for segmentation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/342/1*EYi_O-j16J7W7eHuNo3YIg@2x.png" /><figcaption>Fig. 3: Usage of max pool, a symmetric function (<a href="https://arxiv.org/abs/1612.00593">source</a>)</figcaption></figure><p>PointNet implements the symmetric function with max pooling. The authors empirically tested alternatives, including summing and averaging, but found them to be inferior, as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/263/1*Be10-gLo_pgAkU_9NitCUQ@2x.png" /><figcaption>Fig. 4: Empirical testing of symmetric functions (<a href="https://arxiv.org/abs/1612.00593">source</a>)</figcaption></figure><h3>Transformation Invariance</h3><p>The classification (and segmentation) of an object should be invariant to certain geometric transformations (e.g., rotation). Motivated by Spatial Transformer Networks (STNs) [3], the “input transform” and “feature transform” are modular sub-networks that seek to provide pose normalization for a given input.</p><p>In order to appreciate the adoption of STNs in PointNet, let’s try to gain a high-level understanding of how they function. Shown in Fig. 5 are various inputs and corresponding outputs of a Spatial Transformer (ST). As can be seen, the ST provides pose normalization to an otherwise rotated input. Using this type of pose normalization in a digit classifier would relax the constraints of a downstream algorithm and reduce the extent to which data augmentation is needed. Pose normalization is beneficial in the case of point clouds as well, as objects can similarly take on an unlimited number of poses.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*kbCsZmeW1B2BgiKjvhyQdA.gif" /><figcaption>Fig. 5: Various inputs and corresponding outputs of a Spatial Transformer (<a href="https://towardsdatascience.com/review-stn-spatial-transformer-network-image-classification-d3cbd98a70aa">source</a>)</figcaption></figure><p>Taking a further look, Fig. 6 shows the components of the Spatial Transformer. Based on input <em>U</em>, a small regression network, the localization net, outputs transformation parameter <em>θ</em>. In order to construct output <em>V </em>given <em>U</em> and <em>θ</em>, a grid generator and sampler are used. To motivate the grid generator and sampler further, imagine that the output of a localization net corresponds to rotating a handwritten “7” by an angle <em>θ</em>; in order to create a new image with the proper rotation, the original image needs to undergo appropriate sampling. Note that the ST is not confined to the input space and can operate on any downstream feature/embedding space.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hA0qhlZzB7uWP0b85G4-9Q.png" /><figcaption>Fig. 6: Components of the Spatial Transformer (<a href="https://arxiv.org/abs/1506.02025?context=cs">source</a>)</figcaption></figure><p>Going back to PointNet, a similar approach can be taken: for a given input point cloud, apply an appropriate rigid or affine transformation to achieve pose normalization. Because each of the <em>n</em> input points are represented as a vector and are mapped to the embedding spaces independently, applying a geometric transformation simply amounts to matrix multiplying each point with a transformation matrix. Unlike the image-based application of Spatial Transformers, no sampling is needed. Fig. 7 shows a snapshot of the input transform. Similar to the localization net in STs, the T-Net is a regression network that is tasked with predicting an input-dependent 3-by-3 transformation matrix that is then matrix multiplied with the n-by-3 input.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/238/1*TX8LxMRUWOH4Xmu7TiSoRg@2x.png" /><figcaption>Fig. 7: Snapshot of input transform</figcaption></figure><p>The operations comprising the T-Net are motivated by the higher-level architecture of PointNet. MLPs (or fully-connected layers) are used to map the input points independently and identically to a higher-dimensional space; max pooling is used to encode a global feature vector whose dimensionality is then reduced to ℝ²⁵⁶ with FC layers. The input-dependent features at the final FC layer are then combined with globally trainable weights and biases, resulting in a 3-by-3 transformation matrix.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*35CanxesaidssBZMDddJjg.png" /><figcaption>Fig. 8: Architecture of 3x3 T-Net</figcaption></figure><p>The concept of pose normalization is extended to the 64-dimensional embedding space (“feature transform” in Fig. 2). The corresponding T-Net is nearly identical to that of Fig. 8 except for the dimensionality of the trainable weights and biases, which become 256-by-4096 and 4096, respectively resulting in a 64-by-64 transformation matrix. The increased number of trainable parameters leads to the potential for overfitting and instability during training, so a regularization term is added to the loss function. The regularization term is shown below and encourages the resulting 64-by-64 transformation matrix (represented as <em>A</em> below) to approximate an orthogonal transformation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/216/1*PT_LJptoqZRU9AieyCHbdA@2x.png" /></figure><h3>Analysis and Visualization</h3><p>There is a considerable amount of intuition that can be drawn from the global feature vector. Firstly, the dimensionality of the vector, referred to by the authors as the <em>bottleneck dimension</em> and symbolized by <em>K</em>, relates directly to the expressiveness of the model, as mentioned previously. Naturally, a larger value of <em>K</em> leads to a more complex — and, likely, accurate — model, and vice versa. For reference, PointNet is designed with <em>K</em>=1024. Fig. 9 shows the accuracy of PointNet across <em>K</em> and number points comprising an input point cloud.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/404/1*y7bjNTe9K5meTl2Q7XB3wQ@2x.png" /><figcaption>Fig. 9: Accuracy across bottleneck size</figcaption></figure><p>Also, recall that the feature vector was the result of a thoughtfully applied symmetric function (for permutation invariance). In particular, PointNet makes use of max pooling. Similar to using the max operator to compress multiple real-valued inputs to a single value, the output of max pooling compresses the <em>n </em>points of the input point cloud to a subset of points. In fact, at most <em>K</em> points can contribute to the global feature vector. The points that do contribute to and define the global feature vector are referred to as the <em>critical point set</em> and encode the input with a sparse set of key points.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/661/1*hWxQhXA-BaSvbdaYO7Rdag.png" /><figcaption>Fig. 10: Visualization of critical point sets and upper-bound shapes (<a href="https://arxiv.org/abs/1612.00593">source</a>)</figcaption></figure><p>Similar to how the output of the max operator is unchanged by inputs that are lesser than the true maximum, there exists a bound on input points that won’t impact the global feature vector. This bound is represented above by the <em>upper-bound shape</em>. Note that noise beyond the upper-bound shape alters the global feature vector but may not necessarily result in misclassification. In summary, the global feature vector is unchanged for points between the critical point set and the upper-bound shape, resulting in considerable robustness.</p><p>Finally, the robustness described above can be visualized in a more quantitative manner, as shown below. Missing data refers to deleting points from the input point cloud, whereas outlier refers to insertion of random/noisy points.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z8RGxXefXe1rctERMRapVw.png" /><figcaption>Fig. 11: PointNet robustness test (<a href="https://arxiv.org/abs/1612.00593">source</a>)</figcaption></figure><h3>TensorFlow 2.0 Implementation</h3><p>A personal implementation of the classification portion of PointNet is available at <a href="https://github.com/luis-gonzales/pointnet_own">github.com/luis-gonzales/pointnet_own</a>.</p><h3>References</h3><p>[1] <a href="https://arxiv.org/abs/1612.00593">C. Qi et al, “PointNet: Deep Learning on Point Sets for 3D Classification and Segmentation”, 2017</a></p><p>[2] <a href="https://en.wikipedia.org/wiki/Symmetric_function">Symmetric function, Wikipedia</a></p><p>[3] <a href="https://arxiv.org/abs/1506.02025?context=cs">M. Jaderberg et al, “Spatial Transformer Networks”, 2015</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=111d7efdaa1a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>