Re-ranking Person Re-identification with k-reciprocal Encoding
Abstract
In this paper, we propose a k-reciprocal encoding method to re-rank the re-ID results. Our hypothesis is that if a gallery image is similar to the probe in the k-reciprocal nearest neighbors, it is more likely to be a true match.Specifically, given an image, a k-reciprocal feature is calculated by encoding its k-reciprocal nearest neighbors into a single vector, which is used for re-ranking under the Jaccard distance. The final distance is computed as the combination of the original distance and the Jaccard distance.
這篇論文提出了k-reciprocal 編碼方法去重排re-ID結果。論文假定底庫圖片和查詢圖片在 k-reciprocal近鄰是相似的,則它們最有可能是匹配的。論文主要利用原始距離和傑卡德距離完成re-ranking。
Introduction
上圖是使用KNN(k=10)聚類的結果,其中Probe為查詢圖片,P1~P4為正樣本,N1~N6為負樣本。P1~P4在相似排名上並不靠前,而N1~N6卻比較靠前,這說明使用KNN算法得到初始排序結果具有很大噪聲。
上圖是使用KRNN(k-reciprocal nearest neighbor)算法的重排結果。首先我們需要求出一張圖片的表征特征(appearance feature)和k-r特征(k-reciprocal feature)然后分別計算原始距離和傑卡德距離,最后計算最終距離,得出re-ranking列表。
這篇文章的主要工作:
- 提出了單一的k-r特征,有利於re-ranking
- 不需要人工操作和數據標注,采用的是一種自動的和非監督的方法。
- 在多個數據集上,rank-1和mAP性能指標提升。
Proposed Approach
1. Problem Definition
Mahalanobis distance:
M為半正定矩陣 ,\(d(p,{g_i})\) 為文中提到的原始距離。
2. K-reciprocal Nearest Neighbors
KNN:
KNN算法簡介:給定測試實例,基於某種距離度量找出訓練集中與其最靠近的k個實例點,然后基於這k個最近鄰的信息來進行預測。
- 時間復雜度o(n*k):n為樣本數量,k為單個樣本特征的維度。如果不考慮特征維度的粒度為o(n)
- 空間復雜度o(n*k):n為樣本數量,k為單個樣本特征的維度。如果不考慮特征維度的粒度為o(n)
KRNN:
∧為合取聯結詞,叫做合取,比如r=q∧p,那么當且僅當p與q同時為真(或者說同時為1)時r為真(或1),也就是說\({g_i}\)是p的近鄰,p也是\({g_i}\)的近鄰。
有時候正樣本不在K近鄰中,也不在k-r近鄰中。為了解決這個問題,本文增加了\(\frac{1}{2}\)k-r近鄰,來獲得更為魯棒性的\({R^*}(p,k)\)。
3. Jaccard Distance
\(\left| \right|\)代表這個數據集的數量。如果\({g_i}\)和p是相似的,則\({R^*}(p,k)\)和\({R^*}(g_i,k)\)重合部分較多,則傑卡德距離\({d_J}(p,{g_i})\)就越小。
這步操作有3個缺點:
- 獲得\({R^*}(g_i,k)\)和\({R^*}(p,k)\)數據非常費時。
- 計算所有近鄰的權重都是相等的。
- 沒有考慮到原始距離和傑卡德距離的聯系。
4. Local Query Expansion
因為同一類別的圖片具有相似的特征,我們使用KNN方法完成本地查詢操作。
5. Final Distance
6. Complexity Analysis
假設底庫圖片集大小為N,一般情況下距離測量和重新排序的時間復雜度分別為\(O({N^2})\),\(O({N^2}\log N)\)。但是,我們提前在本地上計算距離和進行排序,故時間復雜度分別為\(O({N})\),\(O({N}\log N)\)。