論文閱讀 CVPR 2020 — Semantics-Guided Neural Networks for Efficient Skeleton-Based
Human Action Recognition

該論文有更明確地將人體骨架的語意資訊整合為神經網路的部份輸入,並以此想法提出 Semantics-guided neural network ( SGN )。不論在時間或空間的維度都有改善其準確度,整體架構也非常輕量。

Ken Huang
人工智慧,倒底有多智慧?
16 min readSep 23, 2021

--

論文連結:
《 Semantics-Guided Neural Networks for Efficient Skeleton-Based
Human Action Recognition 》

作者:

Introduction

人類行為辨識這主題,由於其潛在的應用場景多元,近年受到大量的關注。

而這任務長使用的骨架資訊,算是一種非常具結構性的資料,每個身體上的節點都能透過 Joint type 、Frame index 、3D Position 來識別,這也使得它在行為辨識任務上有以下 4 點優勢:

  1. 可抽象地重現身體動態 ( Motion ) 、姿勢 ( Pose ),而人類可透過這些資訊來觀察其行為,並不需要外觀資訊。
  2. 今日的深度攝影機 、 Pose estimation 技術的成本都不高,使這種資料更容易取得。
  3. 與 RGB 影片相比,以骨架當作人類行為的重現是更不受視角、外觀資訊影響的。
  4. 由於骨架資料的維度更低,運算上會更有效率。

而深度學習模型在這任務上主要是用來對一序列骨架資訊做時空變化的建模。

過去已有許多研究嘗試採用不同種類的神經網路架構進行分析,包括 RNN、CNN、GCN 等類型的神經網路。

早期長採用 RNN/LSTM 這類模型來捕捉時間軸上的動態,但近年有開始採用 CNN 作法來分析序列型資訊的趨勢,就開始有作法是將骨架的節點座標轉化成 2D 影像並縮放成常見 CNN 模型可分析的尺寸 ( 例如 ResNet 的 224 × 224 ) 來進行分析。

而前述作法中,影像的 Rows 和 Columns 就會對應節點的「 Joint type 」與「 Frame index 」,若要捕捉 Long-term dependencies 就會需要仰賴神經網路的視野域,這通常會使模型的複雜度提高。

若更直覺地來看骨架資訊,「 Joint type 」與「 Frame index 」這種語意資訊對該任務而言是非常重要的,與三維座標所具備的動態資訊相結合,才能展示出人體在時空上的狀態。可透過該論文舉的 2 個例子來理解這概念:

  1. 在有一節點高於頭部的情況下,Joint type 若是 Hand ,那行為有可能是 Raising hand;但若 Joint type 是 Foot ,那行為就可能是 Kicking a leg 。
  2. Sitting down 和 Standing up 的主要差異比較是在時間軸的次序上。

由此可知,相同座標但語意不同時,結果就差異很大,但許多先前的相關研究都忽略了語意資訊的重要性。

為了解決前述的問題與限制,該論文提出「 Semantics-guided neural network ( SGN ) 」,更明顯地善用語意、動態資訊來做到高效行為辨識。

上圖為 SGN 的整體架構,主要透過階層式的架構依序分析骨架資訊在 Joint-level 和 Frame-level 的關聯性。

而為了更完善地對 Joint-level 的關聯性進行建模,除了過往常見的動態資訊外,還整合了語意資訊,讓 GCN layer 可以根據 Content 生成具備適應性的 Graph ,並有效地在不同 Frame 之間傳遞關節點資訊。而 Frame-level 的部份也基於類似思維做 Frame index 的語意資訊整合。

Contributions

  • 在該任務上提出善用語意資訊的作法,可更有效率地作到行為辨識
  • 基於第一點的想法提出 Semantics-guided neural network ( SGN ),以階層式架構分析 Joint-level 和 Frame-level 的時空關聯性
  • SGN 是個非常輕量、強健的 Baseline,作者們希望能藉此促進該領域的相關研究發展

針對前述的特性,該論文特別將相關研究成果的準確度與參數量進行比較:

Zhang, P., Lan, C., Zeng, W., Xing, J., Xue, J., & Zheng, N. (2020). Semantics-Guided Neural Networks for Efficient Skeleton-Based Human Action Recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Figure 1.

Semantics-Guided Neural Networks

一序列的骨架資訊在該論文以 S 表示:

X 指的是 Joint ,而上標 k 是指 Joint type ,下標 t 是指時間軸上的 index;T 是指整個序列的一共有多少 Frames ,J 是節點的總數。

Dynamics Representation

針對 X 來說,每個節點的座標則以 p 表示:

而速率 ( Velocity ) 則以 v 表示:

可理解為前後時間點的座標相減

這 2 種資訊會用 Summation 做融合:

這邊的 p 和 v 是已經被兩組 Fully connected layer 投影過的 Representation,公式以 p 為例:

W 就是 FC layers;b 是 Bias vector;σ 是 ReLU activation function

Joint-level Module

Zhang, P., Lan, C., Zeng, W., Xing, J., Xue, J., & Zheng, N. (2020). Semantics-Guided Neural Networks for Efficient Skeleton-Based Human Action Recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Figure 2.

這個模組是採用 GCN 來發掘相同 Frame 的不同節點之間的關聯性,而 Graph 則是以具備語意資訊的 Content 生成,並可從以下 2 個面向來增強 GCN layer 的能力:

  1. Joint type 的資訊有助於模型學習出合適的鄰接矩陣
  2. 在 GCN 傳遞資訊時,會同時包含語意資訊

Joint type 會以 One-hot 形式做編碼,並和前面的 p 、 v 一樣透過 FC layer 再次做 Encoding 形成:

若將單一個 Frame 的 Joints 以 J 表示,那在 t 時間點並屬於 k Joint type 的 Representation 就可表述為:

同一個時間點的所有 Joints 就可寫成:

而在 t 時間點的第 i 、j 節點之間的 Edge weight 則透過以下公式進行建模:

θ 和 φ 都是由 FC layer 構成的 Transformation function:

透過前三組公式可得到鄰接矩陣,會再透過 SoftMax 對每個 Row 做 Normalization ( 讓所有 Edge 加總都會是 1 ),並以 G 表示。

而一個具備 Residual link 的 Graph convolution layer 就可表述成:

Frame-level Module

Zhang, P., Lan, C., Zeng, W., Xing, J., Xue, J., & Zheng, N. (2020). Semantics-Guided Neural Networks for Efficient Skeleton-Based Human Action Recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Figure 2.

這模組則是用來發掘不同 Frame 之間的關聯性。為了讓模型可理解時間軸上的次序性,這部份有整合 Frame index 的語意資訊,同樣也是由 One-hot 的方法進行編碼,並依照 p 、 v 的邏輯投影為:

而在 t 時間點並屬於 k Joint type 的 Representation 就變成是:

為了在單一 Frame 之內容和所有節點的資訊,該論文採用 Spatial MaxPooling layer 來聚合所有 Joints 的資訊,所以維度就會變成是:

之後接著是 2 層 Convolution layers,第一層是做 Temporal convolution ,用來對時間軸上的關聯性進行建模。第二層的 Kernel size 刻意設定成 1 ,主要是用來強化其特徵重現能力,並將學習到的特徵投影至高維空間。

經過這 2 層 Convolution layers 之後,是對時間軸做 Max pooling,將資訊聚合為 Sequence level 的特徵重現,再接上 Fully connected layer 和 Softmax 來作到分類。

Experiments

Datasets

該論文進行實驗的資料集包括 NTU RGB+D 60 & 120 和 SYSU,其他相關的實做細節請參照原文

Ablation Study

為了驗證該論文提出的語意資訊確實有效,有先對 Joint type ( JT ) 和 Frame index ( FI ) 做消融實驗:

Zhang, P., Lan, C., Zeng, W., Xing, J., Xue, J., & Zheng, N. (2020). Semantics-Guided Neural Networks for Efficient Skeleton-Based Human Action Recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Table 1.

第一組實驗 ( 前 4 個 Row ) 的 G 表示建構 Graph 時有無採用語意資訊,而 P 則是指 Graph convolution 操作時,有無傳遞語意資訊。不難看出,不論是在哪個維度上,有採用語意資訊的作法確實比較好。

第二組實驗 ( 第 5 & 6 個 Row ) 是要驗證 Frame-level 模組在 Temporal convolution ( T-Conv ) kernel size 被設定成 1 的時候,有無採用 Frame index 語意資訊的差異,也得到和第一組類似的成果。

第三組實驗 ( 第 7 & 8 個 Row ) 的 T-Conv kernel size 就是正常的 3,並同樣觀察語意資訊的影響,結果和前兩組實驗類似。

Effectiveness of Hierarchical Model

這部份是為了驗證階層式架構是否有效:

Zhang, P., Lan, C., Zeng, W., Xing, J., Xue, J., & Zheng, N. (2020). Semantics-Guided Neural Networks for Efficient Skeleton-Based Human Action Recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Table 2.

上表的 w G-GCN 是將原本的 SMP 移除,替換為 Global adaptive graph 的作法,直接對全部的 Joints 和 Frames 建構 Graph。而 w/o SMP 則是直接將 SMP 拔掉。結果也是驗證該作法的有效性。

Strong Baseline

為了讓 SGN 可以表現得更好,該論文還從過去相關研究中找出一些可能改善的作法,並改良一開始的 Baseline:

Zhang, P., Lan, C., Zeng, W., Xing, J., Xue, J., & Zheng, N. (2020). Semantics-Guided Neural Networks for Efficient Skeleton-Based Human Action Recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Table 3.

這部份的 Baseline 和前面架構圖上的版本有些不同:

  1. 沒有整合語意資訊 ( Joint type & Frame index ) 。
  2. 沒有採用 Data augmentation 。
  3. 沒有採用 MaxPooling,Baseline 是用 AveragePooling 。

而上表正是逐一改善後的結果。

Visualization of SMP

可視化的部份是針對 Spaital Maxpooling 做的,這部份其實和 Attention 的作用類似:

Zhang, P., Lan, C., Zeng, W., Xing, J., Xue, J., & Zheng, N. (2020). Semantics-Guided Neural Networks for Efficient Skeleton-Based Human Action Recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Figure 3.

從上圖的三個動作可以更直觀地看到,和該行為相關的節點有被 SMP 強化。

Comparison with the State-of-the-arts

確認最佳的配置後,就是在幾個常見的資料集上和其他過去的 SOTA 相比,首先是 NTU-60:

Zhang, P., Lan, C., Zeng, W., Xing, J., Xue, J., & Zheng, N. (2020). Semantics-Guided Neural Networks for Efficient Skeleton-Based Human Action Recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Table 4.

接著是 NTU-120:

Zhang, P., Lan, C., Zeng, W., Xing, J., Xue, J., & Zheng, N. (2020). Semantics-Guided Neural Networks for Efficient Skeleton-Based Human Action Recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Table 5.

以及 SYSU:

Zhang, P., Lan, C., Zeng, W., Xing, J., Xue, J., & Zheng, N. (2020). Semantics-Guided Neural Networks for Efficient Skeleton-Based Human Action Recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Table 6.

Conclusion

該論文在行為辨識的任務上提出一種簡單有效的方法,稱為「 Semantics-guided neural network ( SGN ) 」

這方法更明確地將語意資訊 ( Joint type 、 Frame level ) 作為神經網路的輸入,並在不同維度上都有改善模型對節點關聯性建模的成效 。

--

--

Ken Huang
人工智慧,倒底有多智慧?

在網路上自學的過程中,體會到開放式資源的美好,希望藉由撰寫文章記錄研究所的學習過程,同時作為回饋網路世界的一種方式。Email : kenhuang2019iii@gmail.com ,如果有任何問題都歡迎與我聯繫。