1. 程式人生 > >論文翻譯:Deep SORT: Simple Online and Realtime Tracking with a Deep Association Metric

論文翻譯:Deep SORT: Simple Online and Realtime Tracking with a Deep Association Metric

相關部落格詳解一:https://blog.csdn.net/cdknight_happy/article/details/79731981  DeepSort論文學習  cdknight_happy
相關部落格詳解二:https://www.cnblogs.com/YiXiaoZhou/p/7074037.html
相關部落格詳解三:http://www.cnblogs.com/yanwei-li/p/8643446.html

相關部落格詳解幫助理解:https://www.cnblogs.com/xiaozhi_5638/p/9376784.html

需要準備的知識點:

馬氏距離:https://blog.csdn.net/lzhf1122/article/details/72935323

COS距離 最小余弦距離:https://blog.csdn.net/lin00jian/article/details/51209715

匈牙利演算法  融合度量的方式    KM濾波器    級聯匹配策略

粉色:重點演算法       紫色:生癖詞彙       綠色:引文&未補充公式

ABSTRACT

簡單線上和實時跟蹤(SORT)是一種注重簡單、有效演算法的多目標跟蹤的實用方法。
為了提高排序的效能,本文對外觀資訊進行了整合。
由於這種擴充套件,我們能夠通過更長時間的閉塞來跟蹤物件,有效地減少了標識開關的數量。
在原始框架的精神下,我們將大量的計算複雜度放到了離線預訓練階段,在此階段我們學習了大規模的人員再識別資料集上的深度關聯度量。
在線上應用過程中,我們使用視覺化外觀空間中的近鄰查詢建立度量跟蹤關聯。
實驗評估表明,我們的擴充套件減少了45%的身份交換機數量,在高幀率下實現了整體競爭效能

1.INTRODUCTION

Due to recent progress in object detection, tracking-by-detection has become the leading paradigm in multiple object
tracking.
Within this paradigm, object trajectories are usually found in a global optimization problem that processes entire
video batches at once.
For example, flow network formulations [1, 2, 3] and probabilistic graphical models [4, 5, 6, 7] have become popular frameworks of this type.

因為近年來的目標檢測的進步,根據檢測的跟蹤已經在多目標跟蹤領域成為了主要模式。
在這種模式下,物件軌跡通常出現在一次處理整個視訊批量的全域性優化問題中。
例如,流網路公式[1,2,3]和概率圖形模型[4,5,6,7]已經成為這種型別的流行框架。

However,due to batch processing, these methods are not applicable in online scenarios where a target identity must be available at each time step.
More traditional methods are Multiple Hypothesis Tracking (MHT) [8] and the Joint Probabilistic Data Association Filter (JPDAF) [9].
These methods perform data association on a frame-by-frame basis.
 In the JPDAF,a single state hypothesis is generated by weighting individual measurements by their association likelihoods.
In MHT,all possible hypotheses are tracked, but pruning schemes must be applied for computational tractability.
Both methods have recently been revisited in a tracking-by-detection scenario [10, 11] and shown promising results.
 However, the performance of these methods comes at increased computational and implementation complexity.

但是,由於批處理的原因,這些方法不適用於線上場景流網路公式和概率圖形模型),在這些場景中,目標ID必須在每個時間步驟中可用。
更傳統的方法是多假設跟蹤(MHT)[8]和聯合概率資料關聯過濾器(JPDAF)[9]。
這些方法在逐幀基礎上執行資料關聯。
JPDAF中,單個狀態假設是通過根據它們的關聯可能性對單個測量值進行加權而產生的。
MHT中,所有可能的假設都被跟蹤,但是剪枝方案必須應用於計算的可跟蹤性。
最近,這兩種方法都在 tracking-by-detection 場景中被重新使用[10,11],並顯示出了良好的結果。
然而,這些方法的效能增加了計算和實現的複雜性JPDAF,MHT)。

 

Simple online and realtime tracking (SORT) [12] is a much simpler framework that performs Kalman filtering in image space and frame-by-frame data association using the Hungarian method with an association metric that measures bounding box overlap.
This simple approach achieves favorable performance at high frame rates.
 On the MOT challenge dataset [13], SORT with a state-of-the-art people detector [14] ranks on average higher than MHT on standard detections.
This not only underlines the influence of object detector performance on overall tracking results, but is also an important insight from a practitioners point of view.

簡單的線上和實時跟蹤(SORT)[12]是一個更簡單的框架,它使用匈牙利方法在影象空間中執行卡爾曼濾波和逐幀資料關聯,使用關聯度量測量邊界框重疊。
這種簡單的方法在高幀率下取得了良好的效能。
在MOT challenge資料集[13]中,使用最先進的人員檢測器[14]在標準檢測中的平均排名高於MHT。
這不僅強調了目標檢測器效能對總體跟蹤結果的影響,而且從實踐者的角度來看,這也是一個重要的見解。

 

While achieving overall good performance in terms of tracking precision and accuracy, SORT returns a relatively high number of identity switches.
This is, because the employed association metric is only accurate when state estimation uncertainty is low.
Therefore, SORT has a deficiency in tracking through occlusions as they typically appear in frontal-view camera scenes.
We overcome this issue by replacing the association metric with a more informed metric that combines motion and appearance information.
In particular, we apply a convolutional neural network (CNN) that has been trained to discriminate pedestrians on a large-scale person re-identification dataset.
Through integration of this network we increase robustness against misses and occlusions while keeping the system easy to implement, efficient, and applicable to online scenarios.
Our code and a pre-trained CNN model are made publicly available to facilitate research experimentation and practical application development.

雖然在跟蹤精度和精度方面獲得了總體良好的效能,但SORT返回的身份交換機數量相對較高。
這是因為所使用的關聯度量僅在狀態估計不確定性較低時才準確。
因此,SORT在通過遮擋進行跟蹤方面存在缺陷,因為它們通常出現在前端檢視攝像機場景中。
我們通過將關聯度量替換為更合理的度量來克服這個問題它結合了運動和外觀資訊
特別地,我們應用了一個卷積神經網路(CNN),它被訓練用來在一個大規模的人再識別資料集中辨別行人。
通過對該網路的整合,我們提高了對遺漏和遮擋的魯棒性,同時使系統易於實現、高效並適用於線上場景。
我們的程式碼和預先訓練的CNN模型被公開,以促進研究實驗和實際應用開發。

2. SORT WITH DEEP ASSOCIATION METRIC

We adopt a conventional single hypothesis tracking methodology with recursive Kalman filtering and frame-by-frame data association.
In the following section we describe the core components of this system in greater detail.

我們採用一種傳統的單假設跟蹤方法,採用遞迴卡爾曼濾波逐幀資料關聯
在下一節中,我們將更詳細地描述這個系統的核心元件。

2.1. Track Handling and State Estimation

The track handling and Kalman filtering framework is mostly identical to the original formulation in [12](Simple online and realtime tracking.)
We assume a very general tracking scenario where the camera is uncalibrated and where we have no ego-motion information available.
 While these circumstances pose a challenge to the filtering framework, it is the most common setup considered in recent multiple object tracking benchmarks [15].
Therefore, our tracking scenario is defined on the eight dimensional state space (u, v, γ, h, ẋ, ẏ, γ̇, ḣ) that contains the bounding box center position (u, v), aspect ratio γ, height h,and their respective velocities in image coordinates.
We use a standard Kalman filter with constant velocity motion and linear observation model, where we take the bounding coordinates (u, v, γ, h) as direct observations of the object state.

跟蹤處理和卡爾曼濾波框架[12]中的原始公式基本相同。
我們假設有一個非常一般的跟蹤場景,在這個場景中,攝像機是沒有校準的,並且我們沒有可用的自我運動資訊。
雖然這些情況對過濾框架構成了挑戰,但它是最近在多個物件跟蹤基準測試[15]中考慮的最常見的設定。
因此,我們的跟蹤場景是定義在八維狀態空間(u,v,γ,h,ẋẏ,γ̇,ḣ)包含邊界框的中心位置(u,v),長寬比γ,高度h,各自的速度在影象座標。
我們用標準卡爾曼濾波器與勻速運動線性觀測模型,我們把邊界座標(u,v,γ,h)作為直接觀察物件的狀態。

 

For each track k we count the number of frames since the last successful measurement association    ak .
This counter is incremented during Kalman filter prediction and reset to 0 when the track has been associated with a measurement.
Tracks that exceed a predefined maximum age Amax are considered to have left the scene and are deleted from the track set.
New track hypotheses are initiated for each detection that cannot be associated to an existing track.
These new tracks are classified as tentative during their first three frames.
During this time, we expect a successful measurement association at each time step.
Tracks that are not successfully associated to a measurement within their first three frames are deleted.

對於每一個軌跡k,我們計算自上次成功測量關聯到ak的幀數。
此計數器在卡爾曼濾波預測期間遞增,一旦當跟蹤與測量相關聯就重置為0。
超過預先設定的最大年齡的軌跡被認為已經離開場景並從軌跡集中刪除。

對新目標出現的判斷則是: 如果某次檢測結果中的某個目標始終無法與已經存在的追蹤器進行關聯,那麼則認為可能出現了新目標。
這些新的軌跡在它們的前三幀被分類為暫定的
在此期間,我們期望在每個時間步驟中都有一個成功的度量關聯
前三個幀中沒有成功關聯到度量的跟蹤被刪除

(My

目標的建立與移除
對每一個追蹤目標,記錄自其上一次檢測結果與追蹤結果匹配之後的幀數ak,一旦一個目標的檢測結果與追蹤結果正確關聯之後,就將該引數設定為0。
如果ak超過了設定的最大閾值Amax,則認為對該目標的追蹤過程已結束。
對新目標出現的判斷則是,如果某次檢測結果中的某個目標始終無法與已經存在的追蹤器進行關聯,那麼則認為可能出現了新目標。
如果連續的3幀中潛在的新的追蹤器對目標位置的預測結果都能夠與檢測結果正確關聯,那麼則確認是出現了新的運動目標;
如果不能達到該要求,則認為是出現了“虛警”,需要刪除該運動目標。

My)
 

2.2. Assignment Problem

A conventional way to solve the association between the predicted Kalman states and newly arrived measurements is to build an assignment problem that can be solved using the Hungarian algorithm.
Into this problem formulation we integrate motion and appearance information through combination of two appropriate metrics.
To incorporate motion information we use the (squared)  Mahalanobis distance between predicted Kalman states and newly arrived measurements:

解決預測的卡爾曼狀態新到達的測量之間的關聯的一種傳統方法是建立一個可以使用匈牙利演算法解決的分配問題。
在這個問題的表述中,我們通過結合兩個適當的指標來整合運動外觀資訊
為了合併運動資訊,我們使用預測的卡爾曼狀態新到達的測量值之間的(平方)馬氏距離:

          (1)

where we denote the projection of the i-th track distribution into measurement space by (y i , S i ) and the j-th bounding box detection by d j .
The Mahalanobis distance takes state estimation uncertainty into account by measuring how many standard deviations the detection is away from the mean track location.
Further, using this metric it is possible to exclude unlikely associations by thresholding the Mahalanobis distance at a 95% confidence interval computed from the inverse χ 2 distribution.

(2)
We denote this decision with an indicator that evaluates to 1 if the association between the i-th track and j-th detection is admissible.
For our four dimensional measurement space the corresponding Mahalanobis threshold is t (1) = 9.4877

其中,我們用 (y i , S i )表示第i個軌跡分佈到測量空間的投影,用d j表示第j個邊界盒檢測。
Mahalanobis距離通過測量檢測偏離平均軌跡位置多少個標準差來考慮狀態估計的不確定性
此外,使用這個指標可以排除不可能關聯,通過以從逆χ2分佈計算得來的95%置信區間對馬氏距離進行閾值化處理。

        (2)

我們用一個指示器來表示這個決定,如果第i道和第j道檢測之間的關聯允許的話,這個指示器的值為1。
對於我們的四維測量空間,相應的Mahalanobis閾值為t (1) = 9.4877

 

While the Mahalanobis distance is a suitable association metric when motion uncertainty is low, in our image-space problem formulation the predicted state distribution obtained from the Kalman filtering framework provides only a rough estimate of the object location.
In particular, unaccounted camera motion can introduce rapid displacements in the image plane, making the Mahalanobis distance a rather uninformed metric for tracking through occlusions. Therefore, we integrate a second metric into the assignment problem.

雖然Mahalanobis距離是合適的協會規運動不確定性低的時候,在我們的影象空間問題公式化預測狀態分佈從卡爾曼濾波獲得物件的框架只提供了一個粗略的估計位置。

特別是,失蹤的相機運動可以引入快速位移在影象平面上,使Mahalanobis距離跟蹤通過遮擋,而無知的度量。因此,我們把第二個指標分配問題。

此部落格指派問題寫的很清楚,對此補充:https://blog.csdn.net/cdknight_happy/article/details/79731981

別人部落格

指派問題

方法一:馬氏距離

傳統的解決檢測結果與追蹤預測結果的關聯的方法是使用匈牙利方法。本文作者同時考慮了運動資訊的關聯和目標外觀資訊的關聯。

  • 運動資訊的關聯:使用了對已存在的運動目標的運動狀態的kalman預測結果與檢測結果之間的馬氏距離進行執行資訊的關聯。
    這裡寫圖片描述
    dj

表示第j個檢測框的位置,yi表示第i個追蹤器對目標的預測位置,Si表示檢測位置與平均追蹤位置之間的協方差矩陣?。如果某次關聯的馬氏距離小於指定的閾值t(1),則設定運動狀態的關聯成功。使用的函式為這裡寫圖片描述,作者設定t(1)=9.4877

方法二:外貌特徵

  • 當運動的不確定性很低的時候,上述的馬氏距離匹配是一個合適的關聯度量方法,但是在影象空間中使用kalman濾波進行運動狀態估計只是一個比較粗糙的預測。特別是相機存在運動時會使得馬氏距離的關聯方法失效,造成出現ID switch的現象。因此作者引入了第二種關聯方法,對每一個的檢測塊dj
  • 求一個特徵向量ri,限制條件是||ri||=1
  • 。作者對每一個追蹤目標構建一個gallary,儲存每一個追蹤目標成功關聯的最近100幀的特徵向量。那麼第二種度量方式就是計算第i個追蹤器的最近100個成功關聯的特徵集與當前幀第j個檢測結果的特徵向量間的最小余弦距離。計算公式為:
    這裡寫圖片描述
    如果上面的距離小於指定的閾值,那麼這個關聯就是成功的。閾值是從單獨的訓練集裡得到的。
  • 使用兩種度量方式的線性加權作為最終的度量,這裡寫圖片描述,只有ci,j
  • 如果在兩個度量閾值都滿足了才能用於融合Cij,,
  • 位於兩種度量閾值的交集內時,才認為實現了正確的關聯。
    距離度量對短期的預測和匹配效果很好,但對於長時間的遮擋的情況,使用外觀特徵的度量比較有效。
  • 對於存在相機運動的情況,可以設定λ=0.但是,馬氏距離的閾值仍然生效,如果不滿足第一個度量的標準,就不能進入Cij的融合階段。

別人部落格)

 

級聯匹配

Instead of solving for measurement-to-track associations in a global assignment problem, we introduce a cascade that solves a series of subproblems.
To motivate this approach,consider the following situation:
When an object is occluded for a longer period of time, subsequent Kalman filter predictions increase the uncertainty associated with the object location.

並不是在全域性任務分配層面解決 measurement-to-track 融合問題,我們使用了級聯解決一系列子問題.
激勵這種方法,考慮以下情況:
當一個物件被擋住更長一段時間,隨後卡爾曼濾波器預測增加關於物件位置的不確定性。

Consequently, probability mass spreads out in state space and the observation likelihood becomes less peaked.
Intuitively, the association metric should account for this spread of probability mass by increasing the measurement-to-track distance.
Counterintuitively, when two tracks compete for the same detection, the Mahalanobis distance favors larger uncertainty, because it effectively reduces the distance in standard deviations of any detection towards the projected track mean.

因此,狀態空間的概率質量分佈和觀察可能性變得那麼蒼白
憑直覺,通過增加measurement-to-track距離 融合指標應該計算這個概率質量的分佈。
反常識的,當兩個跟蹤爭奪相同的檢測,Mahalanobis距離支援更大的不確定性,因為它有效地減少了在任何對於預計跟蹤均值的檢測的標準偏差的距離 。

This is an undesired behavior as it can lead to increased track fragmentations and unstable tracks.
Therefore, we introduce a matching cascade that gives priority to more frequently seen objects to encode our notion of probability spread in the association likelihood.

這是一個不受歡迎的行為,因為它會導致跟蹤破碎不穩定的跟蹤
因此,我們引入一個匹配級聯 為更頻繁地看到的物件優先權以此來 編碼我們的概念,即在關聯可能下的概率分佈。

Listing 1 outlines our matching algorithm.
As input we provide the set of track T and detection D indices as well as the maximum age A max.
In lines 1 and 2 we compute the association cost matrix and the matrix of admissible associations.
We then iterate over track age n to solve a linear assignment problem for tracks of increasing age.
In line 6 we select the subset of tracks T n that have not been associated with a detection in the last n frames.
 In line 7 we solve the linear assignment between tracks in T n and unmatched detections U .
In lines 8 and 9 we update the set of matches and unmatched detections, which we return after completion in line 11.
 Note that this matching cascade gives priority to tracks of smaller age, i.e., tracks that have been seen more recently.

清單1中概述了我們的匹配演算法。
作為輸入提供的跟蹤T和檢測D指數以及最高年齡最大。

1:關係矩陣代價 C=[cij]
2:容許關聯矩陣 B = [bij]
然後迭代跟蹤年齡n解決增長年齡的跟蹤線性分配問題
3:用空集合,初始化匹配集合M
4:用D,初始化非匹配集合U
5: for   n從1到Amax每一個:
6:我們選擇在最後n幀裡面還沒有被檢測關聯的追蹤T n的子集
7:用C 解決軌道之間的線性匹配(  未關聯跟蹤軌跡T n 和 無匹配的檢測U)
8:我們更新匹配
9:和無匹配的檢測,在第11行結果返回。
注意:這個匹配的級聯為主較小年齡的痕跡優先權,即最近見過的跟蹤

In a final matching stage, we run intersection over union association as proposed in the original SORT algorithm [12] on the set of unconfirmed and unmatched tracks of age n = 1.
This helps to to account for sudden appearance changes, e.g.,
due to partial occlusion with static scene geometry, and to increase robustness against erroneous initialization.

在最後一個匹配階段,我們在未經證實和n = 1的非匹配跟蹤上,用最初的sort演算法[12]執行交叉聯盟融合 。
這有助於解釋突然出現變化,例如,
由於靜態場景幾何 部分遮擋,增加了對錯誤的初始化的魯棒性。

(別人部落格

當一個目標長時間被遮擋之後,kalman濾波預測的不確定性就會大大增加,狀態空間內的可觀察性就會大大降低。
假如此時兩個追蹤器競爭同一個檢測結果的匹配權,往往遮擋時間較長的那條軌跡的馬氏距離更小,使得檢測結果更可能和遮擋時間較長的那條軌跡相關聯,這種不理想的效果往往會破壞追蹤的持續性。
這麼理解吧,假設本來協方差矩陣是一個正態分佈,那麼連續的預測不更新就會導致這個正態分佈的方差越來越大,那麼離均值歐氏距離遠的點可能和之前分佈中離得較近的點獲得同樣的馬氏距離值。
所以,作者使用了級聯匹配來對更加頻繁出現的目標賦予優先權,具體的演算法如下圖:


級聯匹配的核心思想就是由小到大對消失時間相同的軌跡進行匹配,這樣首先保證了對最近出現的目標賦予最大的優先權,也解決了上面所述的問題。
在匹配的最後階段還對unconfirmed和age=1的未匹配軌跡進行基於IoU的匹配
這可以緩解因為表觀突變或者部分遮擋導致的較大變化。
當然有好處就有壞處,這樣做也有可能導致一些新產生的軌跡被連線到了一些舊的軌跡上。但這種情況較少。

別人部落格)

 

深度特徵描述器

網路結構:

By using simple nearest neighbor queries without additional metric learning, successful application of our method requires a well-discriminating feature embedding to be trained offline, before the actual online tracking application.
To this end, we employ a CNN that has been trained on a large-scale person re-identification dataset [21] that contains over 1,100,000 images of 1,261 pedestrians, making it well suited for deep metric learning in a people tracking context.

通過使用簡單的最近鄰查詢沒有額外的度量學習,我們的方法的成功應用需要well-discriminating的特徵,在實際線上跟蹤應用之前就離線訓練好的well-discriminating特徵
為此,我們採用CNN,一直在訓練一個大規模的人鑑定資料集[21]包含超過1100000 1261行人影象,使其適合深度度量學習在一個人跟蹤上下文。

The CNN architecture of our network is shown in Table 1.
In summary, we employ a wide residual network [22] with two convolutional layers followed by six residual blocks.
The global feauture map of dimensionality 128 is computed in dense layer 10.
A final batch and l2 normalization projects features onto the unit hypersphere to be compatible with our cosine appearance metric.
In total, the network has 2,800,864 parameters and one forward pass of 32 bounding boxes takes approximately 30 ms on an Nvidia GeForce GTX 1050 mobile GPU.
Thus, this network is well suited for online tracking, provided that a modern GPU is available.
While the details of our training procedure are out of the scope of this paper, we provide a pre-trained model in our GitHub repository  along with a script that can be used to generate features.

CNN架構的網路是表1所示。
總之,我們使用剩餘網路[22],兩個卷積層,隨後六個剩餘塊。
128維度的全域性特徵圖在dense10這一層進行計算。
最後一批處理和l2標準化專案特徵在單位超球面上來相容我們的餘弦外貌度量
總的來說,網路有2800,864個引數和1個前進傳播的32框 ,大約需要30 ms  Nvidia GeForce GTX 1050移動GPU。
因此,這個網路是適合線上跟蹤,提供一個現代GPU是可用的。
雖然我們的培訓過程的細節超出了本文的範圍,我們在GitHub庫提供pre-trained模型和一個指令碼,該指令碼可用於生成功能。

 

在行人重識別資料集上離線訓練模型。輸入128維的歸一化的特徵。在GTX1050m顯示卡上,輸入30個bounding box提取特徵的時間約為30ms。預訓練的模型和程式碼位於https://github.com/nwojke/deep_sort
實驗

實驗

作者使用《Poi:
Multiple object tracking with high performance detection and appearance feature》文章訓練的高效能faster rcnn模型進行檢測。檢測的置信度閾值設定為0.3。
和sort對比,好處是:
- 減少了45%的ID switch;
- 結合了深度外觀資訊,對遮擋目標的追蹤效果大大提升;
- FP的升高很多,文章中提出這主要是由於靜態場景中detection的錯誤以及過長的允許丟失的track age所導致的(相對於SORT只用相鄰幀進行匹配來說,Deep SORT允許高達30幀的丟失,而Kalman的等速運動模型沒有改變,這主要造成了FP的升高)。
- 20Hz,依舊實用;
- 達到了state-of-art online tracking的效果。