天天看點

【ReID】【skimming】SphereReID: Deep Hypersphere Manifold Embedding for Person Re-identification

略讀SphereReID: Deep Hypersphere Manifold Embedding for Person Re-Identication[1],文章提出了一種調整過的softmax,即Sphere Loss,使網絡學習超球體流形嵌入空間來提高辨識能力。

痛點

一般使用的loss多為softmax loss和triplet loss,如下圖所示

【ReID】【skimming】SphereReID: Deep Hypersphere Manifold Embedding for Person Re-identification

可以看到softmax loss或者說id loss的問題在于沒有限制特征空間的分布,而使學到的特征映射可能不是最優的。而triplet loss的每個次元的特征僅在很小的間隔内,目标嵌入空間可能無法充分利用。

作者為了引入特征歸一化和權重歸一化,消除了不同的範數之後,classification将隻依賴嵌入向量和目标類權重向量之間的角度,這帶來了嵌入空間中清晰的幾何解釋。除此之外softmax監督的分類方法因樣本量偏差而導緻,并最終導緻性能下降。如圖1©,嵌入向量分布在超球面流形中,這與歐氏空間嵌入不同,SphereReID最大的特點是将圖像映射到了超球面表面,而這将可能的空間分布限制在有限的角度空間内。是以,可以充分利用目标嵌入空間,訓練網絡對來自不同行人圖像進行分類。

模型

Sphere Loss限制樣本包埋在超球面流形上的分布。如下圖:

【ReID】【skimming】SphereReID: Deep Hypersphere Manifold Embedding for Person Re-identification

其中綠色箭頭w1 w2表示兩個不同類的中心權重向量,黃色箭頭表示嵌入特征向量,可以看到softmax分布不均,而sphere loss則将它們限制到圓上(超球面)。

還記得softmax公式如下:

【ReID】【skimming】SphereReID: Deep Hypersphere Manifold Embedding for Person Re-identification

其中最後FC層的每個神經元乘以權重的過程表示如下:

【ReID】【skimming】SphereReID: Deep Hypersphere Manifold Embedding for Person Re-identification

softmax的決策邊界如下:

【ReID】【skimming】SphereReID: Deep Hypersphere Manifold Embedding for Person Re-identification

反觀sphere loss,其w和x有正則化如下:

【ReID】【skimming】SphereReID: Deep Hypersphere Manifold Embedding for Person Re-identification

sphere loss對w和x做l2正則化來消除範數和角度辨識性特征的影響。

softmax loss和sphere loss的決策邊界示意圖如下:

【ReID】【skimming】SphereReID: Deep Hypersphere Manifold Embedding for Person Re-identification

sphere loss的決策邊界:

【ReID】【skimming】SphereReID: Deep Hypersphere Manifold Embedding for Person Re-identification

sphere loss的公式如下:

【ReID】【skimming】SphereReID: Deep Hypersphere Manifold Embedding for Person Re-identification

s為溫度常數,實驗中取為14

實驗

實驗backbone為Resnet50,分離試驗和與softmax loss對比實驗如下,可以看到D網絡效果最好,而sphere loss總體也比softmax loss表現要更好:

【ReID】【skimming】SphereReID: Deep Hypersphere Manifold Embedding for Person Re-identification

其中A網絡是最後一層為global average pooling,B網絡是最後一層為global Avgpooling + FC layer,C網路是global Avgpooling + FC layer + BN,D網絡是global Avgpooling + BN + dropout + FC layer + BN。

droput比例的分離試驗如下:

【ReID】【skimming】SphereReID: Deep Hypersphere Manifold Embedding for Person Re-identification

在market1501的SOTA對比:

【ReID】【skimming】SphereReID: Deep Hypersphere Manifold Embedding for Person Re-identification

在SUHK-SYSU的SOTA對比:

【ReID】【skimming】SphereReID: Deep Hypersphere Manifold Embedding for Person Re-identification

在DukeMTMC-reID的SOTA對比:

【ReID】【skimming】SphereReID: Deep Hypersphere Manifold Embedding for Person Re-identification

在CUHK03的SOTA對比:

【ReID】【skimming】SphereReID: Deep Hypersphere Manifold Embedding for Person Re-identification

參考文獻

[1] Fan X, Jiang W, Luo H, et al. Spherereid: Deep hypersphere manifold embedding for person re-identification[J]. Journal of Visual Communication and Image Representation, 2019, 60: 51-58.

繼續閱讀