PointNet、PointNet++和Frustum PointNet


簡介

這是在閱讀完Ruizhongtai Qi的博士論文《DEEP LEARNING ON POINT CLOUDS FOR 3D SCENE UNDERSTANDING》后的一篇讀書筆記。這篇論文的整體框架如下圖所示,其中涉及的幾項工作在點雲處理領域都是非常有影響力的。
image

3D場景有很多表示形式,其中點雲是最接近raw sensor data的數據形式,且不會像volumetric表示那樣產生量化誤差,或像multi-view表示那樣產生投影誤差。論文中涵蓋的4項工作都是對點雲數據的處理,這篇筆記主要對前3項工作進行了記錄。
image

1 PointNet

PointNet是一個用來處理點雲數據的通用框架,可用來做分類、部件分割、語義分割等任務,其架構如下圖所示。
image

PointNet的輸入是一個點集,這個點集可能表示某個場景下的某個物體,那么PointNet應該具備以下幾個特點:

  • 點集的置換不變性:改變點的輸入順序,不影響輸出結果。比如不論輸入是\(\{P_1, P_2, P_3, P_4\}\),還是\(\{P_3, P_1, P_2, P_4\}、\{P_4, P_3, P_2, P_1\}\)。模型應該將點集所表示的物體預測成同一類。

A network that consumes N 3D points needs to be invariant to N! permutations of the input set in data feeding order.

  • 點集的剛體變換不變性:對所有點做同一rigid transformation(R/T),模型的預測結果不變。

As a geometric object, the learned representation of the point set should be invariant to certain transformations. For example, rotating and translating points all together should not modify the global point cloud category nor the segmentation of the points.

為了滿足上述兩個特點,PointNet做了下面兩點結構設計:

  • 對無序點集具有置換不變性的對稱函數
    image
    其中h函數就是Figure 3.2的 shared MLP,g函數是Max Pooling操作。
  • 用於表示剛體變換的T-Net
    image

參考資料:
《An In-Depth Look at PointNet》

2 PointNet++

PointNet有一個缺陷:無法捕獲local content。因為要么是shared MLP作用在每個point上,要么是max pooling對全部點的信息進行summarize。為了解決PointNet的這一缺陷,作者設計了PointNet++這一分層神經網絡,其核心思想是在局部區域遞歸地應用PointNet,如下圖所示:
image

PointNet++的核心組成主要包括上圖左半部分的set abstraction和右半部分的feature propogation:

  • Set Abstraction Level

    • Sampling Layer:使用Iterative Farthest Point Sampling(FPS)進行采樣,從而確定每個group的中心點。
    • Group Layer:在group的中心點的基礎上,選取candidate point形成一個group,這個group的點雲數據作為PointNet的輸入。
    • PointNet Layer:這層沒啥可說的,就是上面PointNet這節的內容。
  • Feature Propogation Level

    • Interpolation Layer

    We use inverse distance weighted average based on K-nearest neighbors(as in Eq.4.2 in default we use p=2, k=3). The interpolated features on points are then concatenated with skip-linked point features from the set abstraction level.

    image

    • Unit PointNet Layer

    Then the concatenated features are passed through a "unit pointnet", which is similar to one-by-one convolution in CNNs.

點雲數據有一個很顯著的特點——在不同區域點雲的密度不一樣。比如通過Lidar采集的點雲數據,通常距離較遠地方的點雲較稀疏。這種分布不均的特性給點雲的特征學習帶了了很大的挑戰,PointNet++對PointNet Layer做了改進,提出兩種density adaptive PointNet Layer——Multi-Scale Grouping(MSG)和Multi-Resolution Groupint(MRG)。
image

3 Frustum PointNet

在3D物體檢測中,如果像2D物體檢測一樣在3D空間中枚舉可能的BBox,會消耗大量計算,難以達到實時3D檢測。如何在3D空間中找到可能的3D BBox是一個關鍵挑戰。
如下圖所示,Frustum PointNet在基於2D檢測結果形成的截頭錐體中搜索可能的3D BBox,大大縮小了搜索空間,減小了計算量。
image

我們知道2D的BBox可以用參數\((c_x, c_y, h, w)\)來描述,3D BBox需要更多的參數進行描述:

The 3D box is parameterized by its size \(h,w,l\), center \((c_x, c_y, c_z)\), and orientation \(q,f,y\) relative to a predefined canonical pose for each category. In our implementation, we only consider the heading angle q around the up-axis for orientation.

下圖描繪了Frustum PointNet進行3D物體檢測的整體流程:
image

整個流程可以分成Frustum Proposal、3D Instance Segmentation和Amodal 3D Box Estimation3個階段。各階段的網絡結構如下圖所示:
image

對上面這張圖,需要做以下幾點的解釋說明:

  • 上面涉及到了frustum coordinate,mask coordinate和object coordinate三個坐標系,它們之間的變換可以用下圖表示。
    image

  • Amodel 3D Box Estimation PointNet輸出的位數為\(3+2NH+4NS \)。Frustum PointNet定義了NS個尺寸模板,並將heading angle \(\theta\)均勻的划分成了NH個angle bins。模型會預測:1)尺寸和heading anlge屬於哪個模板(NH+NS位);2)的residual(3NS + NH位);3)中心點在object coordinate下的resiudal(3位)。
    image

  • 對於中心點\((c_x, c_y, c_z)\)的預測,論文描述地非常明白

We take a “residual” approach for box center estimation. The center residual predicted by the box estimation network is combined with the previous center residual from the T-Net and the masked points’ centroid to recover an absolute center
(\(C_{\text {pred }}=C_{\text {mask }}+\Delta C_{t-n e t}+\Delta C_{\text {box -net }}\)).

最后介紹Frustum PointNet的訓練損失函數。完整的損失函數如下圖所示:
image

主要包含以下任務的損失:

  • \(L_{seg}\)是3D Instance Segmentation PointNet的損失函數。
  • \(L_{c1-reg}\)\(L_{c2-reg}\)是和中心點相關的損失,前一個是T-Net的回歸損失,后一個是Amodal 3D Box Estimation PointNet的回歸損失。
  • \(L_{h-cls}\)是heading angle的模板分類損失,\(L_{h-reg}\)是heading angle residual的回歸損失。
  • \(L_{s-cls}\)是3D BBox尺寸的模板分類損失,\(L_{s-reg}\)是尺寸的回歸損失。
  • \(L_{\text {corner }}=\sum_{i=1}^{N S} \sum_{j=1}^{N H} \delta_{i j} \min \left\{\sum_{k=1}^{8}\left\|P_{k}^{i j}-P_{k}^{*}\right\|, \sum_{i=1}^{8}\left\|P_{k}^{i j}-P_{k}^{* *}\right\|\right\}\)

    In essence, the corner loss is the sum of the distances between the eight corners of a predicted box and aground truth box. Since corner positions are jointly determined by center, size and heading, the corner loss is able to regularize the multi-task training for those parameter


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM